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) {
FeedbackSlotKind kind = vector->GetKind(vector_slot);
if (IsLoadICKind(kind)) {
LoadICNexus nexus(vector, vector_slot);
LoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
LoadIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
} else if (IsLoadGlobalICKind(kind)) {
DCHECK_EQ(*isolate->global_object(), *receiver);
LoadGlobalICNexus nexus(vector, vector_slot);
LoadGlobalIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
LoadGlobalIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(key));
} else {
DCHECK(IsKeyedLoadICKind(kind));
KeyedLoadICNexus nexus(vector, vector_slot);
KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
KeyedLoadIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
}
......@@ -2546,7 +2546,7 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Miss) {
FeedbackSlot vector_slot = vector->ToSlot(slot->value());
LoadGlobalICNexus nexus(vector, vector_slot);
LoadGlobalIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
LoadGlobalIC ic(isolate, &nexus);
ic.UpdateState(global, name);
Handle<Object> result;
......@@ -2608,7 +2608,7 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) {
Handle<FeedbackVector> vector = args.at<FeedbackVector>(3);
FeedbackSlot vector_slot = vector->ToSlot(slot->value());
KeyedLoadICNexus nexus(vector, vector_slot);
KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
KeyedLoadIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
}
......@@ -2626,13 +2626,13 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
FeedbackSlot vector_slot = vector->ToSlot(slot->value());
if (vector->IsStoreIC(vector_slot)) {
StoreICNexus nexus(vector, vector_slot);
StoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
StoreIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
} else {
DCHECK(vector->IsKeyedStoreIC(vector_slot));
KeyedStoreICNexus nexus(vector, vector_slot);
KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
KeyedStoreIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
}
......@@ -2650,7 +2650,7 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) {
Handle<Object> key = args.at(4);
FeedbackSlot vector_slot = vector->ToSlot(slot->value());
KeyedStoreICNexus nexus(vector, vector_slot);
KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
KeyedStoreIC ic(isolate, &nexus);
ic.UpdateState(receiver, key);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
}
......
......@@ -272,8 +272,8 @@ class CallIC : public IC {
class LoadIC : public IC {
public:
LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
: IC(depth, isolate, nexus) {
LoadIC(Isolate* isolate, FeedbackNexus* nexus)
: IC(NO_EXTRA_FRAME, isolate, nexus) {
DCHECK(nexus != NULL);
DCHECK(IsAnyLoad());
}
......@@ -325,8 +325,8 @@ class LoadIC : public IC {
class LoadGlobalIC : public LoadIC {
public:
LoadGlobalIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
: LoadIC(depth, isolate, nexus) {}
LoadGlobalIC(Isolate* isolate, FeedbackNexus* nexus)
: LoadIC(isolate, nexus) {}
MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name);
......@@ -340,9 +340,8 @@ class LoadGlobalIC : public LoadIC {
class KeyedLoadIC : public LoadIC {
public:
KeyedLoadIC(FrameDepth depth, Isolate* isolate,
KeyedLoadICNexus* nexus = NULL)
: LoadIC(depth, isolate, nexus) {
KeyedLoadIC(Isolate* isolate, KeyedLoadICNexus* nexus)
: LoadIC(isolate, nexus) {
DCHECK(nexus != NULL);
}
......@@ -362,8 +361,8 @@ class KeyedLoadIC : public LoadIC {
class StoreIC : public IC {
public:
StoreIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
: IC(depth, isolate, nexus) {
StoreIC(Isolate* isolate, FeedbackNexus* nexus)
: IC(NO_EXTRA_FRAME, isolate, nexus) {
DCHECK(IsAnyStore());
}
......@@ -417,9 +416,8 @@ class KeyedStoreIC : public StoreIC {
return casted_nexus<KeyedStoreICNexus>()->GetKeyedAccessStoreMode();
}
KeyedStoreIC(FrameDepth depth, Isolate* isolate,
KeyedStoreICNexus* nexus = NULL)
: StoreIC(depth, isolate, nexus) {}
KeyedStoreIC(Isolate* isolate, KeyedStoreICNexus* nexus)
: StoreIC(isolate, nexus) {}
MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object,
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