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

Unified Diff: src/objects.cc

Issue 1683643002: Mark null and undefined as undetectable, and use it to handle abstract equality comparison in the g… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/mips64/macro-assembler-mips64.h ('k') | src/runtime/runtime-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index e6fc951513ce89e4fc91cfbfa1c400309c67a52b..f78fe228ff792eddc2423d65c4ca7e56e0004a84 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -412,10 +412,10 @@ bool Object::StrictEquals(Object* that) {
// static
Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
if (object->IsNumber()) return isolate->factory()->number_string();
- if (object->IsUndefined() || object->IsUndetectableObject()) {
+ if (object->IsOddball()) return handle(Oddball::cast(*object)->type_of());
+ if (object->IsUndetectableObject()) {
return isolate->factory()->undefined_string();
}
- if (object->IsBoolean()) return isolate->factory()->boolean_string();
if (object->IsString()) return isolate->factory()->string_string();
if (object->IsSymbol()) return isolate->factory()->symbol_string();
if (object->IsString()) return isolate->factory()->string_string();
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/runtime/runtime-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698