Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–689 unchanged (689 lines)
690 Node callNode, Node fnNode) {
691 if (!isDirectCallNodeReplacementPossible(fnNode)) {
692 return CanInlineResult.NO;
693 }
694
695 Node block = fnNode.getLastChild();
696
697
698 // CALL NODE: [ NAME, ARG1, ARG2, ... ]
699 Node cArg = callNode.getFirstChild().getNext();
700
701 // Functions called via 'call' and 'apply' have a this-object as
702 // the first parameter, but this is not part of the called function's
…lines 703–716 unchanged (14 lines)
717 // FUNCTION NODE -> LP NODE: [ ARG1, ARG2, ... ]
718 Node fnParam = NodeUtil.getFunctionParameters(fnNode).getFirstChild();
719 while (cArg != null || fnParam != null) {
720 // For each named parameter check if a mutable argument use more than one.
721 if (fnParam != null) {
722 if (cArg != null) {
723
724 // Check for arguments that are evaluated more than once.
725 // Note: Unlike block inlining, there it is not possible that a
726 // parameter reference will be in a loop.
727 if (NodeUtil.mayEffectMutableState(cArg, compiler)
728 && NodeUtil.getNameReferenceCount(
729 block, fnParam.getString()) > 1) {
…lines 730–939 unchanged (210 lines)

After

…lines 1–690 unchanged (690 lines)
691 if (!isDirectCallNodeReplacementPossible(fnNode)) {
692 return CanInlineResult.NO;
693 }
694
695 Node block = fnNode.getLastChild();
696
697 boolean hasSideEffects = false; // empty function case
698 if (block.hasChildren()) {
699 Preconditions.checkState(block.hasOneChild());
700 Node stmt = block.getFirstChild();
701 if (stmt.isReturn()) {
702 hasSideEffects = NodeUtil.mayHaveSideEffects(
703 stmt.getFirstChild(), compiler);
704 }
705 }
706
707 // CALL NODE: [ NAME, ARG1, ARG2, ... ]
708 Node cArg = callNode.getFirstChild().getNext();
709
710 // Functions called via 'call' and 'apply' have a this-object as
711 // the first parameter, but this is not part of the called function's
…lines 712–725 unchanged (14 lines)
726 // FUNCTION NODE -> LP NODE: [ ARG1, ARG2, ... ]
727 Node fnParam = NodeUtil.getFunctionParameters(fnNode).getFirstChild();
728 while (cArg != null || fnParam != null) {
729 // For each named parameter check if a mutable argument use more than one.
730 if (fnParam != null) {
731 if (cArg != null) {
732 if (hasSideEffects && NodeUtil.canBeSideEffected(cArg)) {
733 return CanInlineResult.NO;
734 }
735
736 // Check for arguments that are evaluated more than once.
737 // Note: Unlike block inlining, there it is not possible that a
738 // parameter reference will be in a loop.
739 if (NodeUtil.mayEffectMutableState(cArg, compiler)
740 && NodeUtil.getNameReferenceCount(
…lines 741–951 unchanged (211 lines)

Before

program
block_comment "/*\n * Copyright 2008 The Closure Compiler Authors.\n *\n * Lic"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Predicate"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Predicates"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Supplier"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Sets"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "ExpressionDecomposer"
. "."
identifier "DecompositionType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Token"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * A set of utility functions that replaces CALL with a "...
class_declaration
class "class"
identifier "FunctionInjector"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Supplier"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "safeNameIdSupplier"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "allowDecomposition"
; ";"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "knownConstants"
= "="
method_invocation
identifier "Sets"
. "."
identifier "newHashSet"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "assumeStrictThis"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "assumeMinimumCapture"
; ";"
block_comment "/**\n * @param allowDecomposition Whether an effort should "...
constructor_declaration (+99 nodes collapsed)
block_comment "/** The type of inlining to perform. */"
enum_declaration
enum "enum"
identifier "InliningMode"
enum_body
{ "{"
block_comment "/**\n * Directly replace the call expression. Only functi"...
enum_constant
identifier "DIRECT"
, ","
block_comment "/**\n * Replaces the call expression with a block of stat"...
enum_constant
identifier "BLOCK"
} "}"
block_comment "/** Holds a reference to the call node of a function call */"
class_declaration (+75 nodes collapsed)
block_comment "/**\n * In order to estimate the cost of lining, we make th"...
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "NAME_COST_ESTIMATE"
= "="
field_access
identifier "InlineCostEstimator"
. "."
identifier "ESTIMATED_IDENTIFIER_COST"
; ";"
block_comment "/** The cost of a argument separator (a comma). */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "COMMA_COST"
= "="
decimal_integer_literal "1"
; ";"
block_comment "/** The cost of the parentheses needed to make a call.*/"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "PAREN_COST"
= "="
decimal_integer_literal "2"
; ";"
block_comment "/**\n * @param fnName The name of this function. This eithe"...
method_declaration (+300 nodes collapsed)
block_comment "/**\n * @param t The traversal use to reach the call site."...
method_declaration (+213 nodes collapsed)
block_comment "/**\n * Only \".call\" calls and direct calls to functions ar"...
method_declaration (+135 nodes collapsed)
block_comment "/**\n * Inline a function into the call site.\n */"
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Inline a function that fulfills the requirements of"...
method_declaration (+226 nodes collapsed)
block_comment "/**\n * Supported call site types.\n */"
enum_declaration (+340 nodes collapsed)
block_comment "/**\n * Determine which, if any, of the supported types the"...
method_declaration (+326 nodes collapsed)
method_declaration (+25 nodes collapsed)
block_comment "/**\n * If required, rewrite the statement containing the c"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Inline a function which fulfills the requirements o"...
method_declaration (+458 nodes collapsed)
block_comment "/**\n * Checks if the given function matches the criteria f"...
method_declaration (+115 nodes collapsed)
enum_declaration
enum "enum"
identifier "CanInlineResult"
enum_body
{ "{"
enum_constant
identifier "YES"
, ","
enum_constant
identifier "AFTER_PREPARATION"
, ","
enum_constant
identifier "NO"
} "}"
block_comment "/**\n * Determines whether a function can be inlined at a p"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * Determines whether a function can be inlined at a p"...
method_declaration (+420 nodes collapsed)
block_comment "/**\n * Determines whether a function can be inlined at a p"...
method_declaration
modifiers
private "private"
type_identifier "CanInlineResult"
identifier "canInlineReferenceDirectly"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "callNode"
, ","
formal_parameter
type_identifier "Node"
identifier "fnNode"
) ")"
block
{ "{"
if_statement (+23 nodes collapsed)
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "block"
= "="
method_invocation
identifier "fnNode"
. "."
identifier "getLastChild"
argument_list
( "("
) ")"
; ";"
line_comment "// CALL NODE: [ NAME, ARG1, ARG2, ... ]"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "cArg"
= "="
method_invocation
method_invocation
identifier "callNode"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
line_comment "// Functions called via 'call' and 'apply' have a this-objec"...
line_comment "// the first parameter, but this is not part of the called f"...
line_comment "// parameter list."
if_statement (+106 nodes collapsed)
line_comment "// FUNCTION NODE -> LP NODE: [ ARG1, ARG2, ... ]"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "fnParam"
= "="
method_invocation
method_invocation
identifier "NodeUtil"
. "."
identifier "getFunctionParameters"
argument_list
( "("
identifier "fnNode"
) ")"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
while_statement
while "while"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "cArg"
!= "!="
null_literal "null"
|| "||"
binary_expression
identifier "fnParam"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// For each named parameter check if a mutable argument use "...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "fnParam"
!= "!="
null_literal "null"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "cArg"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// Check for arguments that are evaluated more than once."
line_comment "// Note: Unlike block inlining, there it is not possible tha"...
line_comment "// parameter reference will be in a loop."
if_statement (+46 nodes collapsed)
} "}"
line_comment "// Move to the next name."
expression_statement
assignment_expression
identifier "fnParam"
= "="
method_invocation
identifier "fnParam"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "// For every call argument check for side-effects, even if t"...
line_comment "// isn't a named parameter to match."
if_statement (+49 nodes collapsed)
} "}"
return_statement
return "return"
field_access
identifier "CanInlineResult"
. "."
identifier "YES"
; ";"
} "}"
block_comment "/**\n * Determine if inlining the function is likely to red"...
method_declaration (+338 nodes collapsed)
block_comment "/**\n * @return Whether inlining will lower cost.\n */"
method_declaration (+170 nodes collapsed)
block_comment "/**\n * Gets an estimate of the cost in characters of makin"...
method_declaration (+125 nodes collapsed)
block_comment "/**\n * @return The difference between the function definit"...
method_declaration (+343 nodes collapsed)
block_comment "/**\n * Store the names of known constants to be used when "...
method_declaration (+49 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright 2008 The Closure Compiler Authors.\n *\n * Lic"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Predicate"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Predicates"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Supplier"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Sets"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "ExpressionDecomposer"
. "."
identifier "DecompositionType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Token"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * A set of utility functions that replaces CALL with a "...
class_declaration
class "class"
identifier "FunctionInjector"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Supplier"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "safeNameIdSupplier"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "allowDecomposition"
; ";"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "knownConstants"
= "="
method_invocation
identifier "Sets"
. "."
identifier "newHashSet"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "assumeStrictThis"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "assumeMinimumCapture"
; ";"
block_comment "/**\n * @param allowDecomposition Whether an effort should "...
constructor_declaration (+99 nodes collapsed)
block_comment "/** The type of inlining to perform. */"
enum_declaration
enum "enum"
identifier "InliningMode"
enum_body
{ "{"
block_comment "/**\n * Directly replace the call expression. Only functi"...
enum_constant
identifier "DIRECT"
, ","
block_comment "/**\n * Replaces the call expression with a block of stat"...
enum_constant
identifier "BLOCK"
} "}"
block_comment "/** Holds a reference to the call node of a function call */"
class_declaration (+75 nodes collapsed)
block_comment "/**\n * In order to estimate the cost of lining, we make th"...
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "NAME_COST_ESTIMATE"
= "="
field_access
identifier "InlineCostEstimator"
. "."
identifier "ESTIMATED_IDENTIFIER_COST"
; ";"
block_comment "/** The cost of a argument separator (a comma). */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "COMMA_COST"
= "="
decimal_integer_literal "1"
; ";"
block_comment "/** The cost of the parentheses needed to make a call.*/"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "PAREN_COST"
= "="
decimal_integer_literal "2"
; ";"
block_comment "/**\n * @param fnName The name of this function. This eithe"...
method_declaration (+300 nodes collapsed)
block_comment "/**\n * @param t The traversal use to reach the call site."...
method_declaration (+213 nodes collapsed)
block_comment "/**\n * Only \".call\" calls and direct calls to functions ar"...
method_declaration (+135 nodes collapsed)
block_comment "/**\n * Inline a function into the call site.\n */"
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Inline a function that fulfills the requirements of"...
method_declaration (+226 nodes collapsed)
block_comment "/**\n * Supported call site types.\n */"
enum_declaration (+340 nodes collapsed)
block_comment "/**\n * Determine which, if any, of the supported types the"...
method_declaration (+326 nodes collapsed)
method_declaration (+25 nodes collapsed)
block_comment "/**\n * If required, rewrite the statement containing the c"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Inline a function which fulfills the requirements o"...
method_declaration (+458 nodes collapsed)
block_comment "/**\n * Checks if the given function matches the criteria f"...
method_declaration (+115 nodes collapsed)
enum_declaration
enum "enum"
identifier "CanInlineResult"
enum_body
{ "{"
enum_constant
identifier "YES"
, ","
enum_constant
identifier "AFTER_PREPARATION"
, ","
enum_constant
identifier "NO"
} "}"
block_comment "/**\n * Determines whether a function can be inlined at a p"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * Determines whether a function can be inlined at a p"...
method_declaration (+420 nodes collapsed)
block_comment "/**\n * Determines whether a function can be inlined at a p"...
method_declaration
modifiers
private "private"
type_identifier "CanInlineResult"
identifier "canInlineReferenceDirectly"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "callNode"
, ","
formal_parameter
type_identifier "Node"
identifier "fnNode"
) ")"
block
{ "{"
if_statement (+23 nodes collapsed)
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "block"
= "="
method_invocation
identifier "fnNode"
. "."
identifier "getLastChild"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "hasSideEffects"
= "="
false "false"
; ";"
line_comment "// empty function case"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "block"
. "."
identifier "hasChildren"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "Preconditions"
. "."
identifier "checkState"
argument_list
( "("
method_invocation
identifier "block"
. "."
identifier "hasOneChild"
argument_list
( "("
) ")"
) ")"
; ";"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "stmt"
= "="
method_invocation
identifier "block"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "stmt"
. "."
identifier "isReturn"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "hasSideEffects"
= "="
method_invocation
identifier "NodeUtil"
. "."
identifier "mayHaveSideEffects"
argument_list
( "("
method_invocation
identifier "stmt"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
, ","
identifier "compiler"
) ")"
; ";"
} "}"
} "}"
line_comment "// CALL NODE: [ NAME, ARG1, ARG2, ... ]"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "cArg"
= "="
method_invocation
method_invocation
identifier "callNode"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
line_comment "// Functions called via 'call' and 'apply' have a this-objec"...
line_comment "// the first parameter, but this is not part of the called f"...
line_comment "// parameter list."
if_statement (+106 nodes collapsed)
line_comment "// FUNCTION NODE -> LP NODE: [ ARG1, ARG2, ... ]"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "fnParam"
= "="
method_invocation
method_invocation
identifier "NodeUtil"
. "."
identifier "getFunctionParameters"
argument_list
( "("
identifier "fnNode"
) ")"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
while_statement
while "while"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "cArg"
!= "!="
null_literal "null"
|| "||"
binary_expression
identifier "fnParam"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// For each named parameter check if a mutable argument use "...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "fnParam"
!= "!="
null_literal "null"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "cArg"
!= "!="
null_literal "null"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "hasSideEffects"
&& "&&"
method_invocation
identifier "NodeUtil"
. "."
identifier "canBeSideEffected"
argument_list
( "("
identifier "cArg"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "CanInlineResult"
. "."
identifier "NO"
; ";"
} "}"
line_comment "// Check for arguments that are evaluated more than once."
line_comment "// Note: Unlike block inlining, there it is not possible tha"...
line_comment "// parameter reference will be in a loop."
if_statement (+46 nodes collapsed)
} "}"
line_comment "// Move to the next name."
expression_statement
assignment_expression
identifier "fnParam"
= "="
method_invocation
identifier "fnParam"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "// For every call argument check for side-effects, even if t"...
line_comment "// isn't a named parameter to match."
if_statement (+49 nodes collapsed)
} "}"
return_statement
return "return"
field_access
identifier "CanInlineResult"
. "."
identifier "YES"
; ";"
} "}"
block_comment "/**\n * Determine if inlining the function is likely to red"...
method_declaration (+338 nodes collapsed)
block_comment "/**\n * @return Whether inlining will lower cost.\n */"
method_declaration (+170 nodes collapsed)
block_comment "/**\n * Gets an estimate of the cost in characters of makin"...
method_declaration (+125 nodes collapsed)
block_comment "/**\n * @return The difference between the function definit"...
method_declaration (+343 nodes collapsed)
block_comment "/**\n * Store the names of known constants to be used when "...
method_declaration (+49 nodes collapsed)
} "}"