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

Unified Diff: src/jump-target.h

Issue 18362: Experimental: statically distinguish between named basic block entries... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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/codegen-ia32.cc ('k') | src/jump-target-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jump-target.h
===================================================================
--- src/jump-target.h (revision 1104)
+++ src/jump-target.h (working copy)
@@ -52,9 +52,13 @@
class JumpTarget : public ZoneObject { // Shadows are dynamically allocated.
public:
+ // Forward-only jump targets can only be reached by forward CFG edges.
+ enum Directionality { FORWARD_ONLY, BIDIRECTIONAL };
+
// Construct a jump target with a given code generator used to generate
// code and to provide access to a current frame.
- explicit JumpTarget(CodeGenerator* cgen);
+ explicit JumpTarget(CodeGenerator* cgen,
+ Directionality direction = FORWARD_ONLY);
// Construct a jump target without a code generator. A code generator
// must be supplied before using the jump target as a label. This is
@@ -63,10 +67,12 @@
virtual ~JumpTarget() { Unuse(); }
- // Supply a code generator. This function expects to be given a non-null
- // code generator, and to be called only when the code generator is not
- // yet set.
- void set_code_generator(CodeGenerator* cgen);
+ // Supply a code generator and directionality to an already
+ // constructed jump target. This function expects to be given a
+ // non-null code generator, and to be called only when the code
+ // generator is not yet set.
+ void Initialize(CodeGenerator* cgen,
+ Directionality direction = FORWARD_ONLY);
// Accessors.
CodeGenerator* code_generator() const { return cgen_; }
@@ -145,6 +151,9 @@
MacroAssembler* masm_;
private:
+ // Directionality flag set at initialization time.
+ Directionality direction_;
+
// A list of frames reaching this block via forward jumps.
List<VirtualFrame*> reaching_frames_;
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/jump-target-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698