Package com.google.javascript.jscomp
Interface HotSwapCompilerPass
-
- All Superinterfaces:
CompilerPass
- All Known Implementing Classes:
CheckArrayWithGoogObject,CheckConstantCaseNames,CheckDuplicateCase,CheckExtraRequires,CheckInterfaces,CheckMissingAndExtraRequires,CheckNullableReturn,CheckPrimitiveAsObject,CheckPrototypeProperties,CheckUnusedLabels,CheckUselessBlocks,ClosureCheckModule,DartSuperAccessorsPass,Es6CheckModule,Es6ConvertSuper,Es6ExtractClasses,Es6ForOfConverter,Es6NormalizeShorthandProperties,Es6RenameVariablesInParamLists,Es6RewriteArrowFunction,Es6RewriteBlockScopedDeclaration,Es6RewriteBlockScopedFunctionDeclaration,Es6RewriteClass,Es6RewriteClassExtendsExpressions,Es6RewriteDestructuring,Es6RewriteModules,Es6RewriteRestAndSpread,Es6RewriteScriptsToModules,Es6SplitVariableDeclarations,Es6ToEs3ClassSideInheritance,Es6TypedToEs6Converter,Es7RewriteExponentialOperator,FieldCleanupPass,GatherModuleMetadata,InjectTranspilationRuntimeLibraries,LateEs6ToEs3Converter,MarkUntranspilableFeaturesAsRemoved,ModuleMapCreator,ReferenceCollectingCallback,RewriteAsyncFunctions,RewriteAsyncIteration,RewriteGoogJsImports,RewriteNullishCoalesceOperator,RewriteObjectSpread,RewritePolyfills,WhitespaceWrapGoogModules
public interface HotSwapCompilerPass extends CompilerPass
Interface for compiler passes that can be used in a hot-swap fashion.The additional method is
hotSwapScriptwhich runs this pass on a subtree of the AST. Each pass that is intended to support hot-swap style should implement this interface.It is assumed that
Nodeargument ofhotSwapScriptis the root of a sub-tree in AST that represents a JS file and so is of typeToken.SCRIPT.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhotSwapScript(Node scriptRoot, Node originalRoot)Process the JS with root node root.-
Methods inherited from interface com.google.javascript.jscomp.CompilerPass
process
-
-
-
-
Method Detail
-
hotSwapScript
void hotSwapScript(Node scriptRoot, Node originalRoot)
Process the JS with root node root. This is supposed to be significantly faster compared to corresponding full-compiler passes.- Parameters:
scriptRoot- Root node corresponding to the file that is modified, should be of typeToken.SCRIPT.originalRoot- Root node corresponding to the original version of the file that is modified. Should be of typetoken.SCRIPT.
-
-