@GwtIncompatible(value="FileInstrumentationData") class CoverageInstrumentationPass extends java.lang.Object implements CompilerPass
Modifier and Type | Class and Description |
---|---|
static class |
CoverageInstrumentationPass.CoverageReach |
Modifier and Type | Field and Description |
---|---|
(package private) AbstractCompiler |
compiler |
private java.util.Map<java.lang.String,FileInstrumentationData> |
instrumentationData |
private static java.lang.String |
JS_INSTRUMENTATION_EXTERNS_CODE |
private CoverageInstrumentationPass.CoverageReach |
reach |
Constructor and Description |
---|
CoverageInstrumentationPass(AbstractCompiler compiler,
CoverageInstrumentationPass.CoverageReach reach) |
Modifier and Type | Method and Description |
---|---|
private void |
addHeaderCode(Node script)
Creates the js code to be added to source.
|
private static Node |
createConditionalVarDecl(java.lang.String name,
Node srcref) |
private Node |
getInstrumentationExternsNode()
Creates a node of externs code required for the arrays used for
instrumentation.
|
void |
process(Node externsNode,
Node rootNode)
Process the JS with root node root.
|
final AbstractCompiler compiler
private java.util.Map<java.lang.String,FileInstrumentationData> instrumentationData
private CoverageInstrumentationPass.CoverageReach reach
private static final java.lang.String JS_INSTRUMENTATION_EXTERNS_CODE
public CoverageInstrumentationPass(AbstractCompiler compiler, CoverageInstrumentationPass.CoverageReach reach)
compiler
- the compiler which generates the AST.private void addHeaderCode(Node script)
private Node getInstrumentationExternsNode()
public void process(Node externsNode, Node rootNode)
CompilerPass
process
in interface CompilerPass
externsNode
- Top of external JS treerootNode
- Top of JS tree