| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 9c5f31e2cf4c5d00af038c08f8852ffb0dceba4d..e10ddcd3b33f218c80808814d2f0b046d98b0ce8 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -893,8 +893,9 @@ void MacroAssembler::JumpToHandlerEntry() {
|
| shr(edx, StackHandler::kKindWidth);
|
| mov(edx, FieldOperand(ebx, edx, times_4, FixedArray::kHeaderSize));
|
| SmiUntag(edx);
|
| - lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize));
|
| - jmp(edi);
|
| + // Preserve code object in edi for the optimizer handler.
|
| + lea(edx, FieldOperand(edi, edx, times_1, Code::kHeaderSize));
|
| + jmp(edx);
|
| }
|
|
|
|
|
| @@ -911,10 +912,14 @@ void MacroAssembler::Throw(Register value) {
|
| if (!value.is(eax)) {
|
| mov(eax, value);
|
| }
|
| - // Drop the stack pointer to the top of the top handler.
|
| +
|
| + // Get the handler address.
|
| ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
| - mov(esp, Operand::StaticVariable(handler_address));
|
| - // Restore the next handler.
|
| + mov(ecx, Operand::StaticVariable(handler_address));
|
| +
|
| + // Drop the stack pointer to the top of the top handler and restore the
|
| + // next handler.
|
| + mov(esp, ecx);
|
| pop(Operand::StaticVariable(handler_address));
|
|
|
| // Remove the code object and state, compute the handler address in edi.
|
|
|