Index: src/crankshaft/hydrogen-instructions.cc |
diff --git a/src/crankshaft/hydrogen-instructions.cc b/src/crankshaft/hydrogen-instructions.cc |
index 3d48d8fb71862d1e486ac6f0cc68911a8759f8a0..55e077bc90b9d95f9b96ba0bbf01af04ce09125a 100644 |
--- a/src/crankshaft/hydrogen-instructions.cc |
+++ b/src/crankshaft/hydrogen-instructions.cc |
@@ -1203,7 +1203,6 @@ namespace { |
String* TypeOfString(HConstant* constant, Isolate* isolate) { |
Heap* heap = isolate->heap(); |
if (constant->HasNumberValue()) return heap->number_string(); |
- if (constant->IsUndetectable()) return heap->undefined_string(); |
if (constant->HasStringValue()) return heap->string_string(); |
switch (constant->GetInstanceType()) { |
case ODDBALL_TYPE: { |
@@ -1232,6 +1231,7 @@ String* TypeOfString(HConstant* constant, Isolate* isolate) { |
return nullptr; |
} |
default: |
+ if (constant->IsUndetectable()) return heap->undefined_string(); |
if (constant->IsCallable()) return heap->function_string(); |
return heap->object_string(); |
} |