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

Unified Diff: src/lithium-allocator.h

Issue 14524008: Make UsePosition::hint immutable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Sven Panne. Created 7 years, 8 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/lithium-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-allocator.h
diff --git a/src/lithium-allocator.h b/src/lithium-allocator.h
index 8b45531d9b2ed9afc5024afe77c530fd319edabb..0cd5ae0e8e803c5fed7d256c357a91fa00a58413 100644
--- a/src/lithium-allocator.h
+++ b/src/lithium-allocator.h
@@ -244,13 +244,12 @@ class UseInterval: public ZoneObject {
// Representation of a use position.
class UsePosition: public ZoneObject {
public:
- UsePosition(LifetimePosition pos, LOperand* operand);
+ UsePosition(LifetimePosition pos, LOperand* operand, LOperand* hint);
LOperand* operand() const { return operand_; }
bool HasOperand() const { return operand_ != NULL; }
LOperand* hint() const { return hint_; }
- void set_hint(LOperand* hint) { hint_ = hint; }
bool HasHint() const;
bool RequiresRegister() const;
bool RegisterIsBeneficial() const;
@@ -261,9 +260,9 @@ class UsePosition: public ZoneObject {
private:
void set_next(UsePosition* next) { next_ = next; }
- LOperand* operand_;
- LOperand* hint_;
- LifetimePosition pos_;
+ LOperand* const operand_;
+ LOperand* const hint_;
+ LifetimePosition const pos_;
UsePosition* next_;
bool requires_reg_;
bool register_beneficial_;
@@ -367,9 +366,10 @@ class LiveRange: public ZoneObject {
void AddUseInterval(LifetimePosition start,
LifetimePosition end,
Zone* zone);
- UsePosition* AddUsePosition(LifetimePosition pos,
- LOperand* operand,
- Zone* zone);
+ void AddUsePosition(LifetimePosition pos,
+ LOperand* operand,
+ LOperand* hint,
+ Zone* zone);
// Shorten the most recently added interval by setting a new start.
void ShortenTo(LifetimePosition start);
« no previous file with comments | « no previous file | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698