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

Unified Diff: src/ic/ic.cc

Issue 542613003: Introduce code stub constructors for stub keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: define MajorKey inline Created 6 years, 3 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
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index c59fa5da6b4cd4b756b18c7ae918f300987399f3..7771b05c64c50481f2a373e068870f7d89b48f99 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -549,7 +549,7 @@ void KeyedStoreIC::Clear(Isolate* isolate, Address address, Code* target,
void CompareIC::Clear(Isolate* isolate, Address address, Code* target,
ConstantPoolArray* constant_pool) {
DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC);
- CompareICStub stub(target->stub_key());
+ CompareICStub stub(target->stub_key(), isolate);
// Only clear CompareICs that can retain objects.
if (stub.state() != KNOWN_OBJECT) return;
SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()),
@@ -2746,7 +2746,7 @@ Type* CompareIC::StateToType(Zone* zone, CompareIC::State state,
void CompareIC::StubInfoToType(uint32_t stub_key, Type** left_type,
Type** right_type, Type** overall_type,
Handle<Map> map, Zone* zone) {
- CompareICStub stub(stub_key);
+ CompareICStub stub(stub_key, map->GetIsolate());
*left_type = StateToType(zone, stub.left());
*right_type = StateToType(zone, stub.right());
*overall_type = StateToType(zone, stub.state(), map);
@@ -2859,7 +2859,7 @@ CompareIC::State CompareIC::TargetState(State old_state, State old_left,
Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
HandleScope scope(isolate());
- CompareICStub old_stub(target()->stub_key());
+ CompareICStub old_stub(target()->stub_key(), isolate());
State new_left = NewInputState(old_stub.left(), x);
State new_right = NewInputState(old_stub.right(), y);
State state = TargetState(old_stub.state(), old_stub.left(), old_stub.right(),
« no previous file with comments | « src/ia32/code-stubs-ia32.h ('k') | src/objects.cc » ('j') | test/cctest/test-code-stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698