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

Unified Diff: src/codegen.h

Issue 118226: Simplify the processing of deferred code in the code generator. Our... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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/arm/virtual-frame-arm.h ('k') | src/codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.h
===================================================================
--- src/codegen.h (revision 2099)
+++ src/codegen.h (working copy)
@@ -125,29 +125,14 @@
virtual void Generate() = 0;
- CodeGenerator* cgen() const { return CodeGeneratorScope::Current(); }
+ MacroAssembler* masm() { return masm_; }
- // Set the virtual frame for entry to the deferred code as a
- // snapshot of the code generator's current frame (plus additional
- // results). This is optional, but should be done before branching
- // or jumping to the deferred code.
- inline void SetEntryFrame(Result* arg);
- inline void SetEntryFrame(Result* arg0, Result* arg1);
-
- JumpTarget* enter() { return &enter_; }
-
- void BindExit() { exit_.Bind(0); }
- void BindExit(Result* result) { exit_.Bind(result, 1); }
- void BindExit(Result* result0, Result* result1) {
- exit_.Bind(result0, result1, 2);
- }
- void BindExit(Result* result0, Result* result1, Result* result2) {
- exit_.Bind(result0, result1, result2, 3);
- }
-
int statement_position() const { return statement_position_; }
int position() const { return position_; }
+ Label* entry_label() { return &entry_label_; }
+ Label* exit_label() { return &exit_label_; }
+
#ifdef DEBUG
void set_comment(const char* comment) { comment_ = comment; }
const char* comment() const { return comment_; }
@@ -156,13 +141,35 @@
const char* comment() const { return ""; }
#endif
+ inline void Jump();
+ inline void Branch(Condition cc);
+ void BindExit() { masm_->bind(&exit_label_); }
+
+ void SaveRegisters();
+ void RestoreRegisters();
+
protected:
- JumpTarget enter_;
- JumpTarget exit_;
+ MacroAssembler* masm_;
private:
+ // Constants indicating special actions. They should not be multiples
+ // of kPointerSize so they will not collide with valid offsets from
+ // the frame pointer.
+ static const int kIgnore = -1;
+ static const int kPush = 1;
+
+ // This flag is ored with a valid offset from the frame pointer, so
+ // it should fit in the low zero bits of a valid offset.
+ static const int kSyncedFlag = 2;
+
int statement_position_;
int position_;
+
+ Label entry_label_;
+ Label exit_label_;
+
+ int registers_[RegisterAllocator::kNumRegisters];
+
#ifdef DEBUG
const char* comment_;
#endif
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698