Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 14492e9660d28142d32bde830360eb5cfc81c83c..b1e8a709ceced6f54592ffd1dd90f7753032c377 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -123,6 +123,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
bool check_derived_construct) { |
// ----------- S t a t e ------------- |
// -- eax: number of arguments |
+ // -- esi: context |
// -- edi: constructor function |
// -- ebx: allocation site or undefined |
// -- edx: new target |
@@ -134,6 +135,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// Preserve the incoming parameters on the stack. |
__ AssertUndefinedOrAllocationSite(ebx); |
+ __ push(esi); |
__ push(ebx); |
__ SmiTag(eax); |
__ push(eax); |
@@ -201,7 +203,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
} |
// Restore context from the frame. |
- __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
+ __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); |
if (create_implicit_receiver) { |
// If the result is an object (in the ECMA sense), we should get rid |
@@ -324,9 +326,6 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, |
bool is_construct) { |
ProfileEntryHookStub::MaybeCallEntryHook(masm); |
- // Clear the context before we push it when entering the internal frame. |
- __ Move(esi, Immediate(0)); |
- |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
@@ -1863,7 +1862,7 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg, |
// Drop possible interpreter handler/stub frame. |
{ |
Label no_interpreter_frame; |
- __ cmp(Operand(ebp, StandardFrameConstants::kMarkerOffset), |
+ __ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), |
Immediate(Smi::FromInt(StackFrame::STUB))); |
__ j(not_equal, &no_interpreter_frame, Label::kNear); |
__ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
@@ -1873,7 +1872,7 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg, |
// Check if next frame is an arguments adaptor frame. |
Label no_arguments_adaptor, formal_parameter_count_loaded; |
__ mov(scratch2, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
- __ cmp(Operand(scratch2, StandardFrameConstants::kContextOffset), |
+ __ cmp(Operand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset), |
Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
__ j(not_equal, &no_arguments_adaptor, Label::kNear); |