Examples of JNumericEntry


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

    return false;
  }

  @Override
  public boolean visit(JNumericEntry x, Context ctx) {
    expression = new JNumericEntry(x.getSourceInfo(), x.getKey(), x.getValue());
    return false;
  }
View Full Code Here

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

    // RunAsyncFramentIndex will later be replaced by the fragment the async is in.
    // TODO(rluble): this approach is not very clean, ideally the load sequence should be
    // installed AFTER code splitting when the fragment ids are known; rather than inserting
    // a placeholder in the AST and patching the ast later.
    for (JRunAsync runAsync : initialLoadSequence) {
      initializers.add(new JNumericEntry(call.getSourceInfo(), "RunAsyncFragmentIndex",
          runAsync.getRunAsyncId()));
    }
    JNewArray newArray =
        JNewArray.createInitializers(arg1.getSourceInfo(), arrayType,
            Lists.newArrayList(initializers));
View Full Code Here

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

  private void setNumEntriesInAsyncFragmentLoader(int entryCount) {
    JMethodCall constructorCall = getBrowserLoaderConstructor(program);
    assert constructorCall.getArgs().get(0).getType() == JPrimitiveType.INT;
    constructorCall.setArg(0,
        new JNumericEntry(constructorCall.getSourceInfo(), "RunAsyncFragmentCount", entryCount));
  }
View Full Code Here

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

        SourceInfo info = x.getSourceInfo();

        JMethod runAsyncMethod = program.getIndexedMethod("AsyncFragmentLoader.runAsync");
        assert runAsyncMethod != null;
        JMethodCall runAsyncCall = new JMethodCall(info, null, runAsyncMethod);
        runAsyncCall.addArg(new JNumericEntry(info, "RunAsyncFragmentIndex", splitPoint));
        runAsyncCall.addArg(asyncCallback);

        JReferenceType callbackType = (JReferenceType) asyncCallback.getType().getUnderlyingType();
        JMethod callbackMethod;
        if (callbackType instanceof JClassType) {
View Full Code Here

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

        }
        int splitPoint = matches.get(0).getRunAsyncId();
        JMethodCall newCall =
            new JMethodCall(info, null, program
                .getIndexedMethod("RunAsyncCode.forSplitPointNumber"));
        newCall.addArg(new JNumericEntry(info, "RunAsyncFragmentIndex", splitPoint));
        ctx.replaceMe(newCall);
      }
    }
View Full Code Here

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

  private void setNumEntriesInAsyncFragmentLoader(int entryCount) {
    JMethodCall constructorCall = getBrowserLoaderConstructor(program);
    assert constructorCall.getArgs().get(0).getType() == JPrimitiveType.INT;
    constructorCall.setArg(0,
        new JNumericEntry(constructorCall.getSourceInfo(), "RunAsyncFragmentCount", entryCount));
  }
View Full Code Here

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

        SourceInfo info = x.getSourceInfo();

        JMethod runAsyncMethod = program.getIndexedMethod("AsyncFragmentLoader.runAsync");
        assert runAsyncMethod != null;
        JMethodCall runAsyncCall = new JMethodCall(info, null, runAsyncMethod);
        runAsyncCall.addArg(new JNumericEntry(info, "RunAsyncFragmentIndex", splitPoint));
        runAsyncCall.addArg(asyncCallback);

        JReferenceType callbackType = (JReferenceType) asyncCallback.getType();
        callbackType = callbackType.getUnderlyingType();
        JMethod callbackMethod;
View Full Code Here

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

        }
        int splitPoint = matches.get(0).getRunAsyncId();
        JMethodCall newCall =
            new JMethodCall(info, null, program
                .getIndexedMethod("RunAsyncCode.forSplitPointNumber"));
        newCall.addArg(new JNumericEntry(info, "RunAsyncFragmentIndex", splitPoint));
        ctx.replaceMe(newCall);
      }
    }
View Full Code Here

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

    // RunAsyncFramentIndex will later be replaced by the fragment the async is in.
    // TODO(rluble): this approach is not very clean, ideally the load sequence should be
    // installed AFTER code splitting when the fragment ids are known; rather than inserting
    // a placeholder in the AST and patching the ast later.
    for (JRunAsync runAsync : initialLoadSequence) {
      initializers.add(new JNumericEntry(call.getSourceInfo(), "RunAsyncFragmentIndex",
          runAsync.getRunAsyncId()));
    }
    JNewArray newArray =
        JNewArray.createInitializers(arg1.getSourceInfo(), arrayType,
            Lists.newArrayList(initializers));
View Full Code Here

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

    return false;
  }

  @Override
  public boolean visit(JNumericEntry x, Context ctx) {
    expression = new JNumericEntry(x.getSourceInfo(), x.getKey(), x.getValue());
    return false;
  }
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.