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

Unified Diff: src/ic/ic.cc

Issue 1502963002: [ic] Change CompareIC to handle JSReceiver instead of JSObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/ia32/code-stubs-ia32.cc ('k') | src/ic/ic-state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 2d0332a9f875596e5bee4930bd04dbb5b2191cf0..dd9b0f10abbf43e43713e5c6e1b2b348d26cbf56 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -558,7 +558,7 @@ void CompareIC::Clear(Isolate* isolate, Address address, Code* target,
DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC);
CompareICStub stub(target->stub_key(), isolate);
// Only clear CompareICs that can retain objects.
- if (stub.state() != CompareICState::KNOWN_OBJECT) return;
+ if (stub.state() != CompareICState::KNOWN_RECEIVER) return;
SetTargetAtAddress(address,
GetRawUninitialized(isolate, stub.op(), stub.strength()),
constant_pool);
@@ -2687,9 +2687,9 @@ Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
HasInlinedSmiCode(address()), x, y);
CompareICStub stub(isolate(), op_, old_stub.strength(), new_left, new_right,
state);
- if (state == CompareICState::KNOWN_OBJECT) {
+ if (state == CompareICState::KNOWN_RECEIVER) {
stub.set_known_map(
- Handle<Map>(Handle<JSObject>::cast(x)->map(), isolate()));
+ Handle<Map>(Handle<JSReceiver>::cast(x)->map(), isolate()));
}
Handle<Code> new_target = stub.GetCode();
set_target(*new_target);
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/ic-state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698