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 classThis class walks the AST and validates that the structure is correct.final classProvides a framework for checking code against a set of user configured conformance rules.classA pass to detect references to fully qualified Closure namespaces.final classChecks for invalid code references to type-only imports (i.e., goog.requireType).classCompiler pass for Chrome-specific needs.final classChecks that goog.module() is used correctly.final classRewrites static inheritance to explicitly copy inherited properties from superclass to subclass so that the optimizer knows the subclass has those properties.classMove prototype methods into later chunks.final classCollects global variable references for use byCrossChunkCodeMotion.classAn optimization pass that finds and removes dead property assignments within functions and classes.final classChecks that ES6 Modules are used correctly, and do not reference undefined keywords or features.final classConvertssuper.method()calls and adds constructors to any classes that lack them.final classExtracts ES6 classes defined in function calls to local constants.final classConverts ES6 "for of" loops to ES5.classRewrites ES6 import paths to be relative after resolving according to the compiler's module resolver.final classRenames variables declared in function bodies so they don't shadow any variable referenced in the param list.classConverts ES6 arrow functions to standard anonymous ES3 functions.final classRewrite "let"s and "const"s as "var"s.final classRewrite block-scoped function declarations as "let"s.final classConverts ES6 classes to valid ES5 or ES3 code.final classExtracts ES6 class extends expressions and creates an alias.final classRewrites destructuring patterns and default parameters to valid ES3 code or to a different form of destructuring.final classRewrites a ES6 module into a form that can be safely concatenated.classRewrites an ES6 module to a CommonJS-like module for the sake of per-file transpilation + bunlding (e.g.final classConverts REST parameters and SPREAD expressions.final classRewrites a script which was imported as a module into an ES6 module.final classSplits variable declarations that declare multiple variables into separate declarations, if at least one of the declarations is a destructuring declaration.final classReplaces the ES7 `**` and `**=` operators to calls to `Math.pow`.classGenerates goog.exportSymbol for test functions, so they can be recognized by the test runner, even if the code is compiled.final classWalks the AST looking for usages of qualified names, and 'goog.require's of those names.classWarns at any usage of Dynamic Import expressions that they are unable to be transpiled.final classFinds getter and setter properties in the AST.final classGathers metadata around modules that is useful for checking imports / requires and creates aModuleMetadataMap.classGenerates goog.exportSymbol/goog.exportProperty for the @export annotation.final classWarn about types in JSDoc that are implicitly nullable.final classInjects JS library code that may be needed by the transpiled form of the input source code.classInstrumentsawaitandyieldfor theAsyncContextpolyfill.classAn optimization pass to remove J2CL Asserts.$assert.classPerforms correctness checks which are specific to J2CL-generated patterns.classAn optimization pass to prune J2CL clinits.classAn 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.classA normalization pass to inline some J2CL calls to enable other optimizations.classThis pass targets J2CL output.classA normalization pass to re-write Util.$getDefine calls to make them work in compiled mode.classLocates JS code that is intended to declare localizable messages.final classConverts ES6 code to valid ES5 code.final classRewrites a CommonJS module http://wiki.commonjs.org/wiki/Modules/1.1.1 into a form that can be safely concatenated.final classA 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 classNormalizes all CAST nodes out of the AST.final classConverts async functions to valid ES6 generator functions code.final classConverts async generator functions into a function returning a new $jscomp.AsyncGenWrapper around the original block and awaits/yields converted to yields of ActionRecords.final classReplaces the ES2022 class fields and class static blocks with constructor declaration.classRewrite dynamic import expressions to account for bundling and module rewriting.classLooks for references to Closure's goog.js file and globalizes.classRewrites a JSON file to be a module export.final classReplaces the ES2020 `||=`, `invalid input: '&'invalid input: '&'=`, and `??=` operators.final classReplaces the ES2020 `??` operator with conditional (?:).final classConverts object spread to valid ES2017 code.classInjects polyfill libraries to ensure that ES6+ library functions are available.final classChecks the types of JS expressions against any declared type information.classReplicates 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.customPassesCustom passesMethods in com.google.javascript.jscomp that return CompilerPassModifier and TypeMethodDescriptionfinal CompilerPassPassFactory.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 TypeMethodDescriptionvoidCompilerOptions.addCustomPass(CustomPassExecutionTime time, CompilerPass customPass) Method parameters in com.google.javascript.jscomp with type arguments of type CompilerPassModifier and TypeMethodDescriptionabstract PassFactory.BuilderPassFactory.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 TypeClassDescriptionclassRenames unrelated properties to the same name, usingColors provided by the typechecker.final classAssembles 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 TypeClassDescriptionclassThe 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 TypeClassDescriptionclassThis 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 classLints 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.classThis 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.classThis pass looks for properties that are not modified and ensures they use the @const annotation.final classCheck for duplicate case labels in a switch statement Eg: switch (foo) { case 1: case 1: }final classCheck for empty statements (i.e.final classChecks the following: Whether there are duplicate values in enums.final classChecks the file structure of ES6 modules.final classMiscellaneous checks for style in ES6 modules.classWalks the AST looking for usages of qualified names, and 'goog.require's of those names.final classChecks that goog.module statement matches the generated TypeScript module namespace, which is based on the file path.final classChecks for errors related to interfaces.final classChecks for various JSDoc-related style issues, such as function definitions without JsDoc, params with no corresponding@paramannotation, coding conventions not being respected, etc.final classCheck for statements that should end with a semicolon according to the Google style guide.final classChecks if code has a module-level static property assignment (`X.Y`) inside a `goog.module`.final classChecks that exports of ES6 modules are not mutated outside of module initialization.classChecks for missing or redundant nullability modifiers.final classCheck for explicit creation of the object equivalents of primitive types (e.g.final classChecks when a mutable property is assigned to a prototype.final classCheck for unused labels blocks.classThis pass looks for properties that are never read.final classCheck for useless blocks.final classCheck 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 classPass 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 classA compiler pass intended to serialize the types in the AST.