Index: src/arm/virtual-frame-arm.h |
=================================================================== |
--- src/arm/virtual-frame-arm.h (revision 4640) |
+++ src/arm/virtual-frame-arm.h (working copy) |
@@ -229,8 +229,9 @@ |
// An element of the expression stack as an assembly operand. |
MemOperand ElementAt(int index) { |
- AssertIsSpilled(); |
- return MemOperand(sp, index * kPointerSize); |
+ int adjusted_index = index - kVirtualElements[top_of_stack_state_]; |
+ ASSERT(adjusted_index >= 0); |
Søren Thygesen Gjesse
2010/05/11 13:46:12
You don't want to spill to the point where this al
Erik Corry
2010/05/12 09:00:32
I think I want to keep that explicit since we want
|
+ return MemOperand(sp, adjusted_index * kPointerSize); |
} |
// A frame-allocated local as an assembly operand. |
@@ -355,6 +356,12 @@ |
void EmitPush(MemOperand operand); |
void EmitPushRoot(Heap::RootListIndex index); |
+ // Overwrite the nth thing on the stack. If the nth position is in a |
+ // register then this turns into a mov, otherwise an str. Afterwards |
+ // you can still use the register even if it is a register that can be |
+ // used for TOS (r0 or r1). |
+ void OverwriteStackPosition(Register reg, int this_far_down); |
Søren Thygesen Gjesse
2010/05/11 13:46:12
Why is this not called SetElementAt?
Erik Corry
2010/05/12 09:00:32
Done.
|
+ |
// Get a register which is free and which must be immediately used to |
// push on the top of the stack. |
Register GetTOSRegister(); |
@@ -459,6 +466,10 @@ |
// onto the physical stack and made free. |
void EnsureOneFreeTOSRegister(); |
+ // Emit instructions to get the top of stack state from where we are to where |
+ // we want to be. |
+ void MergeTOSTo(TopOfStack expected_state); |
+ |
inline bool Equals(VirtualFrame* other); |
friend class JumpTarget; |