Package com.google.gwt.dev.cfg

Examples of com.google.gwt.dev.cfg.PropertyPermutations


    }

    ArtifactSet generatorArtifacts = new ArtifactSet();
    rebindPermOracle = new DistillerRebindPermutationOracle(generatorArtifacts);
    properties = module.getProperties();
    perms = new PropertyPermutations(properties);
    WebModeCompilerFrontEnd frontEnd = new WebModeCompilerFrontEnd(compilationState, rebindPermOracle);
    jjs = new JavaToJavaScriptCompiler(logger, frontEnd, declEntryPts, jjsOptions);

    StandardLinkerContext linkerContext = new StandardLinkerContext(logger, module, outDir, generatorResourcesDir, jjsOptions);
    compilePermutations(logger, linkerContext, generatorArtifacts);
View Full Code Here


   * @return the precompilation
   */
  public static Precompilation precompile(TreeLogger logger,
      JJSOptions jjsOptions, ModuleDef module, File genDir,
      File generatorResourcesDir, File dumpSignatureFile) {
    PropertyPermutations allPermutations = new PropertyPermutations(
        module.getProperties());
    return precompile(logger, jjsOptions, module, 0, allPermutations, genDir,
        generatorResourcesDir, dumpSignatureFile);
  }
View Full Code Here

      }

      ArtifactSet generatorArtifacts = new ArtifactSet();
      DistillerRebindPermutationOracle rpo = new DistillerRebindPermutationOracle(
          module, compilationState, generatorArtifacts,
          new PropertyPermutations(module.getProperties()), genDir,
          generatorResourcesDir);
      // Never optimize on a validation run.
      jjsOptions.setOptimizePrecompile(false);
      getCompiler(module).precompile(logger, module, rpo, declEntryPts,
          additionalRootTypes, jjsOptions, true);
View Full Code Here

        }
        branch.log(TreeLogger.INFO, "Validation succeeded");
      } else {
        TreeLogger branch = logger.branch(TreeLogger.INFO,
            "Precompiling module " + module.getName());
        PropertyPermutations allPermutations = new PropertyPermutations(
            module.getProperties());
        int potentialPermutations = allPermutations.size();
        int permutationsPerIteration = options.getMaxPermsPerPrecompile();

        if (permutationsPerIteration <= 0) {
          permutationsPerIteration = potentialPermutations;
        }
        /*
         * The potential number of permutations to precompile >= the actual
         * number of permutations that end up being precompiled, because some of
         * the permutations might collapse due to identical rebind results. So
         * we have to track these two counts and ids separately.
         */
        int actualPermutations = 0;
        for (int potentialFirstPerm = 0; potentialFirstPerm < potentialPermutations; potentialFirstPerm += permutationsPerIteration) {
          int numPermsToPrecompile = Math.min(potentialPermutations
              - potentialFirstPerm, permutationsPerIteration);

          /*
           * After the first precompile, we need to forcibly refresh
           * CompilationState to clear out generated units from previous
           * precompilations.
           */
          if (potentialFirstPerm != 0) {
            module.getCompilationState(branch).refresh(branch);
          }

          if (potentialFirstPerm + numPermsToPrecompile < potentialPermutations) {
            /*
             * On all iterations but the last, force retainCompilationState to
             * be true. Otherwise, state will be discarded that is needed on
             * later iterations.
             */
            options.setCompilationStateRetained(true);
          } else {
            // On the last iteration, use whatever the original setting was
            options.setCompilationStateRetained(originalCompilationStateRetained);
          }

          // Select only the range of property permutations that we want
          PropertyPermutations localPermutations = new PropertyPermutations(
              allPermutations, potentialFirstPerm, numPermsToPrecompile);

          Precompilation precompilation = precompile(branch, options, module,
              actualPermutations, localPermutations, options.getGenDir(),
              compilerWorkDir, options.getDumpSignatureFile());
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.cfg.PropertyPermutations

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.