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

Unified Diff: src/crankshaft/hydrogen-instructions.cc

Issue 1912553002: Fix 'typeof null' canonicalization in crankshaft (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | test/mjsunit/regress/regress-opt-typeof-null.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-opt-typeof-null.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698