| Index: src/ia32/ic-ia32.cc
|
| diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc
|
| index bde3b7e1a199486a6bdd04159e2215c69fe2bfb4..ba6d9d555a7cc89b1020c3bf72bd6425f0d7427f 100644
|
| --- a/src/ia32/ic-ia32.cc
|
| +++ b/src/ia32/ic-ia32.cc
|
| @@ -796,7 +796,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
| // The generated code falls through if both probes miss.
|
| static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
|
| int argc,
|
| - Code::Kind kind) {
|
| + Code::Kind kind,
|
| + Code::ExtraICState extra_ic_state) {
|
| // ----------- S t a t e -------------
|
| // -- ecx : name
|
| // -- edx : receiver
|
| @@ -807,7 +808,7 @@ static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
|
| Code::Flags flags = Code::ComputeFlags(kind,
|
| NOT_IN_LOOP,
|
| MONOMORPHIC,
|
| - Code::kNoExtraICState,
|
| + extra_ic_state,
|
| NORMAL,
|
| argc);
|
| Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
|
| @@ -906,7 +907,8 @@ static void GenerateCallNormal(MacroAssembler* masm, int argc) {
|
|
|
| static void GenerateCallMiss(MacroAssembler* masm,
|
| int argc,
|
| - IC::UtilityId id) {
|
| + IC::UtilityId id,
|
| + Code::ExtraICState extra_ic_state) {
|
| // ----------- S t a t e -------------
|
| // -- ecx : name
|
| // -- esp[0] : return address
|
| @@ -964,12 +966,21 @@ static void GenerateCallMiss(MacroAssembler* masm,
|
| }
|
|
|
| // Invoke the function.
|
| + ReceiverType receiver_type = CallICBase::Contextual::decode(extra_ic_state)
|
| + ? IMPLICIT_RECEIVER
|
| + : EXPLICIT_RECEIVER;
|
| ParameterCount actual(argc);
|
| - __ InvokeFunction(edi, actual, JUMP_FUNCTION);
|
| + __ InvokeFunction(edi,
|
| + actual,
|
| + JUMP_FUNCTION,
|
| + NullCallWrapper(),
|
| + receiver_type);
|
| }
|
|
|
|
|
| -void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
|
| +void CallIC::GenerateMegamorphic(MacroAssembler* masm,
|
| + int argc,
|
| + Code::ExtraICState extra_ic_state) {
|
| // ----------- S t a t e -------------
|
| // -- ecx : name
|
| // -- esp[0] : return address
|
| @@ -980,8 +991,9 @@ void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
|
|
|
| // Get the receiver of the function from the stack; 1 ~ return address.
|
| __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
|
| - GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC);
|
| - GenerateMiss(masm, argc);
|
| + GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state);
|
| +
|
| + GenerateMiss(masm, argc, extra_ic_state);
|
| }
|
|
|
|
|
| @@ -995,11 +1007,13 @@ void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
|
| // -----------------------------------
|
|
|
| GenerateCallNormal(masm, argc);
|
| - GenerateMiss(masm, argc);
|
| + GenerateMiss(masm, argc, Code::kNoExtraICState);
|
| }
|
|
|
|
|
| -void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
|
| +void CallIC::GenerateMiss(MacroAssembler* masm,
|
| + int argc,
|
| + Code::ExtraICState extra_ic_state) {
|
| // ----------- S t a t e -------------
|
| // -- ecx : name
|
| // -- esp[0] : return address
|
| @@ -1008,7 +1022,7 @@ void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
|
| // -- esp[(argc + 1) * 4] : receiver
|
| // -----------------------------------
|
|
|
| - GenerateCallMiss(masm, argc, IC::kCallIC_Miss);
|
| + GenerateCallMiss(masm, argc, IC::kCallIC_Miss, extra_ic_state);
|
| }
|
|
|
|
|
| @@ -1107,7 +1121,10 @@ void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
|
|
|
| __ bind(&lookup_monomorphic_cache);
|
| __ IncrementCounter(counters->keyed_call_generic_lookup_cache(), 1);
|
| - GenerateMonomorphicCacheProbe(masm, argc, Code::KEYED_CALL_IC);
|
| + GenerateMonomorphicCacheProbe(masm,
|
| + argc,
|
| + Code::KEYED_CALL_IC,
|
| + Code::kNoExtraICState);
|
| // Fall through on miss.
|
|
|
| __ bind(&slow_call);
|
| @@ -1157,7 +1174,7 @@ void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) {
|
| // -- esp[(argc + 1) * 4] : receiver
|
| // -----------------------------------
|
|
|
| - GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss);
|
| + GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss, Code::kNoExtraICState);
|
| }
|
|
|
|
|
|
|