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

Unified Diff: src/assembler.h

Issue 6991010: Remove NearLabel, replacing remaining occurrences with Label (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « no previous file | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index b2dde381028a8806940c812ba2fd9c72e7a998e1..1f103d45b9b191566e0b2ce236b1c6b56bbe9a25 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -135,57 +135,6 @@ class Label BASE_EMBEDDED {
// -----------------------------------------------------------------------------
-// NearLabels are labels used for short jumps (in Intel jargon).
-// NearLabels should be used if it can be guaranteed that the jump range is
-// within -128 to +127. We already use short jumps when jumping backwards,
-// so using a NearLabel will only have performance impact if used for forward
-// jumps.
-class NearLabel BASE_EMBEDDED {
- public:
- NearLabel() { Unuse(); }
- ~NearLabel() { ASSERT(!is_linked()); }
-
- void Unuse() {
- pos_ = -1;
- unresolved_branches_ = 0;
-#ifdef DEBUG
- for (int i = 0; i < kMaxUnresolvedBranches; i++) {
- unresolved_positions_[i] = -1;
- }
-#endif
- }
-
- int pos() {
- ASSERT(is_bound());
- return pos_;
- }
-
- bool is_bound() { return pos_ >= 0; }
- bool is_linked() { return !is_bound() && unresolved_branches_ > 0; }
- bool is_unused() { return !is_bound() && unresolved_branches_ == 0; }
-
- void bind_to(int position) {
- ASSERT(!is_bound());
- pos_ = position;
- }
-
- void link_to(int position) {
- ASSERT(!is_bound());
- ASSERT(unresolved_branches_ < kMaxUnresolvedBranches);
- unresolved_positions_[unresolved_branches_++] = position;
- }
-
- private:
- static const int kMaxUnresolvedBranches = 8;
- int pos_;
- int unresolved_branches_;
- int unresolved_positions_[kMaxUnresolvedBranches];
-
- friend class Assembler;
-};
-
-
-// -----------------------------------------------------------------------------
// Relocation information
« no previous file with comments | « no previous file | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698