Examples of JReferenceType


Examples of com.google.gwt.dev.jjs.ast.JReferenceType

  }

  @Override
  public boolean visit(JProgram x, Context ctx) {
    for (int i = 0; i < x.getDeclaredTypes().size(); ++i) {
      JReferenceType type = x.getDeclaredTypes().get(i);
      accept(type);
      newline();
      newline();
    }
    return false;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

          name = new char[1][0];
          name[0] = localName;
        }

        SourceInfo info = makeSourceInfo(typeDeclaration);
        JReferenceType newType;
        if (binding.isClass()) {
          newType = program.createClass(info, name, binding.isAbstract(),
              binding.isFinal());
        } else if (binding.isInterface()) {
          newType = program.createInterface(info, name);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

  private boolean execImpl() {
    boolean madeChanges = false;
    while (true) {
      RescueVisitor rescuer = new RescueVisitor();
      for (int i = 0; i < program.specialTypes.size(); ++i) {
        JReferenceType type = (JReferenceType) program.specialTypes.get(i);
        rescuer.rescue(type, true, noSpecialTypes);
      }
      for (int i = 0; i < program.entryMethods.size(); ++i) {
        JMethod method = (JMethod) program.entryMethods.get(i);
        rescuer.rescue(method);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

    }

    // @Override
    public boolean visit(JProgram program, Context ctx) {
      for (Iterator it = program.getDeclaredTypes().iterator(); it.hasNext(); ) {
        JReferenceType type = (JReferenceType) it.next();
        if (referencedTypes.contains(type)
            || program.typeOracle.isInstantiatedType(type)) {
          accept(type);
        } else {
          it.remove();
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

       * Compute the list of classes than can successfully satisfy cast
       * requests, along with the set of types they can be successfully cast to.
       * Do it in super type order.
       */
      for (Iterator it = program.getDeclaredTypes().iterator(); it.hasNext();) {
        JReferenceType type = (JReferenceType) it.next();
        if (type instanceof JClassType) {
          computeSourceClass((JClassType) type);
        }
      }

View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

     * Returns <code>true</code> if inlining the target expression would
     * eliminate a necessary clinit.
     */
    private boolean checkClinitViolation(JMethodCall x,
        JExpression resultExpression) {
      JReferenceType targetEnclosingType = x.getTarget().getEnclosingType();
      if (!program.typeOracle.checkClinit(currentMethod.getEnclosingType(), targetEnclosingType)) {
        // Access from this class to the target class won't trigger a clinit
        return false;
      }
      if (program.isStaticImpl(x.getTarget())) {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

    private JsInvocation maybeCreateClinitCall(JField x) {
      if (!x.isStatic()) {
        return null;
      }

      JReferenceType enclosingType = x.getEnclosingType();
      if (!typeOracle.checkClinit(currentMethod.getEnclosingType(),
          enclosingType)) {
        return null;
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

    private JsInvocation maybeCreateClinitCall(JMethod x) {
      if (!x.isStatic()) {
        return null;
      }
      JReferenceType enclosingType = x.getEnclosingType();
      if (!typeOracle.hasClinit(enclosingType)) {
        return null;
      }
      if (program.isStaticImpl(x)) {
        return null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

      JType leafType = type.getLeafType();
      int dims = type.getDims();

      // Rescue my super array type
      if (leafType instanceof JReferenceType) {
        JReferenceType rLeafType = (JReferenceType) leafType;
        if (rLeafType.extnds != null) {
          JArrayType superArray = program.getTypeArray(rLeafType.extnds, dims);
          rescue(superArray, true, isInstantiated);
        }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JReferenceType

     * @param type The type of the value passing from Java to JavaScript.
     * @see com.google.gwt.core.client.JavaScriptObject
     */
    private void maybeRescueJavaScriptObjectPassingIntoJava(JType type) {
      if (type instanceof JReferenceType) {
        JReferenceType refType = (JReferenceType) type;
        if (program.typeOracle.canTriviallyCast(refType,
            program.getSpecialJavaScriptObject())) {
          rescue(refType, true, true);
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.