Package com.google.gwt.dev.cfg

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


         */
        TreeLogger branch =
            logger.branch(TreeLogger.INFO, "Precompiling (minimal) module " + module.getName());
        Util.writeObjectAsFile(logger, precompilationFile, options);
        int numPermutations =
            new PropertyPermutations(module.getProperties(), module.getActiveLinkerNames())
                .collapseProperties().size();
        Util.writeStringAsFile(logger, new File(compilerWorkDir, PERM_COUNT_FILENAME), String
            .valueOf(numPermutations));
        if (branch.isLoggable(TreeLogger.INFO)) {
          branch.log(TreeLogger.INFO,
View Full Code Here


   * shards. Returns true if successful.
   */
  private boolean doLinkFinal(TreeLogger logger, File compilerWorkDir, ModuleDef module,
      ResourceOracle publicResourceOracle, PrecompileTaskOptions precompileOptions)
      throws UnableToCompleteException {
    int numPermutations = new PropertyPermutations(module.getProperties(),
        module.getActiveLinkerNames()).collapseProperties().size();
    List<File> resultFiles = new ArrayList<File>(numPermutations);
    for (int i = 0; i < numPermutations; ++i) {
      File f = CompilePerms.makePermFilename(compilerWorkDir, i);
      if (!f.exists()) {
View Full Code Here

    // Only precompile specified permutations
    List<PropertyPermutations> collapsedPermutations =
      Precompile.getCollapsedPermutations(module);

    PropertyPermutations onePerm = collapsedPermutations.get(permId);
    Precompilation precompilation = Precompile.precompile(branch, compilerContext, permId, onePerm);
    if (precompilation == null) {
      branch.log(TreeLogger.ERROR, "Precompilation failed");
      return false;
    }
View Full Code Here

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

      }

      ArtifactSet generatorArtifacts = new ArtifactSet();
      DistillerRebindPermutationOracle rpo =
          new DistillerRebindPermutationOracle(module, compilationState, generatorArtifacts,
              new PropertyPermutations(module.getProperties(), module.getActiveLinkerNames()),
              genDir);
      // Allow GC later.
      compilationState = null;
      // Never optimize on a validation run.
      jjsOptions.setOptimizePrecompile(false);
View Full Code Here

  /**
   * Create a list of all possible permutations configured for this module after
   * collapsing soft permutations.
   */
  static List<PropertyPermutations> getCollapsedPermutations(ModuleDef module) {
    PropertyPermutations allPermutations =
        new PropertyPermutations(module.getProperties(), module.getActiveLinkerNames());
    List<PropertyPermutations> collapsedPermutations = allPermutations.collapseProperties();
    return collapsedPermutations;
  }
View Full Code Here

         */
        TreeLogger branch =
            logger.branch(TreeLogger.INFO, "Precompiling (minimal) module " + module.getName());
        Util.writeObjectAsFile(logger, precompilationFile, options);
        int numPermutations =
            new PropertyPermutations(module.getProperties(), module.getActiveLinkerNames())
                .collapseProperties().size();
        Util.writeStringAsFile(logger, new File(compilerWorkDir, PERM_COUNT_FILENAME), String
            .valueOf(numPermutations));
        branch.log(TreeLogger.INFO, "Precompilation (minimal) succeeded, number of permutations: "
            + numPermutations);
View Full Code Here

      /*
       * Count the permutations to expose to external build tools performing a
       * sharded compile.
       */
      int numPermutations = new PropertyPermutations(module.getProperties(),
          module.getActiveLinkerNames()).collapseProperties().size();
      Util.writeStringAsFile(logger, new File(compilerWorkDir,
          AnalyzeModule.PERM_COUNT_FILENAME), String.valueOf(numPermutations));
      Util.writeObjectAsFile(logger, new File(compilerWorkDir,
          AnalyzeModule.OPTIONS_FILENAME), options);
View Full Code Here

      throws UnableToCompleteException {
    precompilationOptions.setOptimizePrecompile(false);
    precompilationOptions.setGenDir(null);

    ModuleDef module = ModuleDefLoader.loadFromClassPath(logger, moduleName);
    PropertyPermutations allPermutations = new PropertyPermutations(
        module.getProperties(), module.getActiveLinkerNames());
    List<PropertyPermutations> collapsedPermutations = allPermutations.collapseProperties();
    int[] perms = options.getPermsToCompile();
    if (perms == null) {
      perms = new int[collapsedPermutations.size()];
      for (int i = 0; i < perms.length; ++i) {
        perms[i] = i;
      }
    }

    logger = logger.branch(TreeLogger.INFO, "Compiling " + perms.length
        + " permutation" + (perms.length > 1 ? "s" : ""));
    for (int permId : perms) {
      /*
       * TODO(spoon,scottb): move Precompile out of the loop to run only once
       * per shard. Then figure out a way to avoid copying the generated
       * artifacts into every perm result on a shard.
       */
      PropertyPermutations onePerm = collapsedPermutations.get(permId);

      Precompilation precompilation = Precompile.precompile(logger,
          precompilationOptions, module, permId, onePerm,
          precompilationOptions.getGenDir());
      if (precompilation == null) {
View Full Code Here

    // Only precompile specified permutations
    List<PropertyPermutations> collapsedPermutations =
      Precompile.getCollapsedPermutations(module);

    PropertyPermutations onePerm = collapsedPermutations.get(permId);
    Precompilation precompilation = Precompile.precompile(branch, options,
        module, permId, onePerm, options.getGenDir());
    if (precompilation == null) {
      branch.log(TreeLogger.ERROR, "Precompilation failed");
      return false;
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.