Examples of freezeParamTypes()


Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

    Event findEntryPointsEvent = SpeedTracerLogger.start(CompilerEventType.FIND_ENTRY_POINTS);
    SourceInfo sourceInfo = program.createSourceInfoSynthetic(JavaToJavaScriptCompiler.class);
    JMethod bootStrapMethod = program.createMethod(sourceInfo, "init",
        program.getIndexedType("EntryMethodHolder"), program.getTypeVoid(),
        false, true, true, false, false);
    bootStrapMethod.freezeParamTypes();
    bootStrapMethod.setSynthetic();

    JMethodBody body = (JMethodBody) bootStrapMethod.getBody();
    JBlock block = body.getBlock();
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

            info.makeChild(param.getSourceInfo().getOrigin()), param.getName(),
            paramType, true, false, bridgeMethod);
        bridgeMethod.addParam(newParam);
      }
      addThrownExceptions(jdtBridgeMethod, bridgeMethod);
      bridgeMethod.freezeParamTypes();
      info.addCorrelation(info.getCorrelator().by(bridgeMethod));

      // create a call
      JMethodCall call = new JMethodCall(info, new JThisRef(info, clazz),
          implmeth);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

        JFieldRef mapRef = new JFieldRef(methodInfo, null, mapField, type);
        JDeclarationStatement declStmt = new JDeclarationStatement(methodInfo,
            mapRef, call);
        JMethod clinit = program.createMethod(methodInfo, "$clinit", mapClass,
            program.getTypeVoid(), false, true, true, true, false);
        clinit.freezeParamTypes();
        methodInfo.addCorrelation(methodInfo.getCorrelator().by(clinit));
        JBlock clinitBlock = ((JMethodBody) clinit.getBody()).getBlock();
        clinitBlock.addStmt(declStmt);
        mapField.setInitializer(declStmt);
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

  private JMethod createSyntheticMethod(SourceInfo info, String name, JDeclaredType enclosingType,
      JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal, AccessModifier access) {
    JMethod method =
        new JMethod(info, name, enclosingType, returnType, isAbstract, isStatic, isFinal, access);
    method.freezeParamTypes();
    method.setSynthetic();
    method.setBody(new JMethodBody(info));
    enclosingType.addMethod(method);
    return method;
  }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

    for (JParameter oldParam : method.getParams()) {
      JProgram.createParameter(sourceInfo, oldParam.getName(), oldParam.getType(), true, false,
          devirtualMethod);
    }

    devirtualMethod.freezeParamTypes();
    devirtualMethod.addThrownExceptions(method.getThrownExceptions());
    sourceInfo.addCorrelation(sourceInfo.getCorrelator().by(devirtualMethod));

    return devirtualMethod;
  }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

    toReturn =
        new JMethod(info, requestType.replace("_", "_1").replace('.', '_'), holderType, program
            .getTypeJavaLangObject().getNonNull(), false, true, true, AccessModifier.PUBLIC);
    toReturn.setBody(new JMethodBody(info));
    holderType.addMethod(toReturn);
    toReturn.freezeParamTypes();
    info.addCorrelation(info.getCorrelator().by(toReturn));
    rebindMethods.put(requestType, toReturn);

    // Used in the return statement at the end
    JExpression mostUsedExpression = null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

        bridgeMethod.addParam(newParam);
      }
      for (ReferenceBinding exceptionReference : jdtBridgeMethod.thrownExceptions) {
        bridgeMethod.addThrownException((JClassType) typeMap.get(exceptionReference.erasure()));
      }
      bridgeMethod.freezeParamTypes();

      // create a call and pass all arguments through, casting if necessary
      JMethodCall call = new JMethodCall(info, makeThisRef(info), implmeth);
      for (int i = 0; i < bridgeMethod.getParams().size(); i++) {
        JParameter param = bridgeMethod.getParams().get(i);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

    SourceInfo sourceInfo = program.createSourceInfoSynthetic(
        JavaToJavaScriptCompiler.class, "Bootstrap method");
    JMethod bootStrapMethod = program.createMethod(sourceInfo,
        "init".toCharArray(), program.getIndexedType("EntryMethodHolder"),
        program.getTypeVoid(), false, true, true, false, false);
    bootStrapMethod.freezeParamTypes();

    JMethodBody body = (JMethodBody) bootStrapMethod.getBody();
    JBlock block = body.getBlock();

    // Also remember $entry, which we'll handle specially in GenerateJsAst
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

  private static void findEntryPoints(TreeLogger logger,
      RebindOracle rebindOracle, String[] mainClassNames, JProgram program)
      throws UnableToCompleteException {
    JMethod bootStrapMethod = program.createMethod(null, "init".toCharArray(),
        null, program.getTypeVoid(), false, true, true, false, false);
    bootStrapMethod.freezeParamTypes();

    for (int i = 0; i < mainClassNames.length; ++i) {
      String mainClassName = mainClassNames[i];
      JReferenceType referenceType = program.getFromTypeMap(mainClassName);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

        JParameter newVar = program.createParameter(oldVar.getSourceInfo(),
            oldVar.getName().toCharArray(), oldVar.getType(), oldVar.isFinal(),
            newMethod);
        varMap.put(oldVar, newVar);
      }
      newMethod.freezeParamTypes();

      // Move the body of the instance method to the static method
      JAbstractMethodBody movedBody = x.getBody();
      newMethod.setBody(movedBody);
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.