Class InlineProperties

java.lang.Object
com.google.javascript.jscomp.InlineProperties
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).
  • Method Details

    • 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 interface CompilerPass
      Parameters:
      externs - Top of external JS tree
      root - Top of JS tree