Package com.google.javascript.jscomp
Class InlineProperties
java.lang.Object
com.google.javascript.jscomp.InlineProperties
- All Implemented Interfaces:
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
-
Method Details
-
process
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
-