| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index efbdf135445b9988494af3affdfab5775f3bd9f4..4264b8656fbf7ead58a13689aa62385165609514 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -2241,8 +2241,7 @@ void FullCodeGenerator::EmitCallWithIC(Call* expr,
|
| isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode);
|
| CallIC(ic, mode, expr->CallFeedbackId());
|
| RecordJSReturnSite(expr);
|
| - // Restore context register.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| context()->Plug(eax);
|
| }
|
|
|
| @@ -2273,8 +2272,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call* expr,
|
| __ mov(ecx, Operand(esp, (arg_count + 1) * kPointerSize)); // Key.
|
| CallIC(ic, RelocInfo::CODE_TARGET, expr->CallFeedbackId());
|
| RecordJSReturnSite(expr);
|
| - // Restore context register.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| context()->DropAndPlug(1, eax); // Drop the key still on the stack.
|
| }
|
|
|
| @@ -2305,8 +2303,7 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) {
|
| __ CallStub(&stub, expr->CallFeedbackId());
|
|
|
| RecordJSReturnSite(expr);
|
| - // Restore context register.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| context()->DropAndPlug(1, eax);
|
| }
|
|
|
| @@ -2375,8 +2372,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
| __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
|
| __ CallStub(&stub);
|
| RecordJSReturnSite(expr);
|
| - // Restore context register.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| context()->DropAndPlug(1, eax);
|
|
|
| } else if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
| @@ -3395,7 +3391,7 @@ void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
|
| ParameterCount count(arg_count);
|
| __ InvokeFunction(edi, count, CALL_FUNCTION,
|
| NullCallWrapper(), CALL_AS_METHOD);
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| __ jmp(&done);
|
|
|
| __ bind(&runtime);
|
| @@ -3804,7 +3800,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| // Drop temp values from the stack, and restore context register.
|
| __ add(esp, Immediate(3 * kPointerSize));
|
|
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| context()->Plug(eax);
|
| }
|
|
|
| @@ -3839,8 +3835,7 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| Handle<Code> ic =
|
| isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode);
|
| CallIC(ic, mode, expr->CallRuntimeFeedbackId());
|
| - // Restore context register.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + __ ReloadContextFromFrame();
|
| } else {
|
| // Call the C runtime function.
|
| __ CallRuntime(expr->function(), arg_count);
|
|
|