Class PassConfig

java.lang.Object
com.google.javascript.jscomp.PassConfig
Direct Known Subclasses:
DefaultPassConfig, PassConfig.PassConfigDelegate

public abstract class PassConfig extends Object
Pass factories and meta-data for native Compiler passes.
  • Field Details

  • Constructor Details

  • Method Details

    • getWhitespaceOnlyPasses

      protected PassListBuilder getWhitespaceOnlyPasses()
      Gets additional checking passes that are run always, even in "whitespace only" mode. For very specific cases where processing is required even in a mode which is intended not to have any processing - specifically introduced to support goog.module() usage.
    • getTranspileOnlyPasses

      protected PassListBuilder getTranspileOnlyPasses()
      Gets the transpilation passes
    • getChecks

      protected abstract PassListBuilder getChecks()
      Gets the checking passes to run.

      Checking passes revolve around emitting warnings and errors. They also may include pre-processor passes needed to do error analysis more effectively.

      Clients that only want to analyze code (like IDEs) and not emit code will only run checks and not optimizations.

    • getOptimizations

      protected abstract PassListBuilder getOptimizations(PassConfig.OptimizationPasses optimizationPasses)
      Gets the optimization passes to run.

      Optimization passes revolve around producing smaller and faster code. They should always run after checking passes.

    • getFinalizations

      protected abstract PassListBuilder getFinalizations()
      Gets the finalization passes to run.

      Finalization passes include the injection of locale-specific code and converting the AST to its final form for output.