class_body
{ "{"
block_comment "/**\n * Based roughly on the first few pages of\n *\n * \""...
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
generic_type
type_identifier "ControlFlowGraph"
type_arguments
< "<"
type_identifier "Node"
> ">"
variable_declarator
identifier "cfg"
; ";"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "Node"
, ","
type_identifier "Integer"
> ">"
variable_declarator
identifier "astPosition"
; ";"
line_comment "// TODO(nicksantos): should these be node annotations?"
field_declaration (+21 nodes collapsed)
line_comment "// We order CFG nodes by by looking at the AST positions."
line_comment "// CFG nodes that come first lexically should be visited fir"...
line_comment "// they will often be executed first in the source program."
field_declaration (+111 nodes collapsed)
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "astPositionCounter"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "priorityCounter"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "shouldTraverseFunctions"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "edgeAnnotations"
; ";"
line_comment "// We need to store where we started, in case we aren't doin"...
line_comment "// for the whole scope. This happens, for example, when runn"...
line_comment "// on only the externs."
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "root"
; ";"
block_comment "/*\n * This stack captures the structure of nested TRY bloc"...
field_declaration (+25 nodes collapsed)
block_comment "/*\n * This map is used to handle the follow of FINALLY. Fo"...
field_declaration (+23 nodes collapsed)
block_comment "/**\n * Constructor.\n *\n * @param compiler Compiler ins"...
constructor_declaration (+46 nodes collapsed)
method_declaration
generic_type
type_identifier "ControlFlowGraph"
type_arguments
< "<"
type_identifier "Node"
> ">"
identifier "getCfg"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "cfg"
; ";"
} "}"
method_declaration (+329 nodes collapsed)
block_comment "/**\n * Given an entry node, find all the nodes reachable f"...
method_declaration (+194 nodes collapsed)
method_declaration (+440 nodes collapsed)
method_declaration (+397 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+87 nodes collapsed)
method_declaration (+82 nodes collapsed)
method_declaration (+309 nodes collapsed)
method_declaration (+177 nodes collapsed)
method_declaration (+228 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+301 nodes collapsed)
method_declaration (+100 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+349 nodes collapsed)
method_declaration (+349 nodes collapsed)
method_declaration (+241 nodes collapsed)
method_declaration (+47 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Computes the follow() node of a given node and its "...
method_declaration
modifiers
private "private"
static "static"
type_identifier "Node"
identifier "computeFollowNode"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "fromNode"
, ","
formal_parameter
type_identifier "Node"
identifier "node"
, ","
formal_parameter
type_identifier "ControlFlowAnalysis"
identifier "cfa"
) ")"
block
{ "{"
block_comment "/*\n * This is the case where:\n *\n * 1. Parent is"...
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "parent"
= "="
method_invocation
identifier "node"
. "."
identifier "getParent"
argument_list
( "("
) ")"
; ";"
if_statement (+43 nodes collapsed)
line_comment "// If we are just before a IF/WHILE/DO/FOR:"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
identifier "parent"
. "."
identifier "getType"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
line_comment "// The follow() of any of the path from IF would be what fol"...
switch_block_statement_group (+21 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "CASE"
: ":"
switch_block_statement_group (+148 nodes collapsed)
switch_block_statement_group (+54 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "WHILE"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "DO"
: ":"
return_statement
return "return"
identifier "parent"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "TRY"
: ":"
line_comment "// If we are coming out of the TRY block..."
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "parent"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
== "=="
identifier "node"
) ")"
block (+54 nodes collapsed)
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "NodeUtil"
. "."
identifier "getCatchBlock"
argument_list
( "("
identifier "parent"
) ")"
== "=="
identifier "node"
) ")"
block (+53 nodes collapsed)
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "parent"
. "."
identifier "getLastChild"
argument_list
( "("
) ")"
== "=="
identifier "node"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "cfa"
!= "!="
null_literal "null"
) ")"
block
{ "{"
enhanced_for_statement
for "for"
( "("
type_identifier "Node"
identifier "finallyNode"
: ":"
method_invocation
field_access
identifier "cfa"
. "."
identifier "finallyMap"
. "."
identifier "get"
argument_list
( "("
identifier "parent"
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "cfa"
. "."
identifier "createEdge"
argument_list
( "("
identifier "fromNode"
, ","
field_access
identifier "Branch"
. "."
identifier "UNCOND"
, ","
identifier "finallyNode"
) ")"
; ";"
} "}"
} "}"
return_statement
return "return"
method_invocation
identifier "computeFollowNode"
argument_list
( "("
identifier "fromNode"
, ","
identifier "parent"
, ","
identifier "cfa"
) ")"
; ";"
} "}"
} "}"
line_comment "// Now that we are done with the special cases follow should"...
line_comment "// immediate sibling, unless its sibling is a function"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "nextSibling"
= "="
method_invocation
identifier "node"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
line_comment "// Skip function declarations because control doesn't get pa"...
while_statement (+33 nodes collapsed)
if_statement (+39 nodes collapsed)
} "}"
block_comment "/**\n * Computes the destination node of n when we want to "...
method_declaration (+138 nodes collapsed)
block_comment "/**\n * Connects the two nodes in the control flow graph.\n "...
method_declaration (+59 nodes collapsed)
block_comment "/**\n * Connects cfgNode to the proper CATCH block if targe"...
method_declaration (+240 nodes collapsed)
block_comment "/**\n * Get the next sibling (including itself) of one of t"...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Checks if target is actually the break target of la"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Checks if target is actually the continue target of"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Check if label is actually referencing the target c"...
method_declaration (+98 nodes collapsed)
block_comment "/**\n * Determines if the subtree might throw an exception."...
method_declaration (+187 nodes collapsed)
block_comment "/**\n * Determines whether the given node can be terminated"...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Determines whether the given node can be advanced w"...
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Get the TRY block with a CATCH that would be run if"...
method_declaration (+91 nodes collapsed)
block_comment "/**\n * Locate the catch BLOCK given the first block in a T"...
method_declaration (+127 nodes collapsed)
block_comment "/**\n * A {@link ControlFlowGraph} which provides a node co"...
class_declaration (+344 nodes collapsed)
} "}"