Commit cca5ac3d authored by ishell@chromium.org's avatar ishell@chromium.org Committed by Commit Bot

[ic] Cleanup vector-based IC classes' constructors.

BUG=v8:5917

Change-Id: I2f78355ae344624906e40504fba168b3189a18bb
Reviewed-on: https://chromium-review.googlesource.com/439447
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43029}
parent 45adc5f8
...@@ -2514,21 +2514,21 @@ RUNTIME_FUNCTION(Runtime_LoadIC_Miss) { ...@@ -2514,21 +2514,21 @@ RUNTIME_FUNCTION(Runtime_LoadIC_Miss) {
FeedbackSlotKind kind = vector->GetKind(vector_slot); FeedbackSlotKind kind = vector->GetKind(vector_slot);
if (IsLoadICKind(kind)) { if (IsLoadICKind(kind)) {
LoadICNexus nexus(vector, vector_slot); LoadICNexus nexus(vector, vector_slot);
LoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); LoadIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
} else if (IsLoadGlobalICKind(kind)) { } else if (IsLoadGlobalICKind(kind)) {
DCHECK_EQ(*isolate->global_object(), *receiver); DCHECK_EQ(*isolate->global_object(), *receiver);
LoadGlobalICNexus nexus(vector, vector_slot); LoadGlobalICNexus nexus(vector, vector_slot);
LoadGlobalIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); LoadGlobalIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(key)); RETURN_RESULT_OR_FAILURE(isolate, ic.Load(key));
} else { } else {
DCHECK(IsKeyedLoadICKind(kind)); DCHECK(IsKeyedLoadICKind(kind));
KeyedLoadICNexus nexus(vector, vector_slot); KeyedLoadICNexus nexus(vector, vector_slot);
KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); KeyedLoadIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
} }
...@@ -2546,7 +2546,7 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Miss) { ...@@ -2546,7 +2546,7 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Miss) {
FeedbackSlot vector_slot = vector->ToSlot(slot->value()); FeedbackSlot vector_slot = vector->ToSlot(slot->value());
LoadGlobalICNexus nexus(vector, vector_slot); LoadGlobalICNexus nexus(vector, vector_slot);
LoadGlobalIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); LoadGlobalIC ic(isolate, &nexus);
ic.UpdateState(global, name); ic.UpdateState(global, name);
Handle<Object> result; Handle<Object> result;
...@@ -2608,7 +2608,7 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) { ...@@ -2608,7 +2608,7 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) {
Handle<FeedbackVector> vector = args.at<FeedbackVector>(3); Handle<FeedbackVector> vector = args.at<FeedbackVector>(3);
FeedbackSlot vector_slot = vector->ToSlot(slot->value()); FeedbackSlot vector_slot = vector->ToSlot(slot->value());
KeyedLoadICNexus nexus(vector, vector_slot); KeyedLoadICNexus nexus(vector, vector_slot);
KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); KeyedLoadIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
} }
...@@ -2626,13 +2626,13 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) { ...@@ -2626,13 +2626,13 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
FeedbackSlot vector_slot = vector->ToSlot(slot->value()); FeedbackSlot vector_slot = vector->ToSlot(slot->value());
if (vector->IsStoreIC(vector_slot)) { if (vector->IsStoreIC(vector_slot)) {
StoreICNexus nexus(vector, vector_slot); StoreICNexus nexus(vector, vector_slot);
StoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); StoreIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value)); RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
} else { } else {
DCHECK(vector->IsKeyedStoreIC(vector_slot)); DCHECK(vector->IsKeyedStoreIC(vector_slot));
KeyedStoreICNexus nexus(vector, vector_slot); KeyedStoreICNexus nexus(vector, vector_slot);
KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); KeyedStoreIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value)); RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
} }
...@@ -2650,7 +2650,7 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) { ...@@ -2650,7 +2650,7 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) {
Handle<Object> key = args.at(4); Handle<Object> key = args.at(4);
FeedbackSlot vector_slot = vector->ToSlot(slot->value()); FeedbackSlot vector_slot = vector->ToSlot(slot->value());
KeyedStoreICNexus nexus(vector, vector_slot); KeyedStoreICNexus nexus(vector, vector_slot);
KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); KeyedStoreIC ic(isolate, &nexus);
ic.UpdateState(receiver, key); ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value)); RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
} }
......
...@@ -272,8 +272,8 @@ class CallIC : public IC { ...@@ -272,8 +272,8 @@ class CallIC : public IC {
class LoadIC : public IC { class LoadIC : public IC {
public: public:
LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) LoadIC(Isolate* isolate, FeedbackNexus* nexus)
: IC(depth, isolate, nexus) { : IC(NO_EXTRA_FRAME, isolate, nexus) {
DCHECK(nexus != NULL); DCHECK(nexus != NULL);
DCHECK(IsAnyLoad()); DCHECK(IsAnyLoad());
} }
...@@ -325,8 +325,8 @@ class LoadIC : public IC { ...@@ -325,8 +325,8 @@ class LoadIC : public IC {
class LoadGlobalIC : public LoadIC { class LoadGlobalIC : public LoadIC {
public: public:
LoadGlobalIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) LoadGlobalIC(Isolate* isolate, FeedbackNexus* nexus)
: LoadIC(depth, isolate, nexus) {} : LoadIC(isolate, nexus) {}
MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name); MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name);
...@@ -340,9 +340,8 @@ class LoadGlobalIC : public LoadIC { ...@@ -340,9 +340,8 @@ class LoadGlobalIC : public LoadIC {
class KeyedLoadIC : public LoadIC { class KeyedLoadIC : public LoadIC {
public: public:
KeyedLoadIC(FrameDepth depth, Isolate* isolate, KeyedLoadIC(Isolate* isolate, KeyedLoadICNexus* nexus)
KeyedLoadICNexus* nexus = NULL) : LoadIC(isolate, nexus) {
: LoadIC(depth, isolate, nexus) {
DCHECK(nexus != NULL); DCHECK(nexus != NULL);
} }
...@@ -362,8 +361,8 @@ class KeyedLoadIC : public LoadIC { ...@@ -362,8 +361,8 @@ class KeyedLoadIC : public LoadIC {
class StoreIC : public IC { class StoreIC : public IC {
public: public:
StoreIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) StoreIC(Isolate* isolate, FeedbackNexus* nexus)
: IC(depth, isolate, nexus) { : IC(NO_EXTRA_FRAME, isolate, nexus) {
DCHECK(IsAnyStore()); DCHECK(IsAnyStore());
} }
...@@ -417,9 +416,8 @@ class KeyedStoreIC : public StoreIC { ...@@ -417,9 +416,8 @@ class KeyedStoreIC : public StoreIC {
return casted_nexus<KeyedStoreICNexus>()->GetKeyedAccessStoreMode(); return casted_nexus<KeyedStoreICNexus>()->GetKeyedAccessStoreMode();
} }
KeyedStoreIC(FrameDepth depth, Isolate* isolate, KeyedStoreIC(Isolate* isolate, KeyedStoreICNexus* nexus)
KeyedStoreICNexus* nexus = NULL) : StoreIC(isolate, nexus) {}
: StoreIC(depth, isolate, nexus) {}
MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object, MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object,
Handle<Object> name, Handle<Object> name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment