- All Implemented Interfaces:
- CompilerPass
public class InlineProperties
extends 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).
- Author:
- [email protected] (John Lenz)