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–159 unchanged (159 lines)
160
161 // Keep track of of the "this" context of a call. A call without an
162 // explicit "this" is a free call.
163 Node first = n.getFirstChild();
164
165 // ignore cast nodes.
166
167 if (!NodeUtil.isGet(first)) {
168 n.putBooleanProp(Node.FREE_CALL, true);
169 }
170
171 // Keep track of the context in which eval is called. It is important
172 // to distinguish between "(0, eval)()" and "eval()".
…lines 173–218 unchanged (46 lines)

After

…lines 1–159 unchanged (159 lines)
160
161 // Keep track of of the "this" context of a call. A call without an
162 // explicit "this" is a free call.
163 Node first = n.getFirstChild();
164
165 // ignore cast nodes.
166 while (first.isCast()) {
167 first = first.getFirstChild();
168 }
169
170 if (!NodeUtil.isGet(first)) {
171 n.putBooleanProp(Node.FREE_CALL, true);
172 }
173
174 // Keep track of the context in which eval is called. It is important
…lines 175–221 unchanged (47 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 "javascript"
. "."
identifier "rhino"
. "."
identifier "IR"
; ";"
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"
; ";"
block_comment "/**\n * Prepare the AST before we do any checks or optimizati"...
class_declaration
class "class"
identifier "PrepareAst"
super_interfaces
implements "implements"
type_list
type_identifier "CompilerPass"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "checkOnly"
; ";"
constructor_declaration
identifier "PrepareAst"
formal_parameters
( "("
formal_parameter
type_identifier "AbstractCompiler"
identifier "compiler"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
this "this"
argument_list
( "("
identifier "compiler"
, ","
false "false"
) ")"
; ";"
} "}"
constructor_declaration (+33 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+108 nodes collapsed)
block_comment "/**\n * Covert EXPR_VOID to EXPR_RESULT to simplify the res"...
method_declaration (+86 nodes collapsed)
block_comment "/**\n * Add blocks to IF, WHILE, DO, etc.\n */"
method_declaration (+202 nodes collapsed)
block_comment "/**\n * Normalize where annotations appear on the AST. Copi"...
class_declaration
modifiers
static "static"
class "class"
identifier "PrepareAnnotations"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
type_identifier "NodeTraversal"
. "."
type_identifier "Callback"
class_body
{ "{"
constructor_declaration
identifier "PrepareAnnotations"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
method_declaration (+52 nodes collapsed)
method_declaration (+80 nodes collapsed)
method_declaration (+90 nodes collapsed)
block_comment "/**\n * There are two types of calls we are interested in"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "annotateCalls"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "Preconditions"
. "."
identifier "checkState"
argument_list
( "("
method_invocation
identifier "n"
. "."
identifier "isCall"
argument_list
( "("
) ")"
) ")"
; ";"
line_comment "// Keep track of of the \"this\" context of a call. A call wi"...
line_comment "// explicit \"this\" is a free call."
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "first"
= "="
method_invocation
identifier "n"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
line_comment "// ignore cast nodes."
if_statement (+33 nodes collapsed)
line_comment "// Keep track of the context in which eval is called. It is "...
line_comment "// to distinguish between \"(0, eval)()\" and \"eval()\"."
if_statement (+49 nodes collapsed)
} "}"
block_comment "/**\n * Translate dispatcher info into the property expec"...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * In the AST that Rhino gives us, it needs to make "...
method_declaration (+81 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 "javascript"
. "."
identifier "rhino"
. "."
identifier "IR"
; ";"
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"
; ";"
block_comment "/**\n * Prepare the AST before we do any checks or optimizati"...
class_declaration
class "class"
identifier "PrepareAst"
super_interfaces
implements "implements"
type_list
type_identifier "CompilerPass"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "checkOnly"
; ";"
constructor_declaration
identifier "PrepareAst"
formal_parameters
( "("
formal_parameter
type_identifier "AbstractCompiler"
identifier "compiler"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
this "this"
argument_list
( "("
identifier "compiler"
, ","
false "false"
) ")"
; ";"
} "}"
constructor_declaration (+33 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+108 nodes collapsed)
block_comment "/**\n * Covert EXPR_VOID to EXPR_RESULT to simplify the res"...
method_declaration (+86 nodes collapsed)
block_comment "/**\n * Add blocks to IF, WHILE, DO, etc.\n */"
method_declaration (+202 nodes collapsed)
block_comment "/**\n * Normalize where annotations appear on the AST. Copi"...
class_declaration
modifiers
static "static"
class "class"
identifier "PrepareAnnotations"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
type_identifier "NodeTraversal"
. "."
type_identifier "Callback"
class_body
{ "{"
constructor_declaration
identifier "PrepareAnnotations"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
method_declaration (+52 nodes collapsed)
method_declaration (+80 nodes collapsed)
method_declaration (+90 nodes collapsed)
block_comment "/**\n * There are two types of calls we are interested in"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "annotateCalls"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "Preconditions"
. "."
identifier "checkState"
argument_list
( "("
method_invocation
identifier "n"
. "."
identifier "isCall"
argument_list
( "("
) ")"
) ")"
; ";"
line_comment "// Keep track of of the \"this\" context of a call. A call wi"...
line_comment "// explicit \"this\" is a free call."
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "first"
= "="
method_invocation
identifier "n"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
line_comment "// ignore cast nodes."
while_statement
while "while"
parenthesized_expression
( "("
method_invocation
identifier "first"
. "."
identifier "isCast"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "first"
= "="
method_invocation
identifier "first"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
} "}"
if_statement (+33 nodes collapsed)
line_comment "// Keep track of the context in which eval is called. It is "...
line_comment "// to distinguish between \"(0, eval)()\" and \"eval()\"."
if_statement (+49 nodes collapsed)
} "}"
block_comment "/**\n * Translate dispatcher info into the property expec"...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * In the AST that Rhino gives us, it needs to make "...
method_declaration (+81 nodes collapsed)
} "}"
} "}"