| Index: src/ic/ic.cc
|
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc
|
| index b72791aa9eabcd45533901eac99757f38d063ef2..985f1da99c27d8737f8974cc27e47f66ba1d42e6 100644
|
| --- a/src/ic/ic.cc
|
| +++ b/src/ic/ic.cc
|
| @@ -2237,7 +2237,8 @@ void CallIC::HandleMiss(Handle<Object> function) {
|
| RUNTIME_FUNCTION(Runtime_CallIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<Object> function = args.at<Object>(0);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(1);
|
| Handle<Smi> slot = args.at<Smi>(2);
|
| @@ -2253,9 +2254,9 @@ RUNTIME_FUNCTION(Runtime_CallIC_Miss) {
|
| RUNTIME_FUNCTION(Runtime_LoadIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - Handle<Object> receiver = args.at<Object>(0);
|
| -
|
| DCHECK_EQ(4, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| + Handle<Object> receiver = args.at<Object>(0);
|
| Handle<Smi> slot = args.at<Smi>(2);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(3);
|
| FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| @@ -2294,6 +2295,7 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| DCHECK_EQ(2, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<JSGlobalObject> global = isolate->global_object();
|
| Handle<Smi> slot = args.at<Smi>(0);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(1);
|
| @@ -2364,10 +2366,10 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Slow) {
|
| RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| + DCHECK_EQ(4, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<Object> receiver = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| -
|
| - DCHECK(args.length() == 4);
|
| Handle<Smi> slot = args.at<Smi>(2);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(3);
|
| FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| @@ -2381,8 +2383,8 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) {
|
| RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - DCHECK_EQ(4, args.length());
|
| typedef LoadWithVectorDescriptor Descriptor;
|
| + DCHECK_EQ(Descriptor::kParameterCount, args.length());
|
| Handle<Object> receiver = args.at<Object>(Descriptor::kReceiver);
|
| Handle<Object> key = args.at<Object>(Descriptor::kName);
|
| Handle<Smi> slot = args.at<Smi>(Descriptor::kSlot);
|
| @@ -2400,11 +2402,11 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) {
|
| RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| + DCHECK_EQ(5, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<Object> receiver = args.at<Object>(0);
|
| Handle<Name> key = args.at<Name>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| -
|
| - DCHECK(args.length() == 5 || args.length() == 6);
|
| Handle<Smi> slot = args.at<Smi>(3);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(4);
|
| FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| @@ -2427,8 +2429,8 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
|
| RUNTIME_FUNCTION(Runtime_StoreIC_MissFromStubFailure) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - DCHECK_EQ(5, args.length());
|
| typedef StoreWithVectorDescriptor Descriptor;
|
| + DCHECK_EQ(Descriptor::kParameterCount, args.length());
|
| Handle<Object> receiver = args.at<Object>(Descriptor::kReceiver);
|
| Handle<Name> key = args.at<Name>(Descriptor::kName);
|
| Handle<Object> value = args.at<Object>(Descriptor::kValue);
|
| @@ -2452,55 +2454,12 @@ RUNTIME_FUNCTION(Runtime_StoreIC_MissFromStubFailure) {
|
| }
|
| }
|
|
|
| -RUNTIME_FUNCTION(Runtime_TransitionStoreIC_MissFromStubFailure) {
|
| - TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| - HandleScope scope(isolate);
|
| - Handle<Object> receiver = args.at<Object>(0);
|
| - Handle<Name> key = args.at<Name>(1);
|
| - Handle<Object> value = args.at<Object>(2);
|
| -
|
| - int length = args.length();
|
| - DCHECK(length == 5 || length == 6);
|
| - // TODO(ishell): use VectorStoreTransitionDescriptor indices here and update
|
| - // this comment:
|
| - //
|
| - // We might have slot and vector, for a normal miss (slot(3), vector(4)).
|
| - // Or, map and vector for a transitioning store miss (map(3), vector(4)).
|
| - // In this case, we need to recover the slot from a virtual register.
|
| - // If length == 6, then a map is included (map(3), slot(4), vector(5)).
|
| - Handle<Smi> slot;
|
| - Handle<TypeFeedbackVector> vector;
|
| - if (length == 5) {
|
| - vector = args.at<TypeFeedbackVector>(4);
|
| - slot = handle(
|
| - *reinterpret_cast<Smi**>(isolate->virtual_slot_register_address()),
|
| - isolate);
|
| - } else {
|
| - vector = args.at<TypeFeedbackVector>(5);
|
| - slot = args.at<Smi>(4);
|
| - }
|
| -
|
| - FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value());
|
| - if (vector->GetKind(vector_slot) == FeedbackVectorSlotKind::STORE_IC) {
|
| - StoreICNexus nexus(vector, vector_slot);
|
| - StoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
|
| - } else {
|
| - DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
|
| - vector->GetKind(vector_slot));
|
| - KeyedStoreICNexus nexus(vector, vector_slot);
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
|
| - }
|
| -}
|
| -
|
| // Used from ic-<arch>.cc.
|
| RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| DCHECK_EQ(5, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<Object> receiver = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| @@ -2517,8 +2476,8 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) {
|
| RUNTIME_FUNCTION(Runtime_KeyedStoreIC_MissFromStubFailure) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - DCHECK_EQ(5, args.length());
|
| typedef StoreWithVectorDescriptor Descriptor;
|
| + DCHECK_EQ(Descriptor::kParameterCount, args.length());
|
| Handle<Object> receiver = args.at<Object>(Descriptor::kReceiver);
|
| Handle<Object> key = args.at<Object>(Descriptor::kName);
|
| Handle<Object> value = args.at<Object>(Descriptor::kValue);
|
| @@ -2536,6 +2495,7 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_MissFromStubFailure) {
|
| RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) {
|
| HandleScope scope(isolate);
|
| DCHECK_EQ(5, args.length());
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<Object> object = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| @@ -2552,16 +2512,14 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) {
|
| RUNTIME_FUNCTION(Runtime_ElementsTransitionAndStoreIC_Miss) {
|
| TimerEventScope<TimerEventIcMiss> timer(isolate);
|
| HandleScope scope(isolate);
|
| - // Length == 5 or 6, depending on whether the vector slot
|
| - // is passed in a virtual register or not.
|
| - DCHECK(args.length() == 5 || args.length() == 6);
|
| + // Runtime functions don't follow the IC's calling convention.
|
| Handle<Object> object = args.at<Object>(0);
|
| Handle<Object> key = args.at<Object>(1);
|
| Handle<Object> value = args.at<Object>(2);
|
| Handle<Map> map = args.at<Map>(3);
|
| LanguageMode language_mode;
|
| KeyedStoreICNexus nexus(isolate);
|
| - KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| + KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| language_mode = ic.language_mode();
|
| if (object->IsJSObject()) {
|
| JSObject::TransitionElementsKind(Handle<JSObject>::cast(object),
|
|
|