Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: src/ast/prettyprinter.cc

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/prettyprinter.cc
diff --git a/src/ast/prettyprinter.cc b/src/ast/prettyprinter.cc
index b29eb88845d97dde10eaf24fad3f50844d1ef4e2..a3fc50ae571d8cfa9e434880e5b6b88c8c77b8cf 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_user_js)
+CallPrinter::CallPrinter(Isolate* isolate, bool is_builtin)
: builder_(isolate) {
isolate_ = isolate;
position_ = 0;
num_prints_ = 0;
found_ = false;
done_ = false;
- is_user_js_ = is_user_js;
+ is_builtin_ = is_builtin;
InitializeAstVisitor(isolate);
}
@@ -239,11 +239,11 @@
void CallPrinter::VisitVariableProxy(VariableProxy* node) {
- if (is_user_js_) {
+ if (is_builtin_) {
+ // Variable names of builtins are meaningless due to minification.
+ Print("(var)");
+ } else {
PrintLiteral(node->name(), false);
- } else {
- // Variable names of non-user code are meaningless due to minification.
- Print("(var)");
}
}
@@ -279,9 +279,9 @@
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
- // non-user JS code. The variable name is meaningless due to minification.
- if (!is_user_js_ && node->expression()->IsVariableProxy()) {
+ // 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()) {
done_ = true;
return;
}
@@ -297,9 +297,9 @@
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
- // non-user JS code. The variable name is meaningless due to minification.
- if (!is_user_js_ && node->expression()->IsVariableProxy()) {
+ // 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()) {
done_ = true;
return;
}
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698