| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 17d4aac8add74eda4d6a69bc060427b26360b065..6fac33f8938811e5f82128c319aaabeafe0a8fff 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -917,8 +917,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);
|
| }
|
|
|
|
|
| @@ -935,10 +936,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.
|
|
|