public class AmbiguateProperties extends java.lang.Object implements CompilerPass
Properties are considered unrelated if they are never referenced from the same type or from a subtype of each others' types, thus this pass is only effective if type checking is enabled.
Example:
Foo.fooprop = 0;
Foo.fooprop2 = 0;
Bar.barprop = 0;
becomes:
Foo.a = 0;
Foo.b = 0;
Bar.a = 0;
Constructor and Description |
---|
AmbiguateProperties(AbstractCompiler compiler,
char[] reservedFirstCharacters,
char[] reservedNonFirstCharacters,
java.util.Set<java.lang.String> externProperties) |
Modifier and Type | Method and Description |
---|---|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
public AmbiguateProperties(AbstractCompiler compiler, char[] reservedFirstCharacters, char[] reservedNonFirstCharacters, java.util.Set<java.lang.String> externProperties)
public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treeCopyright © 2009-2020 Google. All Rights Reserved.