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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 20680002: Rebase of partial ia32 implementation of optimized try/catch (started by Kevin Millikin, continued … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix detection of CATCH frames (fixes debuger exception reporting anf breaks another assertion...). Created 7 years, 5 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/ia32/lithium-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698