Package com.google.javascript.jscomp
Class J2clPropertyInlinerPass
java.lang.Object
com.google.javascript.jscomp.J2clPropertyInlinerPass
- All Implemented Interfaces:
CompilerPass
This pass targets J2CL output. It looks for static get and set methods defined within a class
that match the signature of J2CL static fields and inlines them at their call sites. This is done
for performance reasons since getter and setter accesses are slower than regular field accesses.
This will be done by looking at all property accesses and determining if they have a corresponding get or set method on the property qualifiers definition. Some caveats:
- Avoid inlining if the property is set using compound assignments.
- Avoid inlining if the property is incremented using ++ or --
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
J2clPropertyInlinerPass
-
-
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
-