Package com.google.gwt.dev.jjs.impl

Examples of com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor


    JProgram jprogram = new JProgram();
    JsProgram jsProgram = new JsProgram();

    try {
      // (2) Assemble the Java AST.
      UnifyAst unifyAst = new UnifyAst(jprogram, jsProgram, options, rpo);
      unifyAst.addRootTypes(allRootTypes);
      // TODO: move this into UnifyAst?
      findEntryPoints(logger, rpo, declEntryPts, jprogram);
      unifyAst.exec(logger);

      List<String> finalTypeOracleTypes = Lists.create();
      if (precompilationMetrics != null) {
        for (com.google.gwt.core.ext.typeinfo.JClassType type : typeOracle.getTypes()) {
          finalTypeOracleTypes =
View Full Code Here


    private void unifyJavaAst(Set<String> allRootTypes, String entryMethodHolderTypeName)
        throws UnableToCompleteException {

      Event event = SpeedTracerLogger.start(CompilerEventType.UNIFY_AST);

      UnifyAst unifyAst;
      try {
        unifyAst = new UnifyAst(logger, compilerContext, jprogram, jsProgram, rpo);
      } catch (CollidingCompilationUnitException e) {
        logger.log(TreeLogger.ERROR, e.getMessage());
        throw new UnableToCompleteException();
      }
      // Makes JProgram aware of these types so they can be accessed via index.
      unifyAst.addRootTypes(allRootTypes);
      // Must synthesize entryPoint.onModuleLoad() calls because some EntryPoint classes are
      // private.
      if (entryMethodHolderTypeName != null) {
        // Only synthesize the init method in the EntryMethodHolder class, if there is an
        // EntryMethodHolder class.
        synthesizeEntryMethodHolderInit(unifyAst, entryMethodHolderTypeName);
      }
      if (entryMethodHolderTypeName != null) {
        // Only register the init method in the EntryMethodHolder class as an entry method, if there
        // is an EntryMethodHolder class.
        jprogram.addEntryMethod(jprogram.getIndexedMethod(
            SourceName.getShortClassName(entryMethodHolderTypeName) + ".init"));
      }
      unifyAst.exec();

      event.end();
    }
View Full Code Here

      }
    };

    JProgram jprogram = new JProgram(compilerContext.getMinimalRebuildCache());
    JsProgram jsProgram = new JsProgram();
    UnifyAst unifyAst = new UnifyAst(logger, compilerContext, jprogram, jsProgram, rpo);
    unifyAst.buildEverything();

    // Compute all super type/sub type info
    jprogram.typeOracle.computeBeforeAST(StandardTypes.createFrom(jprogram),
        jprogram.getDeclaredTypes(), jprogram.getModuleDeclaredTypes());
View Full Code Here

      }
    };

    JProgram jprogram = new JProgram();
    JsProgram jsProgram = new JsProgram();
    UnifyAst unifyAst = new UnifyAst(logger, compilerContext, jprogram, jsProgram, rpo);
    unifyAst.buildEverything();

    // Compute all super type/sub type info
    jprogram.typeOracle.computeBeforeAST();

    // (3) Perform Java AST normalizations.
View Full Code Here

      }
    }

    private void unifyJavaAst(Set<String> allRootTypes, String entryMethodHolderTypeName)
        throws UnableToCompleteException {
      UnifyAst unifyAst;
      try {
        unifyAst = new UnifyAst(logger, compilerContext, jprogram, jsProgram, rpo);
      } catch (CollidingCompilationUnitException e) {
        logger.log(TreeLogger.ERROR, e.getMessage());
        throw new UnableToCompleteException();
      }
      // Makes JProgram aware of these types so they can be accessed via index.
      unifyAst.addRootTypes(allRootTypes);
      // Must synthesize entryPoint.onModuleLoad() calls because some EntryPoint classes are
      // private.
      if (entryMethodHolderTypeName != null) {
        // Only synthesize the init method in the EntryMethodHolder class, if there is an
        // EntryMethodHolder class.
        synthesizeEntryMethodHolderInit(unifyAst, entryMethodHolderTypeName);
      }
      // Ensures that unification traversal starts from these methods.
      jprogram.addEntryMethod(jprogram.getIndexedMethod("Impl.registerEntry"));
      if (entryMethodHolderTypeName != null) {
        // Only register the init method in the EntryMethodHolder class as an entry method, if there
        // is an EntryMethodHolder class.
        jprogram.addEntryMethod(jprogram.getIndexedMethod(
            SourceName.getShortClassName(entryMethodHolderTypeName) + ".init"));
      }
      unifyAst.exec();
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor

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.