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–153 unchanged (153 lines)
154 computeMayUse(n, n, output, conditional);
155
156 return output;
157 }
158
159 private boolean hasExceptionHandler(Node cfgNode) {
160 return false;
161 }
162
163 private void computeMayUse(
164 Node n, Node cfgNode, ReachingUses output, boolean conditional) {
165 switch (n.getType()) {
166
…lines 167–297 unchanged (131 lines)

After

…lines 1–153 unchanged (153 lines)
154 computeMayUse(n, n, output, conditional);
155
156 return output;
157 }
158
159 private boolean hasExceptionHandler(Node cfgNode) {
160 List<DiGraphEdge<Node, Branch>> branchEdges = getCfg().getOutEdges(cfgNode);
161 for (DiGraphEdge<Node, Branch> edge : branchEdges) {
162 if (edge.getValue() == Branch.ON_EX) {
163 return true;
164 }
165 }
166 return false;
167 }
168
169 private void computeMayUse(
170 Node n, Node cfgNode, ReachingUses output, boolean conditional) {
171 switch (n.getType()) {
…lines 172–303 unchanged (132 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 "collect"
. "."
identifier "HashMultimap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Multimap"
; ";"
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 "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 "Scope"
. "."
identifier "Var"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "graph"
. "."
identifier "GraphNode"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "graph"
. "."
identifier "LatticeElement"
; ";"
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"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * Computes \"may be\" reaching use for all definitions of"...
class_declaration
class "class"
identifier "MaybeReachingVariableUse"
superclass
extends "extends"
generic_type
type_identifier "DataFlowAnalysis"
type_arguments
< "<"
type_identifier "Node"
, ","
scoped_type_identifier
type_identifier "MaybeReachingVariableUse"
. "."
type_identifier "ReachingUses"
> ">"
class_body
{ "{"
line_comment "// The scope of the function that we are analyzing."
field_declaration
modifiers
private "private"
final "final"
type_identifier "Scope"
variable_declarator
identifier "jsScope"
; ";"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "Var"
> ">"
variable_declarator
identifier "escaped"
; ";"
constructor_declaration (+76 nodes collapsed)
block_comment "/**\n * May use definition lattice representation. It captu"...
class_declaration (+154 nodes collapsed)
block_comment "/**\n * The join is a simple union because of the \"may be\" "...
class_declaration (+83 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "isForward"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "hasExceptionHandler"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "cfgNode"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+725 nodes collapsed)
block_comment "/**\n * Sets the variable for the given name to the node va"...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Removes the variable for the given name from the no"...
method_declaration (+87 nodes collapsed)
block_comment "/**\n * Gets a list of nodes that may be using the value as"...
method_declaration (+101 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 "collect"
. "."
identifier "HashMultimap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Multimap"
; ";"
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 "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 "Scope"
. "."
identifier "Var"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "graph"
. "."
identifier "GraphNode"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "graph"
. "."
identifier "LatticeElement"
; ";"
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"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * Computes \"may be\" reaching use for all definitions of"...
class_declaration
class "class"
identifier "MaybeReachingVariableUse"
superclass
extends "extends"
generic_type
type_identifier "DataFlowAnalysis"
type_arguments
< "<"
type_identifier "Node"
, ","
scoped_type_identifier
type_identifier "MaybeReachingVariableUse"
. "."
type_identifier "ReachingUses"
> ">"
class_body
{ "{"
line_comment "// The scope of the function that we are analyzing."
field_declaration
modifiers
private "private"
final "final"
type_identifier "Scope"
variable_declarator
identifier "jsScope"
; ";"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "Var"
> ">"
variable_declarator
identifier "escaped"
; ";"
constructor_declaration (+76 nodes collapsed)
block_comment "/**\n * May use definition lattice representation. It captu"...
class_declaration (+154 nodes collapsed)
block_comment "/**\n * The join is a simple union because of the \"may be\" "...
class_declaration (+83 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "isForward"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "hasExceptionHandler"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "cfgNode"
) ")"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
generic_type
type_identifier "DiGraphEdge"
type_arguments
< "<"
type_identifier "Node"
, ","
type_identifier "Branch"
> ">"
> ">"
variable_declarator
identifier "branchEdges"
= "="
method_invocation
method_invocation
identifier "getCfg"
argument_list
( "("
) ")"
. "."
identifier "getOutEdges"
argument_list
( "("
identifier "cfgNode"
) ")"
; ";"
enhanced_for_statement
for "for"
( "("
generic_type
type_identifier "DiGraphEdge"
type_arguments
< "<"
type_identifier "Node"
, ","
type_identifier "Branch"
> ">"
identifier "edge"
: ":"
identifier "branchEdges"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "edge"
. "."
identifier "getValue"
argument_list
( "("
) ")"
== "=="
field_access
identifier "Branch"
. "."
identifier "ON_EX"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
} "}"
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+725 nodes collapsed)
block_comment "/**\n * Sets the variable for the given name to the node va"...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Removes the variable for the given name from the no"...
method_declaration (+87 nodes collapsed)
block_comment "/**\n * Gets a list of nodes that may be using the value as"...
method_declaration (+101 nodes collapsed)
} "}"