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

Unified Diff: src/ast/prettyprinter.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 months 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/bootstrapper.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 2f9aa2353e802114fe1418d4a74a082c8607ef86..1a81fb11842d847822e18cff06212e5e13dce4f3 100644
--- a/src/ast/prettyprinter.cc
+++ b/src/ast/prettyprinter.cc
@@ -14,6 +14,7 @@ namespace v8 {
namespace internal {
CallPrinter::CallPrinter(Isolate* isolate, bool is_builtin) {
+ isolate_ = isolate;
output_ = NULL;
size_ = 0;
pos_ = 0;
@@ -446,7 +447,7 @@ void CallPrinter::PrintLiteral(Object* value, bool quote) {
Print("true");
} else if (object->IsFalse()) {
Print("false");
- } else if (object->IsUndefined()) {
+ } else if (object->IsUndefined(isolate_)) {
Print("undefined");
} else if (object->IsNumber()) {
Print("%g", object->Number());
@@ -479,6 +480,7 @@ static int FormatSlotNode(Vector<char>* buf, Expression* node,
PrettyPrinter::PrettyPrinter(Isolate* isolate) {
+ isolate_ = isolate;
output_ = NULL;
size_ = 0;
pos_ = 0;
@@ -1073,7 +1075,7 @@ void PrettyPrinter::PrintLiteral(Handle<Object> value, bool quote) {
Print("true");
} else if (object->IsFalse()) {
Print("false");
- } else if (object->IsUndefined()) {
+ } else if (object->IsUndefined(isolate_)) {
Print("undefined");
} else if (object->IsNumber()) {
Print("%g", object->Number());
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698