| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 0ad5d778ec71c0813b352e50e6c8ed16005fc993..1b4ca5457fe8a3ae45d16d73ebd2c974946bd7f0 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -974,7 +974,7 @@ void MacroAssembler::EnterApiExitFrame(int argc) {
|
| }
|
|
|
|
|
| -void MacroAssembler::LeaveExitFrame(bool save_doubles) {
|
| +void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) {
|
| // Optionally restore all XMM registers.
|
| if (save_doubles) {
|
| const int offset = -2 * kPointerSize;
|
| @@ -984,15 +984,20 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) {
|
| }
|
| }
|
|
|
| - // Get the return address from the stack and restore the frame pointer.
|
| - mov(ecx, Operand(ebp, 1 * kPointerSize));
|
| - mov(ebp, Operand(ebp, 0 * kPointerSize));
|
| + if (pop_arguments) {
|
| + // Get the return address from the stack and restore the frame pointer.
|
| + mov(ecx, Operand(ebp, 1 * kPointerSize));
|
| + mov(ebp, Operand(ebp, 0 * kPointerSize));
|
|
|
| - // Pop the arguments and the receiver from the caller stack.
|
| - lea(esp, Operand(esi, 1 * kPointerSize));
|
| + // Pop the arguments and the receiver from the caller stack.
|
| + lea(esp, Operand(esi, 1 * kPointerSize));
|
|
|
| - // Push the return address to get ready to return.
|
| - push(ecx);
|
| + // Push the return address to get ready to return.
|
| + push(ecx);
|
| + } else {
|
| + // Otherwise just leave the exit frame.
|
| + leave();
|
| + }
|
|
|
| LeaveExitFrameEpilogue(true);
|
| }
|
|
|