class_body
{ "{"
block_comment "/**\n * Maps a given variable to a collection of references"...
field_declaration (+23 nodes collapsed)
block_comment "/**\n * The stack of basic blocks and scopes the current tr"...
field_declaration (+25 nodes collapsed)
block_comment "/**\n * Source of behavior at various points in the travers"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Behavior"
variable_declarator
identifier "behavior"
; ";"
block_comment "/**\n * JavaScript compiler to use in traversing.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
block_comment "/**\n * Only collect references for filtered variables.\n "...
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Predicate"
type_arguments
< "<"
type_identifier "Var"
> ">"
variable_declarator
identifier "varFilter"
; ";"
block_comment "/**\n * Constructor initializes block stack.\n */"
constructor_declaration (+36 nodes collapsed)
block_comment "/**\n * Constructor only collects references that match the"...
constructor_declaration (+51 nodes collapsed)
block_comment "/**\n * Convenience method for running this pass over a tre"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Same as process but only runs on a part of AST asso"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Gets the variables that were referenced in this cal"...
method_declaration (+29 nodes collapsed)
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Gets the reference collection for the given variabl"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * For each node, update the block stack and reference"...
method_declaration (+190 nodes collapsed)
block_comment "/**\n * Updates block stack and invokes any additional beha"...
method_declaration (+78 nodes collapsed)
block_comment "/**\n * Updates block stack and invokes any additional beha"...
method_declaration (+106 nodes collapsed)
block_comment "/**\n * Updates block stack.\n */"
method_declaration (+70 nodes collapsed)
block_comment "/**\n * @return true if this node marks the start of a new "...
method_declaration (+156 nodes collapsed)
method_declaration (+79 nodes collapsed)
interface_declaration
interface "interface"
identifier "ReferenceMap"
interface_body
{ "{"
method_declaration
type_identifier "ReferenceCollection"
identifier "getReferences"
formal_parameters
( "("
formal_parameter
type_identifier "Var"
identifier "var"
) ")"
; ";"
} "}"
class_declaration (+85 nodes collapsed)
block_comment "/**\n * Way for callers to add specific behavior during tra"...
interface_declaration (+21 nodes collapsed)
field_declaration (+39 nodes collapsed)
block_comment "/**\n * A collection of references. Can be subclassed to ap"...
class_declaration
modifiers
static "static"
class "class"
identifier "ReferenceCollection"
super_interfaces
implements "implements"
type_list
generic_type
type_identifier "Iterable"
type_arguments
< "<"
type_identifier "Reference"
> ">"
class_body
{ "{"
field_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "Reference"
> ">"
variable_declarator
identifier "references"
= "="
method_invocation
identifier "Lists"
. "."
identifier "newArrayList"
argument_list
( "("
) ")"
; ";"
method_declaration (+29 nodes collapsed)
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Determines if the variable for this reference col"...
method_declaration (+168 nodes collapsed)
block_comment "/**\n * Whether the variable is escaped into an inner sco"...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * @param index The index into the references array "...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * @param index The index into the references array "...
method_declaration (+126 nodes collapsed)
block_comment "/**\n * @return The reference that provides the value for"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Constants are allowed to be defined after their f"...
method_declaration (+83 nodes collapsed)
block_comment "/**\n * @return Whether the variable is only assigned a v"...
method_declaration
boolean_type "boolean"
identifier "isAssignedOnceInLifetime"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Reference"
variable_declarator
identifier "ref"
= "="
method_invocation
identifier "getOneAndOnlyAssignment"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "ref"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// Make sure this assignment is not in a loop."
for_statement
for "for"
( "("
local_variable_declaration
type_identifier "BasicBlock"
variable_declarator
identifier "block"
= "="
method_invocation
identifier "ref"
. "."
identifier "getBasicBlock"
argument_list
( "("
) ")"
; ";"
binary_expression
identifier "block"
!= "!="
null_literal "null"
; ";"
assignment_expression
identifier "block"
= "="
method_invocation
identifier "block"
. "."
identifier "getParent"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
field_access
identifier "block"
. "."
identifier "isFunction"
) ")"
block
{ "{"
break_statement
break "break"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
field_access
identifier "block"
. "."
identifier "isLoop"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
return_statement
return "return"
true "true"
; ";"
} "}"
block_comment "/**\n * @return The one and only assignment. Returns if t"...
method_declaration (+123 nodes collapsed)
block_comment "/**\n * @return Whether the variable is never assigned a "...
method_declaration (+92 nodes collapsed)
method_declaration (+59 nodes collapsed)
} "}"
block_comment "/**\n * Represents a single declaration or reference to a v"...
class_declaration (+966 nodes collapsed)
block_comment "/**\n * Represents a section of code that is uninterrupted "...
class_declaration (+334 nodes collapsed)
} "}"