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

Side by Side Diff: src/virtual-frame-ia32.cc

Issue 14105: Experimental: fix a pair of bugs in the frame's sync state. In two... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 stack_pointer_ = i + 1; 468 stack_pointer_ = i + 1;
469 __ add(Operand(esp), 469 __ add(Operand(esp),
470 Immediate((stack_pointer_ - i) * kPointerSize)); 470 Immediate((stack_pointer_ - i) * kPointerSize));
471 } 471 }
472 stack_pointer_--; 472 stack_pointer_--;
473 __ pop(target.reg()); 473 __ pop(target.reg());
474 } 474 }
475 } else { 475 } else {
476 // Source is constant. 476 // Source is constant.
477 __ Set(target.reg(), Immediate(source.handle())); 477 __ Set(target.reg(), Immediate(source.handle()));
478 if (target.is_synced()) {
479 if (i > stack_pointer_) {
480 SyncRange(stack_pointer_ + 1, i);
481 }
482 SyncElementAt(i);
483 }
478 } 484 }
479 Use(target.reg()); 485 Use(target.reg());
480 elements_[i] = target; 486 elements_[i] = target;
481 } 487 }
482 } 488 }
483 489
484 // At this point, the frames should be identical. 490 // At this point, the frames should be identical.
485 ASSERT(stack_pointer_ == expected->stack_pointer_); 491 ASSERT(stack_pointer_ == expected->stack_pointer_);
486 #ifdef DEBUG 492 #ifdef DEBUG
487 for (int i = 0; i < elements_.length(); i++) { 493 for (int i = 0; i < elements_.length(); i++) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 elements_[index] = new_element; 623 elements_[index] = new_element;
618 Use(temp); 624 Use(temp);
619 elements_.Add(new_element); 625 elements_.Add(new_element);
620 626
621 // Finally, move the element at the index into its new location. 627 // Finally, move the element at the index into its new location.
622 elements_[index].set_sync(); 628 elements_[index].set_sync();
623 __ mov(temp, Operand(ebp, fp_relative(index))); 629 __ mov(temp, Operand(ebp, fp_relative(index)));
624 630
625 cgen_->allocator()->Unuse(temp); 631 cgen_->allocator()->Unuse(temp);
626 } else { 632 } else {
627 // For constants and registers, add a copy of the element to the 633 // For constants and registers, add an (unsynced) copy of the element to
628 // top of the frame. 634 // the top of the frame.
629 ASSERT(element.is_register() || element.is_constant()); 635 ASSERT(element.is_register() || element.is_constant());
630 if (element.is_register()) { 636 if (element.is_register()) {
631 Use(element.reg()); 637 Use(element.reg());
632 } 638 }
639 element.clear_sync();
633 elements_.Add(element); 640 elements_.Add(element);
634 } 641 }
635 } 642 }
636 643
637 644
638 void VirtualFrame::StoreToFrameSlotAt(int index) { 645 void VirtualFrame::StoreToFrameSlotAt(int index) {
639 // Store the value on top of the frame to the virtual frame slot at a 646 // Store the value on top of the frame to the virtual frame slot at a
640 // given index. The value on top of the frame is left in place. 647 // given index. The value on top of the frame is left in place.
641 ASSERT(index >= 0); 648 ASSERT(index >= 0);
642 ASSERT(index < elements_.length()); 649 ASSERT(index < elements_.length());
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 return false; 847 return false;
841 } 848 }
842 } 849 }
843 return true; 850 return true;
844 } 851 }
845 #endif 852 #endif
846 853
847 #undef __ 854 #undef __
848 855
849 } } // namespace v8::internal 856 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698