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

Unified Diff: src/ia32/virtual-frame-ia32.h

Issue 975001: Use untagged int32 values in evaluation of side-effect free expressions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « src/ia32/register-allocator-ia32.cc ('k') | src/ia32/virtual-frame-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/ia32/register-allocator-ia32.cc ('k') | src/ia32/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698