Examples of makeChild()


Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

    JClassType jsoType = program.getJavaScriptObject();
    SourceInfo sourceInfo = jsoType.getSourceInfo();

    // Create the new method.
    String name = objectMethod.getName() + "__devirtual$";
    JMethod newMethod = program.createMethod(sourceInfo.makeChild(
        JsoDevirtualizer.class, "Devirtualized method"), name.toCharArray(),
        jsoType, objectMethod.getType(), false, true, true, false, false);

    // Setup parameters.
    JParameter thisParam = program.createParameter(sourceInfo,
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

         * We emulate static initializers and instance initializers as methods.
         * As in other cases, this gives us: simpler AST, easier to optimize,
         * more like output JavaScript. Clinit is always in slot 0, init (if it
         * exists) is always in slot 1.
         */
        JMethod clinit = program.createMethod(info.makeChild(
            BuildTypeMapVisitor.class, "Class initializer"),
            "$clinit".toCharArray(), newType, program.getTypeVoid(), false,
            true, true, true, false);
        clinit.freezeParamTypes();

View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

            "$clinit".toCharArray(), newType, program.getTypeVoid(), false,
            true, true, true, false);
        clinit.freezeParamTypes();

        if (newType instanceof JClassType) {
          JMethod init = program.createMethod(info.makeChild(
              BuildTypeMapVisitor.class, "Instance initializer"),
              "$init".toCharArray(), newType, program.getTypeVoid(), false,
              false, true, true, false);
          init.freezeParamTypes();
        }
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

         * We emulate static initializers and instance initializers as methods.
         * As in other cases, this gives us: simpler AST, easier to optimize,
         * more like output JavaScript. Clinit is always in slot 0, init (if it
         * exists) is always in slot 1.
         */
        JMethod clinit = program.createMethod(info.makeChild(
            BuildTypeMapVisitor.class, "Class initializer"),
            "$clinit".toCharArray(), newType, program.getTypeVoid(), false,
            true, true, true, false);
        clinit.freezeParamTypes();

View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

            "$clinit".toCharArray(), newType, program.getTypeVoid(), false,
            true, true, true, false);
        clinit.freezeParamTypes();

        if (newType instanceof JClassType) {
          JMethod init = program.createMethod(info.makeChild(
              BuildTypeMapVisitor.class, "Instance initializer"),
              "$init".toCharArray(), newType, program.getTypeVoid(), false,
              false, true, true, false);
          init.freezeParamTypes();
        }
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

      /*
       * Don't use the JProgram helper because it auto-adds the new method to
       * its enclosing class.
       */
      JMethod newMethod = new JMethod(sourceInfo.makeChild(
          CreateStaticImplsVisitor.class, "Devirtualized function"), newName,
          enclosingType, returnType, false, true, true, x.isPrivate());

      // Setup parameters; map from the old params to the new params
      JParameter thisParam = JParameter.create(sourceInfo.makeChild(
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

      JMethod newMethod = new JMethod(sourceInfo.makeChild(
          CreateStaticImplsVisitor.class, "Devirtualized function"), newName,
          enclosingType, returnType, false, true, true, x.isPrivate());

      // Setup parameters; map from the old params to the new params
      JParameter thisParam = JParameter.create(sourceInfo.makeChild(
          CreateStaticImplsVisitor.class, "Instance parameter"), "this$static",
          enclosingType, true, true, newMethod);
      Map<JParameter, JParameter> varMap = new IdentityHashMap<JParameter, JParameter>();
      for (int i = 0; i < x.getParams().size(); ++i) {
        JParameter oldVar = x.getParams().get(i);
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

    int lineno = node.getLineno();
    if (lineno == -1) {
      // Rhino only reports line numbers for statement nodes, not expressions
      return parent;
    }
    return parent.makeChild(SourceOrigin.create(lineno, parent.getFileName()));
  }

  /**
   * Force a distinct child to be created, so correlations can be added.
   */
 
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

    int lineno = node.getLineno();
    if (lineno == -1) {
      // Rhino only reports line numbers for statement nodes, not expressions
      lineno = parent.getStartLine();
    }
    return parent.makeChild(SourceOrigin.create(lineno, parent.getFileName()));
  }

  private JsNode map(Node node) throws JsParserException {

    switch (node.getType()) {
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo.makeChild()

          node = findJsniRefTarget(info, ident);
          if (node == null) {
            return; // already reported error
          }
          if (node instanceof JType) {
            node = new JClassLiteral(info.makeChild(), (JType) node);
          }
          program.jsniMap.put(ident, node);
        }

        if (node instanceof JField) {
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.