class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
constructor_declaration
identifier "DevirtualizePrototypeMethods"
formal_parameters
( "("
formal_parameter
type_identifier "AbstractCompiler"
identifier "compiler"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "compiler"
= "="
identifier "compiler"
; ";"
} "}"
method_declaration (+73 nodes collapsed)
block_comment "/**\n * Determines if the name node acts as the function na"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Determines if the current node is a function protot"...
method_declaration (+218 nodes collapsed)
block_comment "/**\n * @returns The new name for a rewritten method.\n */"
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Rewrites method definition and call sites if the me"...
method_declaration (+194 nodes collapsed)
block_comment "/**\n * Determines if a method definition is eligible for r"...
method_declaration (+415 nodes collapsed)
block_comment "/**\n * Rewrites object method call sites as calls to globa"...
method_declaration (+141 nodes collapsed)
block_comment "/**\n * Rewrites method definitions as global functions tha"...
method_declaration (+229 nodes collapsed)
block_comment "/**\n * Creates a new JSType based on the original function"...
method_declaration (+181 nodes collapsed)
block_comment "/**\n * Replaces references to \"this\" with references to na"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "replaceReferencesToThis"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "node"
, ","
formal_parameter
type_identifier "String"
identifier "name"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "NodeUtil"
. "."
identifier "isFunction"
argument_list
( "("
identifier "node"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
; ";"
} "}"
enhanced_for_statement
for "for"
( "("
type_identifier "Node"
identifier "child"
: ":"
method_invocation
identifier "node"
. "."
identifier "children"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "NodeUtil"
. "."
identifier "isThis"
argument_list
( "("
identifier "child"
) ")"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "newName"
= "="
method_invocation
identifier "Node"
. "."
identifier "newString"
argument_list
( "("
field_access
identifier "Token"
. "."
identifier "NAME"
, ","
identifier "name"
) ")"
; ";"
expression_statement
method_invocation
identifier "node"
. "."
identifier "replaceChild"
argument_list
( "("
identifier "child"
, ","
identifier "newName"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
method_invocation
identifier "replaceReferencesToThis"
argument_list
( "("
identifier "child"
, ","
identifier "name"
) ")"
; ";"
} "}"
} "}"
} "}"
} "}"