| Index: src/ic/ic.cc
|
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc
|
| index cfc2a81feee0f1d6119e3da25f3551bbe659321a..acd420b8567f043c9833c989e56babeffaf8dc7a 100644
|
| --- a/src/ic/ic.cc
|
| +++ b/src/ic/ic.cc
|
| @@ -1008,7 +1008,10 @@ Handle<Code> LoadIC::initialize_stub(Isolate* isolate,
|
| Handle<Code> LoadIC::initialize_stub_in_optimized_code(
|
| Isolate* isolate, ExtraICState extra_state) {
|
| if (FLAG_vector_ics) {
|
| - return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode();
|
| + if (FLAG_hydrogen_vector_dispatcher) {
|
| + return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode();
|
| + }
|
| + return VectorRawLoadStub(isolate, LoadICState(extra_state)).GetCode();
|
| }
|
| return initialize_stub(isolate, extra_state);
|
| }
|
| @@ -1025,7 +1028,10 @@ Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) {
|
|
|
| Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(Isolate* isolate) {
|
| if (FLAG_vector_ics) {
|
| - return VectorKeyedLoadStub(isolate).GetCode();
|
| + if (FLAG_hydrogen_vector_dispatcher) {
|
| + return VectorKeyedLoadStub(isolate).GetCode();
|
| + }
|
| + return VectorRawKeyedLoadStub(isolate).GetCode();
|
| }
|
| return initialize_stub(isolate);
|
| }
|
| @@ -2314,13 +2320,23 @@ RUNTIME_FUNCTION(LoadIC_Miss) {
|
|
|
| if (FLAG_vector_ics) {
|
| DCHECK(args.length() == 4);
|
| - Handle<Smi> slot = args.at<Smi>(2);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(3);
|
| + Handle<Smi> slot = args.at<Smi>(2);
|
| FeedbackVectorICSlot vector_slot = vector->ToICSlot(slot->value());
|
| - LoadICNexus nexus(vector, vector_slot);
|
| - LoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
|
| + if (vector->GetKind(vector_slot) == Code::LOAD_IC) {
|
| + LoadICNexus nexus(vector, vector_slot);
|
| + LoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Load(receiver, key));
|
| + } else {
|
| + DCHECK(vector->GetKind(vector_slot) == Code::KEYED_LOAD_IC);
|
| + KeyedLoadICNexus nexus(vector, vector_slot);
|
| + KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Load(receiver, key));
|
| + }
|
| } else {
|
| DCHECK(args.length() == 2);
|
| LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
|
| @@ -2962,10 +2978,20 @@ RUNTIME_FUNCTION(LoadIC_MissFromStubFailure) {
|
| Handle<Smi> slot = args.at<Smi>(2);
|
| Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(3);
|
| FeedbackVectorICSlot vector_slot = vector->ToICSlot(slot->value());
|
| - LoadICNexus nexus(vector, vector_slot);
|
| - LoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| - ic.UpdateState(receiver, key);
|
| - ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
|
| + if (vector->GetKind(vector_slot) == Code::LOAD_IC) {
|
| + LoadICNexus nexus(vector, vector_slot);
|
| + LoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Load(receiver, key));
|
| + } else {
|
| + DCHECK(vector->GetKind(vector_slot) == Code::KEYED_LOAD_IC);
|
| + KeyedLoadICNexus nexus(vector, vector_slot);
|
| + KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
|
| + ic.UpdateState(receiver, key);
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + ic.Load(receiver, key));
|
| + }
|
| } else {
|
| DCHECK(args.length() == 2);
|
| LoadIC ic(IC::EXTRA_CALL_FRAME, isolate);
|
|
|