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

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

Issue 16412: Experimental: push the new code generator infrastructure into the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years 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/jump-target-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-ia32.h
===================================================================
--- src/virtual-frame-ia32.h (revision 1016)
+++ src/virtual-frame-ia32.h (working copy)
@@ -58,6 +58,12 @@
data_.reg_ = no_reg;
}
+ // Factory function to construct an invalid frame element.
+ static FrameElement InvalidElement() {
+ FrameElement result;
+ return result;
+ }
+
// Factory function to construct an in-memory frame element.
static FrameElement MemoryElement() {
FrameElement result;
@@ -97,6 +103,7 @@
type_ = (type_ & ~SyncField::mask()) | SyncField::encode(NOT_SYNCED);
}
+ bool is_valid() const { return type() != INVALID; }
bool is_memory() const { return type() == MEMORY; }
bool is_register() const { return type() == REGISTER; }
bool is_constant() const { return type() == CONSTANT; }
@@ -242,6 +249,10 @@
return Operand(esp, index * kPointerSize);
}
+ // Random-access store to a frame-top relative frame element. The result
+ // becomes owned by the frame and is invalidated.
+ void SetElementAt(int index, Result* value);
+
// A frame-allocated local as an assembly operand.
Operand LocalAt(int index) const {
ASSERT(0 <= index);
@@ -254,6 +265,13 @@
LoadFrameSlotAt(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.
+ void TakeLocalAt(int index) {
+ TakeFrameSlotAt(local0_index() + index);
+ }
+
// Store the top value on the virtual frame into a local frame slot. The
// value is left in place on top of the frame.
void StoreToLocalAt(int index) {
@@ -278,6 +296,13 @@
LoadFrameSlotAt(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.
+ void TakeParameterAt(int index) {
+ TakeFrameSlotAt(param0_index() + index);
+ }
+
// Store the top value on the virtual frame into a parameter frame slot.
// The value is left in place on top of the frame.
void StoreToParameterAt(int index) {
@@ -293,6 +318,7 @@
// Call a code stub, given the number of arguments it expects on (and
// removes from) the top of the physical frame.
void CallStub(CodeStub* stub, int frame_arg_count);
+ Result CallStub(CodeStub* stub, Result* arg, int frame_arg_count);
Result CallStub(CodeStub* stub,
Result* arg0,
Result* arg1,
@@ -448,6 +474,10 @@
// the frame.
void LoadFrameSlotAt(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);
+
// Store the value on top of the frame to a frame slot (typically a local
// or parameter).
void StoreToFrameSlotAt(int index);
« no previous file with comments | « src/jump-target-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698