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–94 unchanged (94 lines)
95 return true;
96 }
97
98 if (n.isNew() && NodeUtil.constructorCallHasSideEffects(n)) {
99 return true;
100 }
101
102
103 for (Node c = n.getFirstChild(); c != null; c = c.getNext()) {
104 if (!ControlFlowGraph.isEnteringNewCfgNode(c) && apply(c)) {
105 return true;
106 }
107 }
…lines 108–499 unchanged (392 lines)

After

…lines 1–95 unchanged (95 lines)
96 }
97
98 if (n.isNew() && NodeUtil.constructorCallHasSideEffects(n)) {
99 return true;
100 }
101
102 if (n.isDelProp()) {
103 return true;
104 }
105
106 for (Node c = n.getFirstChild(); c != null; c = c.getNext()) {
107 if (!ControlFlowGraph.isEnteringNewCfgNode(c) && apply(c)) {
108 return true;
109 }
110 }
…lines 111–502 unchanged (392 lines)

Before

program
block_comment "/*\n * Copyright 2009 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 "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "ControlFlowGraph"
. "."
identifier "AbstractCfgNodeTraversalCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "ControlFlowGraph"
. "."
identifier "Branch"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "DataFlowAnalysis"
. "."
identifier "FlowState"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "MustBeReachingVariableDef"
. "."
identifier "MustDef"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "AbstractPostOrderCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "AbstractShallowCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "ScopedCallback"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
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 "List"
; ";"
block_comment "/**\n * Inline variables when possible. Using the information"...
class_declaration
class "class"
identifier "FlowSensitiveInlineVariables"
superclass
extends "extends"
type_identifier "AbstractPostOrderCallback"
super_interfaces
implements "implements"
type_list
type_identifier "CompilerPass"
, ","
type_identifier "ScopedCallback"
class_body
{ "{"
block_comment "/**\n * Implementation:\n *\n * This pass first perform a"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
line_comment "// These two pieces of data is persistent in the whole execu"...
line_comment "// scope."
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 "List"
type_arguments
< "<"
type_identifier "Candidate"
> ">"
variable_declarator
identifier "candidates"
; ";"
field_declaration
modifiers
private "private"
type_identifier "MustBeReachingVariableDef"
variable_declarator
identifier "reachingDef"
; ";"
field_declaration
modifiers
private "private"
type_identifier "MaybeReachingVariableUse"
variable_declarator
identifier "reachingUses"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
generic_type
type_identifier "Predicate"
type_arguments
< "<"
type_identifier "Node"
> ">"
variable_declarator
identifier "SIDE_EFFECT_PREDICATE"
= "="
object_creation_expression
new "new"
generic_type
type_identifier "Predicate"
type_arguments
< "<"
type_identifier "Node"
> ">"
argument_list
( "("
) ")"
class_body
{ "{"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "apply"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
) ")"
block
{ "{"
line_comment "// When the node is null it means, we reached the implicit r"...
line_comment "// where the function returns (possibly without an return st"...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "n"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// TODO(user): We only care about calls to functions that"
line_comment "// passes one of the dependent variable to a non-side-effect"...
line_comment "// function."
if_statement (+29 nodes collapsed)
if_statement (+29 nodes collapsed)
for_statement (+65 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
; ";"
constructor_declaration (+22 nodes collapsed)
method_declaration (+290 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "exitScope"
formal_parameters
( "("
formal_parameter
type_identifier "NodeTraversal"
identifier "t"
) ")"
block
{ "{"
} "}"
method_declaration (+44 nodes collapsed)
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Gathers a list of possible candidates for inlining "...
class_declaration (+385 nodes collapsed)
block_comment "/**\n * Models the connection between a definition and a us"...
class_declaration (+1286 nodes collapsed)
block_comment "/**\n * Given an expression by its root and sub-expression "...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * Given an expression by its root and sub-expression "...
method_declaration (+128 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright 2009 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 "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "ControlFlowGraph"
. "."
identifier "AbstractCfgNodeTraversalCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "ControlFlowGraph"
. "."
identifier "Branch"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "DataFlowAnalysis"
. "."
identifier "FlowState"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "MustBeReachingVariableDef"
. "."
identifier "MustDef"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "AbstractPostOrderCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "AbstractShallowCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "ScopedCallback"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
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 "List"
; ";"
block_comment "/**\n * Inline variables when possible. Using the information"...
class_declaration
class "class"
identifier "FlowSensitiveInlineVariables"
superclass
extends "extends"
type_identifier "AbstractPostOrderCallback"
super_interfaces
implements "implements"
type_list
type_identifier "CompilerPass"
, ","
type_identifier "ScopedCallback"
class_body
{ "{"
block_comment "/**\n * Implementation:\n *\n * This pass first perform a"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
line_comment "// These two pieces of data is persistent in the whole execu"...
line_comment "// scope."
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 "List"
type_arguments
< "<"
type_identifier "Candidate"
> ">"
variable_declarator
identifier "candidates"
; ";"
field_declaration
modifiers
private "private"
type_identifier "MustBeReachingVariableDef"
variable_declarator
identifier "reachingDef"
; ";"
field_declaration
modifiers
private "private"
type_identifier "MaybeReachingVariableUse"
variable_declarator
identifier "reachingUses"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
generic_type
type_identifier "Predicate"
type_arguments
< "<"
type_identifier "Node"
> ">"
variable_declarator
identifier "SIDE_EFFECT_PREDICATE"
= "="
object_creation_expression
new "new"
generic_type
type_identifier "Predicate"
type_arguments
< "<"
type_identifier "Node"
> ">"
argument_list
( "("
) ")"
class_body
{ "{"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "apply"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
) ")"
block
{ "{"
line_comment "// When the node is null it means, we reached the implicit r"...
line_comment "// where the function returns (possibly without an return st"...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "n"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// TODO(user): We only care about calls to functions that"
line_comment "// passes one of the dependent variable to a non-side-effect"...
line_comment "// function."
if_statement (+29 nodes collapsed)
if_statement (+29 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "n"
. "."
identifier "isDelProp"
argument_list
( "("
) ")"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
for_statement (+65 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
; ";"
constructor_declaration (+22 nodes collapsed)
method_declaration (+290 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "exitScope"
formal_parameters
( "("
formal_parameter
type_identifier "NodeTraversal"
identifier "t"
) ")"
block
{ "{"
} "}"
method_declaration (+44 nodes collapsed)
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Gathers a list of possible candidates for inlining "...
class_declaration (+385 nodes collapsed)
block_comment "/**\n * Models the connection between a definition and a us"...
class_declaration (+1286 nodes collapsed)
block_comment "/**\n * Given an expression by its root and sub-expression "...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * Given an expression by its root and sub-expression "...
method_declaration (+128 nodes collapsed)
} "}"