Index: src/ast/prettyprinter.cc |
diff --git a/src/ast/prettyprinter.cc b/src/ast/prettyprinter.cc |
index a3fc50ae571d8cfa9e434880e5b6b88c8c77b8cf..b29eb88845d97dde10eaf24fad3f50844d1ef4e2 100644 |
--- a/src/ast/prettyprinter.cc |
+++ b/src/ast/prettyprinter.cc |
@@ -14,14 +14,14 @@ |
namespace v8 { |
namespace internal { |
-CallPrinter::CallPrinter(Isolate* isolate, bool is_builtin) |
+CallPrinter::CallPrinter(Isolate* isolate, bool is_user_js) |
: builder_(isolate) { |
isolate_ = isolate; |
position_ = 0; |
num_prints_ = 0; |
found_ = false; |
done_ = false; |
- is_builtin_ = is_builtin; |
+ is_user_js_ = is_user_js; |
InitializeAstVisitor(isolate); |
} |
@@ -239,11 +239,11 @@ void CallPrinter::VisitArrayLiteral(ArrayLiteral* node) { |
void CallPrinter::VisitVariableProxy(VariableProxy* node) { |
- if (is_builtin_) { |
- // Variable names of builtins are meaningless due to minification. |
- Print("(var)"); |
- } else { |
+ if (is_user_js_) { |
PrintLiteral(node->name(), false); |
+ } else { |
+ // Variable names of non-user code are meaningless due to minification. |
+ Print("(var)"); |
} |
} |
@@ -279,9 +279,9 @@ void CallPrinter::VisitProperty(Property* node) { |
void CallPrinter::VisitCall(Call* node) { |
bool was_found = !found_ && node->position() == position_; |
if (was_found) { |
- // Bail out if the error is caused by a direct call to a variable in builtin |
- // code. The variable name is meaningless due to minification. |
- if (is_builtin_ && node->expression()->IsVariableProxy()) { |
+ // Bail out if the error is caused by a direct call to a variable in |
+ // non-user JS code. The variable name is meaningless due to minification. |
+ if (!is_user_js_ && node->expression()->IsVariableProxy()) { |
done_ = true; |
return; |
} |
@@ -297,9 +297,9 @@ void CallPrinter::VisitCall(Call* node) { |
void CallPrinter::VisitCallNew(CallNew* node) { |
bool was_found = !found_ && node->position() == position_; |
if (was_found) { |
- // Bail out if the error is caused by a direct call to a variable in builtin |
- // code. The variable name is meaningless due to minification. |
- if (is_builtin_ && node->expression()->IsVariableProxy()) { |
+ // Bail out if the error is caused by a direct call to a variable in |
+ // non-user JS code. The variable name is meaningless due to minification. |
+ if (!is_user_js_ && node->expression()->IsVariableProxy()) { |
done_ = true; |
return; |
} |