Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Unified Diff: src/ia32/full-codegen-ia32.cc

Issue 13176002: factor out "ReloadContextFromFrame" (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698