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

Unified Diff: src/codegen.h

Issue 13746: Experimental: thread live register references to deferred code.... (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 | « no previous file | src/codegen.cc » ('j') | src/codegen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.h
===================================================================
--- src/codegen.h (revision 969)
+++ src/codegen.h (working copy)
@@ -44,6 +44,7 @@
// shared code:
// CodeGenerator::CodeGenerator
// CodeGenerator::~CodeGenerator
+// CodeGenerator::SetFrame
// CodeGenerator::ProcessDeferred
// CodeGenerator::GenCode
// CodeGenerator::BuildBoilerplate
@@ -81,16 +82,29 @@
class DeferredCode: public ZoneObject {
public:
explicit DeferredCode(CodeGenerator* generator);
- virtual ~DeferredCode() { }
+ virtual ~DeferredCode() {}
virtual void Generate() = 0;
MacroAssembler* masm() const { return masm_; }
CodeGenerator* generator() const { return generator_; }
- JumpTarget* enter() { return &enter_; }
- JumpTarget* exit() { return &exit_; }
+ // Emit a conditional branch to the code entry.
+ void BranchTo(Condition cc);
+ // Bind the exit target of the code.
+ void BindExit();
+
+ // Emit an exit from the code if the exit target is bound.
+ void ExitIfBound();
+
+ Label* enter() { return &enter_; }
+
+ VirtualFrame* frame() { return frame_; }
+ void clear_frame() { frame_ = NULL; }
+
+ RegisterFile* registers() { return &registers_; }
+
int statement_position() const { return statement_position_; }
int position() const { return position_; }
@@ -110,8 +124,17 @@
private:
CodeGenerator* const generator_;
- JumpTarget enter_;
+
+ // The entry is a label, paired with a known frame and a known global
+ // register file. It is not a jump target because it doesn't use any of
+ // the jump target's branch or bind machinery.
+ Label enter_;
+ VirtualFrame* frame_;
+ RegisterFile registers_;
+
+ // The exit target is a regular jump target.
JumpTarget exit_;
+
int statement_position_;
int position_;
#ifdef DEBUG
« no previous file with comments | « no previous file | src/codegen.cc » ('j') | src/codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698