Index: src/ia32/virtual-frame-ia32.h |
=================================================================== |
--- src/ia32/virtual-frame-ia32.h (revision 4147) |
+++ src/ia32/virtual-frame-ia32.h (working copy) |
@@ -242,6 +242,11 @@ |
PushFrameSlotAt(local0_index() + index); |
} |
+ // Push a copy of the value of a local frame slot on top of the frame. |
+ void UntaggedPushLocalAt(int index) { |
+ UntaggedPushFrameSlotAt(local0_index() + index); |
+ } |
+ |
// Push the value of a local frame slot on top of the frame and invalidate |
// the local slot. The slot should be written to before trying to read |
// from it again. |
@@ -282,6 +287,11 @@ |
PushFrameSlotAt(param0_index() + index); |
} |
+ // Push a copy of the value of a parameter frame slot on top of the frame. |
+ void UntaggedPushParameterAt(int index) { |
+ UntaggedPushFrameSlotAt(param0_index() + index); |
+ } |
+ |
// Push the value of a paramter frame slot on top of the frame and |
// invalidate the parameter slot. The slot should be written to before |
// trying to read from it again. |
@@ -399,6 +409,8 @@ |
inline void Push(Handle<Object> value); |
inline void Push(Smi* value); |
+ void PushUntaggedElement(Handle<Object> value); |
+ |
// Pushing a result invalidates it (its contents become owned by the |
// frame). |
void Push(Result* result) { |
@@ -410,6 +422,10 @@ |
ASSERT(result->is_constant()); |
Push(result->handle()); |
} |
+ if (cgen()->in_safe_int32_mode()) { |
+ ASSERT(result->is_untagged_int32()); |
+ elements_[element_count() - 1].set_untagged_int32(true); |
+ } |
result->Unuse(); |
} |
@@ -422,6 +438,14 @@ |
// the frame. Nip(k) is equivalent to x = Pop(), Drop(k), Push(x). |
inline void Nip(int num_dropped); |
+ // Check that the frame has no elements containing untagged int32 elements. |
+ bool HasNoUntaggedInt32Elements() { |
+ for (int i = 0; i < element_count(); ++i) { |
+ if (elements_[i].is_untagged_int32()) return false; |
+ } |
+ return true; |
+ } |
+ |
// Update the type information of a local variable frame element directly. |
inline void SetTypeForLocalAt(int index, NumberInfo info); |
@@ -533,6 +557,11 @@ |
// the frame. |
inline void PushFrameSlotAt(int index); |
+ // Push a copy of a frame slot (typically a local or parameter) on top of |
+ // the frame, at an untagged int32 value. Bails out if the value is not |
+ // an int32. |
+ void UntaggedPushFrameSlotAt(int index); |
+ |
// Push a the value of a frame slot (typically a local or parameter) on |
// top of the frame and invalidate the slot. |
void TakeFrameSlotAt(int index); |