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

Unified Diff: src/ic/ic-state.cc

Issue 1735863004: [ic] Unify undetectable abstract equality comparison. (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 | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic-state.cc
diff --git a/src/ic/ic-state.cc b/src/ic/ic-state.cc
index 933803c65358eb11d2b7176aab53f4bd7efc4320..b04f8adfa9b7458e6f82359404b42711fed498b2 100644
--- a/src/ic/ic-state.cc
+++ b/src/ic/ic-state.cc
@@ -404,7 +404,9 @@ CompareICState::State CompareICState::NewInputState(State old_state,
if (value->IsInternalizedString()) return INTERNALIZED_STRING;
if (value->IsString()) return STRING;
if (value->IsSymbol()) return UNIQUE_NAME;
- if (value->IsJSReceiver()) return RECEIVER;
+ if (value->IsJSReceiver() && !value->IsUndetectableObject()) {
+ return RECEIVER;
+ }
break;
case BOOLEAN:
if (value->IsBoolean()) return BOOLEAN;
@@ -428,7 +430,9 @@ CompareICState::State CompareICState::NewInputState(State old_state,
if (value->IsUniqueName()) return UNIQUE_NAME;
break;
case RECEIVER:
- if (value->IsJSReceiver()) return RECEIVER;
+ if (value->IsJSReceiver() && !value->IsUndetectableObject()) {
+ return RECEIVER;
+ }
break;
case GENERIC:
break;
@@ -464,6 +468,9 @@ CompareICState::State CompareICState::TargetState(
}
if (x->IsString() && y->IsString()) return STRING;
if (x->IsJSReceiver() && y->IsJSReceiver()) {
+ if (x->IsUndetectableObject() || y->IsUndetectableObject()) {
+ return GENERIC;
+ }
if (Handle<JSReceiver>::cast(x)->map() ==
Handle<JSReceiver>::cast(y)->map()) {
return KNOWN_RECEIVER;
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698