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

Unified Diff: src/jump-target.h

Issue 21040: Experimental: handle single-entry basic blocks as a special case.... (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 1215)
+++ src/jump-target.h (working copy)
@@ -83,29 +83,19 @@
}
// Predicates testing the state of the encapsulated label.
- bool is_bound() const { return expected_frame_ != NULL; }
- bool is_linked() const { return reaching_frames_.length() > 0; }
+ bool is_bound() const { return is_bound_; }
+ bool is_linked() const { return is_linked_; }
bool is_unused() const { return !is_bound() && !is_linked(); }
// Treat the jump target as a fresh one. The expected frame if any
// will be deallocated and there should be no dangling jumps to the
// target (thus no reaching frames).
- void Unuse() {
- ASSERT(!is_linked());
- entry_label_.Unuse();
- delete expected_frame_;
- expected_frame_ = NULL;
- }
+ void Unuse();
// Reset the internal state of this jump target. Pointed-to virtual
// frames are not deallocated and dangling jumps to the target are
// left dangling.
- void Reset() {
- reaching_frames_.Clear();
- merge_labels_.Clear();
- expected_frame_ = NULL;
- entry_label_.Unuse();
- }
+ void Reset();
// Copy the state of this jump target to the destination. The lists
// of forward-reaching frames and merge-point labels are copied.
@@ -178,6 +168,12 @@
// The actual entry label of the block.
Label entry_label_;
+ // A target is bound if its Bind member function has been called.
+ // It is linked if it is not bound but its Jump, Branch, or Call
+ // member functions have been called.
+ bool is_bound_;
+ bool is_linked_;
+
// Add a virtual frame reaching this labeled block via a forward
// jump, and a fresh label for its merge code.
void AddReachingFrame(VirtualFrame* frame);
« 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