Index: src/crankshaft/hydrogen-instructions.cc |
diff --git a/src/crankshaft/hydrogen-instructions.cc b/src/crankshaft/hydrogen-instructions.cc |
index 3d48d8fb71862d1e486ac6f0cc68911a8759f8a0..cc1009d3a138c2aaa39b780a96764e68289170bf 100644 |
--- a/src/crankshaft/hydrogen-instructions.cc |
+++ b/src/crankshaft/hydrogen-instructions.cc |
@@ -1203,6 +1203,10 @@ namespace { |
String* TypeOfString(HConstant* constant, Isolate* isolate) { |
Heap* heap = isolate->heap(); |
if (constant->HasNumberValue()) return heap->number_string(); |
+ if (constant->GetInstanceType() == ODDBALL_TYPE && |
+ constant->GetUnique().IsKnownGlobal(heap->null_value())) { |
+ return heap->object_string(); |
+ } |
if (constant->IsUndetectable()) return heap->undefined_string(); |
if (constant->HasStringValue()) return heap->string_string(); |
switch (constant->GetInstanceType()) { |