Uses of Interface
com.google.javascript.jscomp.CompilerPass
Packages that use CompilerPass
Package
Description
-
Uses of CompilerPass in com.google.javascript.jscomp
Classes in com.google.javascript.jscomp that implement CompilerPassModifier and TypeClassDescriptionfinal class
This class walks the AST and validates that the structure is correct.final class
Provides a framework for checking code against a set of user configured conformance rules.class
A pass to detect references to fully qualified Closure namespaces.final class
Checks for invalid code references to type-only imports (i.e., goog.requireType).class
Compiler pass for Chrome-specific needs.final class
Checks that goog.module() is used correctly.final class
Rewrites static inheritance to explicitly copy inherited properties from superclass to subclass so that the optimizer knows the subclass has those properties.class
Move prototype methods into later chunks.final class
Collects global variable references for use byCrossChunkCodeMotion
.class
An optimization pass that finds and removes dead property assignments within functions and classes.final class
Checks that ES6 Modules are used correctly, and do not reference undefined keywords or features.final class
Convertssuper.method()
calls and adds constructors to any classes that lack them.final class
Extracts ES6 classes defined in function calls to local constants.final class
Converts ES6 "for of" loops to ES5.class
Rewrites ES6 import paths to be relative after resolving according to the compiler's module resolver.final class
Renames variables declared in function bodies so they don't shadow any variable referenced in the param list.class
Converts ES6 arrow functions to standard anonymous ES3 functions.final class
Rewrite "let"s and "const"s as "var"s.final class
Rewrite block-scoped function declarations as "let"s.final class
Converts ES6 classes to valid ES5 or ES3 code.final class
Extracts ES6 class extends expressions and creates an alias.final class
Rewrites destructuring patterns and default parameters to valid ES3 code or to a different form of destructuring.final class
Rewrites a ES6 module into a form that can be safely concatenated.class
Rewrites an ES6 module to a CommonJS-like module for the sake of per-file transpilation + bunlding (e.g.final class
Converts REST parameters and SPREAD expressions.final class
Rewrites a script which was imported as a module into an ES6 module.final class
Splits variable declarations that declare multiple variables into separate declarations, if at least one of the declarations is a destructuring declaration.final class
Replaces the ES7 `**` and `**=` operators to calls to `Math.pow`.class
Generates goog.exportSymbol for test functions, so they can be recognized by the test runner, even if the code is compiled.final class
Walks the AST looking for usages of qualified names, and 'goog.require's of those names.class
Warns at any usage of Dynamic Import expressions that they are unable to be transpiled.final class
Finds getter and setter properties in the AST.final class
Gathers metadata around modules that is useful for checking imports / requires and creates aModuleMetadataMap
.class
Generates goog.exportSymbol/goog.exportProperty for the @export annotation.final class
Warn about types in JSDoc that are implicitly nullable.final class
Injects JS library code that may be needed by the transpiled form of the input source code.class
Instrumentsawait
andyield
for theAsyncContext
polyfill.class
An optimization pass to remove J2CL Asserts.$assert.class
Performs correctness checks which are specific to J2CL-generated patterns.class
An optimization pass to prune J2CL clinits.class
An optimization pass for J2CL-generated code to hoist some constant assignments out clinit method to declaration phase so they could be used by other optimization passes for static evaluation.class
A normalization pass to inline some J2CL calls to enable other optimizations.class
This pass targets J2CL output.class
A normalization pass to re-write Util.$getDefine calls to make them work in compiled mode.class
Locates JS code that is intended to declare localizable messages.final class
Converts ES6 code to valid ES5 code.final class
Rewrites a CommonJS module http://wiki.commonjs.org/wiki/Modules/1.1.1 into a form that can be safely concatenated.final class
A helper class for passes that want to access all information about where a variable is referenced and declared at once and then make a decision as to how it should be handled, possibly inlining, reordering, or generating warnings.final class
Normalizes all CAST nodes out of the AST.final class
Converts async functions to valid ES6 generator functions code.final class
Converts async generator functions into a function returning a new $jscomp.AsyncGenWrapper around the original block and awaits/yields converted to yields of ActionRecords.final class
Replaces the ES2022 class fields and class static blocks with constructor declaration.class
Rewrite dynamic import expressions to account for bundling and module rewriting.class
Looks for references to Closure's goog.js file and globalizes.class
Rewrites a JSON file to be a module export.final class
Replaces the ES2020 `||=`, `invalid input: '&'invalid input: '&'=`, and `??=` operators.final class
Replaces the ES2020 `??` operator with conditional (?:).final class
Converts object spread to valid ES2017 code.class
Injects polyfill libraries to ensure that ES6+ library functions are available.final class
Checks the types of JS expressions against any declared type information.class
Replicates the effect of ClosureBundler in whitespace-only mode and wraps goog.modules in goog.loadModule calls.Fields in com.google.javascript.jscomp with type parameters of type CompilerPassModifier and TypeFieldDescriptionprotected @Nullable com.google.common.collect.Multimap
<CustomPassExecutionTime, CompilerPass> CompilerOptions.customPasses
Custom passesMethods in com.google.javascript.jscomp that return CompilerPassModifier and TypeMethodDescriptionfinal CompilerPass
PassFactory.create
(AbstractCompiler compiler) Creates a new compiler pass to be run.ReplaceMessages.getFullReplacementPass()
When the returned pass is executed, the original `goog.getMsg()` etc.ReplaceMessages.getMsgProtectionPass()
When the returned pass is executed, the original `goog.getMsg()` etc.ReplaceMessages.getReplacementCompletionPass()
When the returned pass is executed, the protected messages created by `getMsgProtectionPass()` will be replaced by the final message form read from the appropriate message bundle.Methods in com.google.javascript.jscomp with parameters of type CompilerPassModifier and TypeMethodDescriptionvoid
CompilerOptions.addCustomPass
(CustomPassExecutionTime time, CompilerPass customPass) Method parameters in com.google.javascript.jscomp with type arguments of type CompilerPassModifier and TypeMethodDescriptionabstract PassFactory.Builder
PassFactory.Builder.setInternalFactory
(Function<AbstractCompiler, ? extends CompilerPass> x) -
Uses of CompilerPass in com.google.javascript.jscomp.disambiguate
Classes in com.google.javascript.jscomp.disambiguate that implement CompilerPassModifier and TypeClassDescriptionclass
Renames unrelated properties to the same name, usingColor
s provided by the typechecker.final class
Assembles the various parts of the diambiguator to execute them as a compiler pass. -
Uses of CompilerPass in com.google.javascript.jscomp.ijs
Classes in com.google.javascript.jscomp.ijs that implement CompilerPassModifier and TypeClassDescriptionclass
The goal of this pass is to shrink the AST, preserving only typing, not behavior. -
Uses of CompilerPass in com.google.javascript.jscomp.instrumentation
Classes in com.google.javascript.jscomp.instrumentation that implement CompilerPassModifier and TypeClassDescriptionclass
This code implements the instrumentation pass over the AST (returned by JSCompiler). -
Uses of CompilerPass in com.google.javascript.jscomp.lint
Classes in com.google.javascript.jscomp.lint that implement CompilerPassModifier and TypeClassDescriptionfinal class
Lints against passing arrays to goog.object methods with the intention of iterating over them as though with a for-in loop, which is discouraged with arrays.class
This pass looks for module-level variable declarations that use CONSTANT_CASE, according to the Google style guide, and verifies that they are also annotated @const or are in a const clause.class
This pass looks for properties that are not modified and ensures they use the @const annotation.final class
Check for duplicate case labels in a switch statement Eg: switch (foo) { case 1: case 1: }final class
Check for empty statements (i.e.final class
Checks the following: Whether there are duplicate values in enums.final class
Checks the file structure of ES6 modules.final class
Miscellaneous checks for style in ES6 modules.class
Walks the AST looking for usages of qualified names, and 'goog.require's of those names.final class
Checks that goog.module statement matches the generated TypeScript module namespace, which is based on the file path.final class
Checks for errors related to interfaces.final class
Checks for various JSDoc-related style issues, such as function definitions without JsDoc, params with no corresponding@param
annotation, coding conventions not being respected, etc.final class
Check for statements that should end with a semicolon according to the Google style guide.final class
Checks if code has a module-level static property assignment (`X.Y`) inside a `goog.module`.final class
Checks that exports of ES6 modules are not mutated outside of module initialization.class
Checks for missing or redundant nullability modifiers.final class
Check for explicit creation of the object equivalents of primitive types (e.g.final class
Checks when a mutable property is assigned to a prototype.final class
Check for unused labels blocks.class
This pass looks for properties that are never read.final class
Check for useless blocks.final class
Check for `var` (prefer `const` or `let`). -
Uses of CompilerPass in com.google.javascript.jscomp.modules
Classes in com.google.javascript.jscomp.modules that implement CompilerPass -
Uses of CompilerPass in com.google.javascript.jscomp.serialization
Classes in com.google.javascript.jscomp.serialization that implement CompilerPassModifier and TypeClassDescriptionfinal class
Pass to convert JSType objects from TypeChecking that are attached to the AST into Color objects whose sole use is to enable running optimizations and delete all other references to JSTypes.final class
A compiler pass intended to serialize the types in the AST.