Package com.google.gwt.dev.jjs.ast

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


    CompileTimeConstantsReplacer.exec(program);
    return true;
  }

  private void assertNoCompileTimeConstants(JProgram program) {
    new JVisitor() {
      @Override
      public void endVisit(JFieldRef x, Context ctx) {
        assertTrue(x.getField() + " was not replaced everywhere",
            ctx.isLvalue() || !x.getField().isCompileTimeConstant());
      }
View Full Code Here


    return didChange;
  }

  private void assertAllEnumOrdinalizedReferencesReplaced(JProgram program, final Tracker tracker) {
    new JVisitor() {
      @Override
      public void endVisit(JFieldRef x, Context ctx) {
        assertTrue(x.getField() + " was not replaced everywhere",
            ctx.isLvalue() || !tracker.isOrdinalized(x.getEnclosingType().getName()));
      }
View Full Code Here

    /**
     * Figure out which lines are executable. This is mostly straightforward
     * except that we have to avoid some synthetic nodes introduced earlier,
     * otherwise e.g. class declarations will be visited.
     */
    new JVisitor() {
      @Override public void endVisit(JMethodCall x, Context ctx) {
        // this is a bit of a hack. The compiler inserts no-arg super calls, but
        // there isn't really a way to detect that they're synthetic, and the
        // strategy below of comparing source info with that of the enclosing type
        // doesn't work because the enclosing type is set to be that of the superclass.
View Full Code Here

  private void fixUpLoadOrderDependenciesForFieldsInitializedToStrings(TreeLogger logger,
      JProgram jprogram) {
    final int[] numFixups = new int[1];
    final int[] numFieldStrings = new int[1];

    (new JVisitor() {
      @Override
      public void endVisit(JField field, Context ctx) {
        if (field.getInitializer() instanceof JStringLiteral) {
          numFieldStrings[0]++;
View Full Code Here

     * literals.
     */
    private boolean checkCoreModulePreambleComplete(JProgram program,
        JMethod classLiteralInitMethod) {
      final Set<JMethod> calledMethods = Sets.newHashSet();
      new JVisitor() {
        @Override
        public void endVisit(JMethodCall x, Context ctx) {
          calledMethods.add(x.getTarget());
        }
      }.accept(classLiteralInitMethod);
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.ast.JVisitor

Copyright © 2018 www.massapicom. 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.