Package com.google.javascript.jscomp
Class InlineProperties
- java.lang.Object
-
- com.google.javascript.jscomp.InlineProperties
-
- All Implemented Interfaces:
CompilerPass
public class InlineProperties extends java.lang.Object implements CompilerPass
InlineProperties attempts to find references to properties that are known to be constants and inline the known value. This pass relies on type information to find these property references and properties are assumed to be constant if either: - the property is assigned unconditionally in the instance constructor - the property is assigned unconditionally to the type's prototype The current implementation only inlines immutable values (as defined by NodeUtil.isImmutableValue).
-
-
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.
-
-
-
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
-
-