Index: src/virtual-frame.cc |
=================================================================== |
--- src/virtual-frame.cc (revision 1990) |
+++ src/virtual-frame.cc (working copy) |
@@ -35,20 +35,6 @@ |
// ------------------------------------------------------------------------- |
// VirtualFrame implementation. |
-VirtualFrame::SpilledScope::SpilledScope(CodeGenerator* cgen) |
- : cgen_(cgen), |
- previous_state_(cgen->in_spilled_code()) { |
- ASSERT(cgen->has_valid_frame()); |
- cgen->frame()->SpillAll(); |
- cgen->set_in_spilled_code(true); |
-} |
- |
- |
-VirtualFrame::SpilledScope::~SpilledScope() { |
- cgen_->set_in_spilled_code(previous_state_); |
-} |
- |
- |
// When cloned, a frame is a deep copy of the original. |
VirtualFrame::VirtualFrame(VirtualFrame* original) |
: cgen_(original->cgen_), |
@@ -125,19 +111,6 @@ |
} |
-// Modify the state of the virtual frame to match the actual frame by |
-// removing elements from the top of the virtual frame. The elements will |
-// be externally popped from the actual frame (eg, by a runtime call). No |
-// code is emitted. |
-void VirtualFrame::Forget(int count) { |
- ASSERT(count >= 0); |
- ASSERT(stack_pointer_ == elements_.length() - 1); |
- |
- stack_pointer_ -= count; |
- ForgetElements(count); |
-} |
- |
- |
void VirtualFrame::ForgetElements(int count) { |
ASSERT(count >= 0); |
ASSERT(elements_.length() >= count); |
@@ -158,27 +131,6 @@ |
} |
-void VirtualFrame::Use(Register reg, int index) { |
- ASSERT(register_locations_[reg.code()] == kIllegalIndex); |
- register_locations_[reg.code()] = index; |
- cgen_->allocator()->Use(reg); |
-} |
- |
- |
-void VirtualFrame::Unuse(Register reg) { |
- ASSERT(register_locations_[reg.code()] != kIllegalIndex); |
- register_locations_[reg.code()] = kIllegalIndex; |
- cgen_->allocator()->Unuse(reg); |
-} |
- |
- |
-void VirtualFrame::Spill(Register target) { |
- if (is_used(target)) { |
- SpillElementAt(register_index(target)); |
- } |
-} |
- |
- |
// If there are any registers referenced only by the frame, spill one. |
Register VirtualFrame::SpillAnyRegister() { |
// Find the leftmost (ordered by register code) register whose only |
@@ -385,17 +337,10 @@ |
void VirtualFrame::PushFrameSlotAt(int index) { |
- FrameElement new_element = CopyElementAt(index); |
- elements_.Add(new_element); |
+ elements_.Add(CopyElementAt(index)); |
} |
-Result VirtualFrame::CallStub(CodeStub* stub, int arg_count) { |
- PrepareForCall(arg_count, arg_count); |
- return RawCallStub(stub); |
-} |
- |
- |
void VirtualFrame::Push(Register reg, StaticType static_type) { |
if (is_used(reg)) { |
int index = register_index(reg); |
@@ -420,17 +365,6 @@ |
} |
-void VirtualFrame::Push(Result* result) { |
- if (result->is_register()) { |
- Push(result->reg(), result->static_type()); |
- } else { |
- ASSERT(result->is_constant()); |
- Push(result->handle()); |
- } |
- result->Unuse(); |
-} |
- |
- |
void VirtualFrame::Nip(int num_dropped) { |
ASSERT(num_dropped >= 0); |
if (num_dropped == 0) return; |