Package com.google.javascript.jscomp
Class PassConfig
- java.lang.Object
-
- com.google.javascript.jscomp.PassConfig
-
- Direct Known Subclasses:
DefaultPassConfig
,PassConfig.PassConfigDelegate
public abstract class PassConfig extends java.lang.Object
Pass factories and meta-data for native Compiler passes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PassConfig.PassConfigDelegate
An implementation of PassConfig that just proxies all its method calls into an inner class.
-
Field Summary
Fields Modifier and Type Field Description protected CompilerOptions
options
-
Constructor Summary
Constructors Constructor Description PassConfig(CompilerOptions options)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.List<PassFactory>
getChecks()
Gets the checking passes to run.protected abstract java.util.List<PassFactory>
getFinalizations()
Gets the finalization passes to run.protected abstract java.util.List<PassFactory>
getOptimizations()
Gets the optimization passes to run.protected java.util.List<PassFactory>
getTranspileOnlyPasses()
Gets the transpilation passesprotected java.util.List<PassFactory>
getWhitespaceOnlyPasses()
Gets additional checking passes that are run always, even in "whitespace only" mode.
-
-
-
Field Detail
-
options
protected final CompilerOptions options
-
-
Constructor Detail
-
PassConfig
public PassConfig(CompilerOptions options)
-
-
Method Detail
-
getWhitespaceOnlyPasses
protected java.util.List<PassFactory> 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 java.util.List<PassFactory> getTranspileOnlyPasses()
Gets the transpilation passes
-
getChecks
protected abstract java.util.List<PassFactory> 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 java.util.List<PassFactory> getOptimizations()
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 java.util.List<PassFactory> 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.
-
-