Class ConvertTypesToColors
- java.lang.Object
-
- com.google.javascript.jscomp.serialization.ConvertTypesToColors
-
- All Implemented Interfaces:
CompilerPass
public final class ConvertTypesToColors extends java.lang.Object implements CompilerPass
Pass to convert JSType objects from TypeChecking that are attached to the AST into Color objects whose sole use is to enable running optimizations.Eventually, we anticipate this pass to run at the beginning of optimizations, and leave a representation of the types as needed for optimizations on the AST.
This pass is also responsible for logging debug information that needs to know about both JSType objects and their corresponding colors.
-
-
Constructor Summary
Constructors Constructor Description ConvertTypesToColors(AbstractCompiler compiler, SerializationOptions serializationOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(Node externs, Node root)
Process the JS with root node root.
-
-
-
Constructor Detail
-
ConvertTypesToColors
public ConvertTypesToColors(AbstractCompiler compiler, SerializationOptions serializationOptions)
-
-
Method Detail
-
process
public void process(Node externs, Node root)
Description copied from interface:CompilerPass
Process the JS with root node root. Can modify the contents of each Node tree- Specified by:
process
in interfaceCompilerPass
- Parameters:
externs
- Top of external JS treeroot
- Top of JS tree
-
-