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

Unified Diff: vm/code_generator_ia32.cc

Issue 10262033: Fix stack pointer reset bug in entry to catch blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 | « no previous file | vm/code_generator_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator_ia32.cc
===================================================================
--- vm/code_generator_ia32.cc (revision 7165)
+++ vm/code_generator_ia32.cc (working copy)
@@ -2821,8 +2821,11 @@
// Restore ESP from EBP as we are coming from a throw and the code for
// popping arguments has not been run.
ASSERT(locals_space_size() >= 0);
- __ movl(ESP, EBP);
- __ subl(ESP, Immediate(locals_space_size()));
+ if (locals_space_size() == 0) {
+ __ movl(ESP, EBP);
+ } else {
+ __ leal(ESP, Address(EBP, -locals_space_size()));
+ }
// The JumpToExceptionHandler trampoline code sets up
// - the exception object in EAX (kExceptionObjectReg)
« no previous file with comments | « no previous file | vm/code_generator_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698