Chromium Code Reviews| Index: src/ia32/lithium-ia32.h |
| =================================================================== |
| --- src/ia32/lithium-ia32.h (revision 6414) |
| +++ src/ia32/lithium-ia32.h (working copy) |
| @@ -291,7 +291,7 @@ |
| class LInstruction: public ZoneObject { |
| public: |
| LInstruction() |
| - : hydrogen_value_(NULL) { } |
| + : hydrogen_value_(NULL), is_call_(false), is_save_doubles_(false) { } |
| virtual ~LInstruction() { } |
| virtual void CompileToNative(LCodeGen* generator) = 0; |
| @@ -316,7 +316,6 @@ |
| LPointerMap* pointer_map() const { return pointer_map_.get(); } |
| bool HasPointerMap() const { return pointer_map_.is_set(); } |
| - virtual bool HasResult() const = 0; |
| void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
| HValue* hydrogen_value() const { return hydrogen_value_; } |
| @@ -331,11 +330,37 @@ |
| return deoptimization_environment_.is_set(); |
| } |
| + void MarkAsCall() { is_call_ = true; } |
| + void MarkAsSaveDoubles() { is_save_doubles_ = true; } |
| + |
| + // Interface to the register allocator and iterators. |
| + bool IsMarkedAsCall() const { return is_call_; } |
| + bool IsSaveDoubles() const { return is_save_doubles_; } |
|
Kevin Millikin (Chromium)
2011/01/20 12:20:30
These two names are not entirely consistent: is_th
fschneider
2011/01/20 17:13:08
IsCall is already taken as the name of the type-te
|
| + |
| + virtual bool HasResult() const = 0; |
|
Kevin Millikin (Chromium)
2011/01/20 12:20:30
const doesn't care if it has extra spaces around i
fschneider
2011/01/20 17:13:08
Done.
|
| + virtual LOperand* result() = 0; |
| + |
| + virtual int InputCount() = 0; |
| + virtual LOperand* InputAt(int i) = 0; |
| + virtual int TempCount() = 0; |
| + virtual LOperand* TempAt(int i) = 0; |
| + |
| + TempIterator GetTempIterator(); |
| + UseIterator GetUseIterator(); |
| + LOperand* FirstInput() { return InputAt(0); } |
| + LOperand* Output() { return HasResult() ? result() : NULL; } |
| + |
| +#ifdef DEBUG |
| + void VerifyCall(); |
| +#endif |
| + |
| private: |
| SetOncePointer<LEnvironment> environment_; |
| SetOncePointer<LPointerMap> pointer_map_; |
| HValue* hydrogen_value_; |
| SetOncePointer<LEnvironment> deoptimization_environment_; |
| + bool is_call_; |
| + bool is_save_doubles_; |
| }; |
| @@ -362,6 +387,11 @@ |
| public: |
| int length() { return 0; } |
| void PrintOperandsTo(StringStream* stream) { } |
| + T& operator[](int i) { |
| + UNREACHABLE(); |
| + static T t = NULL; |
|
Kevin Millikin (Chromium)
2011/01/20 12:20:30
Do we really write NULL and not 0 to initialize a
fschneider
2011/01/20 17:13:08
Done.
|
| + return t; |
| + } |
| }; |