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

Unified Diff: src/virtual-frame-ia32.cc

Issue 42017: Fix issue 265 by handling extra statement state on the frame based on... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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/virtual-frame-ia32.h ('k') | test/mjsunit/bugs/bug-265.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-ia32.cc
===================================================================
--- src/virtual-frame-ia32.cc (revision 1481)
+++ src/virtual-frame-ia32.cc (working copy)
@@ -171,8 +171,11 @@
MergeMoveRegistersToRegisters(expected);
MergeMoveMemoryToRegisters(expected);
- // Fix any sync bit problems.
- for (int i = 0; i <= stack_pointer_; i++) {
+ // Fix any sync bit problems from the bottom-up, stopping when we
+ // hit the stack pointer or the top of the frame if the stack
+ // pointer is floating above the frame.
+ int limit = Min(stack_pointer_, elements_.length() - 1);
+ for (int i = 0; i <= limit; i++) {
FrameElement source = elements_[i];
FrameElement target = expected->elements_[i];
if (source.is_synced() && !target.is_synced()) {
@@ -209,7 +212,10 @@
int esi_caches = kIllegalIndex;
// A "singleton" memory element.
FrameElement memory_element = FrameElement::MemoryElement();
- for (int i = stack_pointer_; i >= 0; i--) {
+ // Loop downward from the stack pointer or the top of the frame if
+ // the stack pointer is floating above the frame.
+ int start = Min(stack_pointer_, elements_.length() - 1);
+ for (int i = start; i >= 0; i--) {
FrameElement target = expected->elements_[i];
if (target.is_memory()) {
FrameElement source = elements_[i];
« no previous file with comments | « src/virtual-frame-ia32.h ('k') | test/mjsunit/bugs/bug-265.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698