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

Unified Diff: src/ia32/jump-target-ia32.cc

Issue 113837: Change the register allocator so that it no longer tracks references... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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
Index: src/ia32/jump-target-ia32.cc
===================================================================
--- src/ia32/jump-target-ia32.cc (revision 2055)
+++ src/ia32/jump-target-ia32.cc (working copy)
@@ -84,7 +84,7 @@
// branch.
VirtualFrame* fall_through_frame = cgen()->frame();
VirtualFrame* branch_frame = new VirtualFrame(fall_through_frame);
- RegisterFile non_frame_registers = RegisterAllocator::Reserved();
+ RegisterFile non_frame_registers;
cgen()->SetFrame(branch_frame, &non_frame_registers);
// Check if we can avoid merge code.
@@ -179,14 +179,14 @@
ASSERT(reaching_frames_.is_empty());
ASSERT(!cgen()->has_valid_frame());
- RegisterFile reserved = RegisterAllocator::Reserved();
+ RegisterFile empty;
if (direction_ == BIDIRECTIONAL) {
// Copy the entry frame so the original can be used for a
// possible backward jump.
- cgen()->SetFrame(new VirtualFrame(entry_frame_), &reserved);
+ cgen()->SetFrame(new VirtualFrame(entry_frame_), &empty);
} else {
// Take ownership of the entry frame.
- cgen()->SetFrame(entry_frame_, &reserved);
+ cgen()->SetFrame(entry_frame_, &empty);
entry_frame_ = NULL;
}
__ bind(&entry_label_);
@@ -200,8 +200,7 @@
// The stack pointer can be floating above the top of the
// virtual frame before the bind. Afterward, it should not.
VirtualFrame* frame = cgen()->frame();
- int difference =
- frame->stack_pointer_ - (frame->elements_.length() - 1);
+ int difference = frame->stack_pointer_ - (frame->element_count() - 1);
if (difference > 0) {
frame->stack_pointer_ -= difference;
__ add(Operand(esp), Immediate(difference * kPointerSize));
@@ -225,15 +224,14 @@
// possible backward jumps. Pick up the only reaching frame, take
// ownership of it, and use it for the block about to be emitted.
VirtualFrame* frame = reaching_frames_[0];
- RegisterFile reserved = RegisterAllocator::Reserved();
- cgen()->SetFrame(frame, &reserved);
+ RegisterFile empty;
+ cgen()->SetFrame(frame, &empty);
reaching_frames_[0] = NULL;
__ bind(&merge_labels_[0]);
// The stack pointer can be floating above the top of the
// virtual frame before the bind. Afterward, it should not.
- int difference =
- frame->stack_pointer_ - (frame->elements_.length() - 1);
+ int difference = frame->stack_pointer_ - (frame->element_count() - 1);
if (difference > 0) {
frame->stack_pointer_ -= difference;
__ add(Operand(esp), Immediate(difference * kPointerSize));
@@ -291,11 +289,11 @@
}
// Pick up the frame for this block. Assume ownership if
// there cannot be backward jumps.
- RegisterFile reserved = RegisterAllocator::Reserved();
+ RegisterFile empty;
if (direction_ == BIDIRECTIONAL) {
- cgen()->SetFrame(new VirtualFrame(frame), &reserved);
+ cgen()->SetFrame(new VirtualFrame(frame), &empty);
} else {
- cgen()->SetFrame(frame, &reserved);
+ cgen()->SetFrame(frame, &empty);
reaching_frames_[i] = NULL;
}
__ bind(&merge_labels_[i]);
@@ -318,8 +316,8 @@
// If this is the fall through frame, and it didn't need
// merge code, we need to pick up the frame so we can jump
// around subsequent merge blocks if necessary.
- RegisterFile reserved = RegisterAllocator::Reserved();
- cgen()->SetFrame(frame, &reserved);
+ RegisterFile empty;
+ cgen()->SetFrame(frame, &empty);
reaching_frames_[i] = NULL;
}
}
@@ -329,8 +327,8 @@
// fall through and none of the reaching frames needed merging.
// In that case, clone the entry frame as the current frame.
if (!cgen()->has_valid_frame()) {
- RegisterFile reserved_registers = RegisterAllocator::Reserved();
- cgen()->SetFrame(new VirtualFrame(entry_frame_), &reserved_registers);
+ RegisterFile empty;
+ cgen()->SetFrame(new VirtualFrame(entry_frame_), &empty);
}
// There may be unprocessed reaching frames that did not need
@@ -355,8 +353,8 @@
// Use a copy of the reaching frame so the original can be saved
// for possible reuse as a backward merge block.
- RegisterFile reserved = RegisterAllocator::Reserved();
- cgen()->SetFrame(new VirtualFrame(reaching_frames_[0]), &reserved);
+ RegisterFile empty;
+ cgen()->SetFrame(new VirtualFrame(reaching_frames_[0]), &empty);
__ bind(&merge_labels_[0]);
cgen()->frame()->MergeTo(entry_frame_);
}

Powered by Google App Engine
This is Rietveld 408576698