class InstrumentFunctions extends java.lang.Object implements CompilerPass
Modifier and Type | Class and Description |
---|---|
private class |
InstrumentFunctions.InstrumentCallback |
private class |
InstrumentFunctions.InstrumentReturns
Traverse a function's body by instrument return sites by
inserting calls to
reportFunctionExitName . |
private static class |
InstrumentFunctions.RemoveCallback
The application must refer to these variables to output them so the
application must also declare these variables for the first
VarCheck pass. |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
appNameSetter |
private java.lang.String |
appNameStr |
private AbstractCompiler |
compiler |
private java.util.List<java.lang.String> |
declarationsToRemove |
private java.lang.String |
definedFunctionName |
private FunctionNames |
functionNames |
private java.lang.String |
initCodeSource |
private java.lang.String |
reportFunctionExitName |
private java.lang.String |
reportFunctionName |
Constructor and Description |
---|
InstrumentFunctions(AbstractCompiler compiler,
FunctionNames functionNames,
Instrumentation template,
java.lang.String appNameStr)
Creates an instrument functions compiler pass.
|
Modifier and Type | Method and Description |
---|---|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
private final AbstractCompiler compiler
private final FunctionNames functionNames
private final java.lang.String appNameStr
private final java.lang.String initCodeSource
private final java.lang.String definedFunctionName
private final java.lang.String reportFunctionName
private final java.lang.String reportFunctionExitName
private final java.lang.String appNameSetter
private final java.util.List<java.lang.String> declarationsToRemove
InstrumentFunctions(AbstractCompiler compiler, FunctionNames functionNames, Instrumentation template, java.lang.String appNameStr)
compiler
- The JSCompilerfunctionNames
- Assigned function identifiers.template
- Instrumentation template; for use during error reporting only.appNameStr
- String to pass to appNameSetter.public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS tree