Examples of freezeParamTypes()


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();

    JMethodBody body = (JMethodBody) bootStrapMethod.getBody();
    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()

          args.add(new JParameterRef(program, null, syntheticParam));
        }
      }

      // Lock the method.
      synthetic.freezeParamTypes();

      // return (new Foo()).Foo() : The only statement in the function
      JReturnStatement ret = new JReturnStatement(program, null, call);

      // Add the return statement to the method body
View Full Code Here

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

            && type != program.getIndexedType("Array")) {
          JMethod getClassMethod = program.createMethod(null,
              "getClass".toCharArray(), type, program.getTypeJavaLangClass(),
              false, false, false, false, false);
          assert (type.methods.get(2) == getClassMethod);
          getClassMethod.freezeParamTypes();
        }

        if (binding.isNestedType() && !binding.isStatic()) {
          // add synthetic fields for outer this and locals
          assert (type instanceof JClassType);
View Full Code Here

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

            program.createParameter(null, "name".toCharArray(),
                program.getTypeJavaLangString(), true, false, newMethod);
          } else {
            assert false;
          }
          newMethod.freezeParamTypes();
        }
      }
    }

    private JMethod processMethodBinding(MethodBinding b,
View Full Code Here

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

         * more like output JavaScript. Clinit is always in slot 0, init (if it
         * exists) is always in slot 1.
         */
        JMethod clinit = program.createMethod(null, "$clinit".toCharArray(),
            newType, program.getTypeVoid(), false, true, true, true, false);
        clinit.freezeParamTypes();

        if (newType instanceof JClassType) {
          JMethod init = program.createMethod(null, "$init".toCharArray(),
              newType, program.getTypeVoid(), false, false, true, true, false);
          init.freezeParamTypes();
View Full Code Here

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

        clinit.freezeParamTypes();

        if (newType instanceof JClassType) {
          JMethod init = program.createMethod(null, "$init".toCharArray(),
              newType, program.getTypeVoid(), false, false, true, true, false);
          init.freezeParamTypes();
        }

        typeMap.put(binding, newType);
        return true;
      } catch (Throwable e) {
View Full Code Here

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

      }
      // Emulate clinit method for super clinit calls.
      JMethod clinit =
          new JMethod(SourceOrigin.UNKNOWN, "$clinit", declType, JPrimitiveType.VOID, false, true,
              true, AccessModifier.PRIVATE);
      clinit.freezeParamTypes();
      clinit.setSynthetic();
      declType.addMethod(clinit);
      declType.setExternal(true);
      types.put(key, declType);
      return declType;
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()

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

    JMethodBody body = (JMethodBody) bootStrapMethod.getBody();
    List<JStatement> statements = body.getStatements();
    for (String mainClassName : mainClassNames) {
      statements.add(makeStatsCalls(program, mainClassName));
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
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.