Package com.google.gwt.dev.javac

Examples of com.google.gwt.dev.javac.CompilationState


   */
  public static boolean validate(TreeLogger logger, JJSOptions jjsOptions,
      ModuleDef module, File genDir, File generatorResourcesDir,
      File dumpSignatureFile) {
    try {
      CompilationState compilationState = module.getCompilationState(logger);
      if (dumpSignatureFile != null) {
        // Dump early to avoid generated types.
        SignatureDumper.dumpSignatures(logger,
            compilationState.getTypeOracle(), dumpSignatureFile);
      }

      String[] declEntryPts = module.getEntryPointTypeNames();
      String[] additionalRootTypes = null;
      if (declEntryPts.length == 0) {
        // No declared entry points, just validate all visible classes.
        Collection<CompilationUnit> compilationUnits = compilationState.getCompilationUnits();
        additionalRootTypes = new String[compilationUnits.size()];
        int i = 0;
        for (CompilationUnit unit : compilationUnits) {
          additionalRootTypes[i++] = unit.getTypeName();
        }
      }

      ArtifactSet generatorArtifacts = new ArtifactSet();
      DistillerRebindPermutationOracle rpo = new DistillerRebindPermutationOracle(
          module, compilationState, generatorArtifacts,
          new PropertyPermutations(module.getProperties()), genDir,
          generatorResourcesDir);
      // Allow GC later.
      compilationState = null;
      if (dumpSignatureFile != null) {
        // Dump early to avoid generated types.
        SignatureDumper.dumpSignatures(logger,
            compilationState.getTypeOracle(), dumpSignatureFile);
      }
      // Never optimize on a validation run.
      jjsOptions.setOptimizePrecompile(false);
      getCompiler(module).precompile(logger, module, rpo, declEntryPts,
          additionalRootTypes, jjsOptions, true);
View Full Code Here


      JJSOptions jjsOptions, ModuleDef module, int permutationBase,
      PropertyPermutations allPermutations, File genDir,
      File generatorResourcesDir, File dumpSignatureFile) {

    try {
      CompilationState compilationState = module.getCompilationState(logger);
      if (dumpSignatureFile != null) {
        // Dump early to avoid generated types.
        SignatureDumper.dumpSignatures(logger,
            compilationState.getTypeOracle(), dumpSignatureFile);
      }

      String[] declEntryPts = module.getEntryPointTypeNames();
      if (declEntryPts.length == 0) {
        logger.log(TreeLogger.ERROR, "Module has no entry points defined", null);
View Full Code Here

    return name;
  }

  public synchronized CompilationState getCompilationState(TreeLogger logger)
      throws UnableToCompleteException {
    CompilationState compilationState = CompilationStateBuilder.buildFrom(
        logger, lazySourceOracle.getResources());
    checkForSeedTypes(logger, compilationState);
    return compilationState;
  }
View Full Code Here

  public ModuleSpaceHost createModuleSpaceHost(final String moduleName,
      File genDir, String userAgentString) throws Exception {
    moduleDef = loadModule(moduleName);
    fixUserAgentProperty(moduleDef, userAgentString);
    // Create a sandbox for the module.
    CompilationState compilationState = moduleDef.getCompilationState(getLogger());
    typeOracle = compilationState.getTypeOracle();
    ModuleSpaceHost moduleSpaceHost =
        (ModuleSpaceHost) ShellModuleSpaceHost.class.getConstructors()[0].newInstance(getLogger(),
            compilationState, moduleDef, genDir, new ArtifactAcceptor() {
              public void accept(TreeLogger logger, ArtifactSet newlyGeneratedArtifacts)
                  throws UnableToCompleteException {
View Full Code Here

   */
  public static boolean validate(TreeLogger logger, JJSOptions jjsOptions,
      ModuleDef module, File genDir, File generatorResourcesDir,
      File dumpSignatureFile) {
    try {
      CompilationState compilationState = module.getCompilationState(logger);
      if (dumpSignatureFile != null) {
        // Dump early to avoid generated types.
        SignatureDumper.dumpSignatures(logger, module.getTypeOracle(logger),
            dumpSignatureFile);
      }

      String[] declEntryPts = module.getEntryPointTypeNames();
      String[] additionalRootTypes = null;
      if (declEntryPts.length == 0) {
        // No declared entry points, just validate all visible classes.
        Collection<CompilationUnit> compilationUnits = compilationState.getCompilationUnits();
        additionalRootTypes = new String[compilationUnits.size()];
        int i = 0;
        for (CompilationUnit unit : compilationUnits) {
          additionalRootTypes[i++] = unit.getTypeName();
        }
View Full Code Here

      ModuleDef module, int permutationBase,
      PropertyPermutations allPermutations, File genDir,
      File generatorResourcesDir, File dumpSignatureFile) {

    try {
      CompilationState compilationState = module.getCompilationState(logger);
      if (dumpSignatureFile != null) {
        // Dump early to avoid generated types.
        SignatureDumper.dumpSignatures(logger, module.getTypeOracle(logger),
            dumpSignatureFile);
      }
View Full Code Here

  }

  public synchronized CompilationState getCompilationState(TreeLogger logger)
      throws UnableToCompleteException {
    if (lazyCompilationState == null) {
      lazyCompilationState = new CompilationState(logger, lazySourceOracle);
      checkForSeedTypes(logger);
    }
    return lazyCompilationState;
  }
View Full Code Here

          "No source path entries; expect subsequent failures", null);
    }
    lazyJavaSourceOracle = new JavaSourceOracleImpl(lazySourceOracle);

    // Create the compilation state.
    compilationState = new CompilationState(lazyJavaSourceOracle);

    PerfLogger.end();
  }
View Full Code Here

      //File genDir = new File(outDir);
      File genDir = null;
      // Create a sandbox for the module.
      m_shellDirectory =
          new File(outDir, ".tmp" + File.separator + "shell" + File.separator + moduleName);
      CompilationState compilationState = m_moduleDef.getCompilationState(getLogger());
      m_typeOracle = compilationState.getTypeOracle();
      m_moduleSpaceHost =
          new ShellModuleSpaceHost(getLogger(),
            compilationState,
            m_moduleDef,
            genDir,
View Full Code Here

    return name;
  }

  public synchronized CompilationState getCompilationState(TreeLogger logger)
      throws UnableToCompleteException {
    CompilationState compilationState = CompilationStateBuilder.buildFrom(
        logger, lazySourceOracle.getResources());
    checkForSeedTypes(logger, compilationState);
    return compilationState;
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.javac.CompilationState

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.