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

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

Issue 10910161: Partial ia32 implementation of optimized try/catch (by Kevin Millikin) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed build. Created 8 years, 3 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 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.
« 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