Index: src/ia32/lithium-ia32.h |
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
index 85c04685bad2a90503069ea9ea1747e9f384793a..5acf29ca5a6f6ef97713ccf6f423bf21ce589666 100644 |
--- a/src/ia32/lithium-ia32.h |
+++ b/src/ia32/lithium-ia32.h |
@@ -271,7 +271,7 @@ class LInstruction: public ZoneObject { |
} |
virtual bool HasResult() const = 0; |
- virtual LOperand* result() = 0; |
+ virtual LOperand* result() const = 0; |
bool HasDoubleRegisterResult(); |
bool HasDoubleRegisterInput(); |
@@ -311,9 +311,9 @@ class LTemplateInstruction: public LInstruction { |
public: |
// Allow 0 or 1 output operands. |
STATIC_ASSERT(R == 0 || R == 1); |
- virtual bool HasResult() const { return R != 0; } |
+ virtual bool HasResult() const { return R != 0 && result() != NULL; } |
void set_result(LOperand* operand) { results_[0] = operand; } |
- LOperand* result() { return results_[0]; } |
+ LOperand* result() const { return results_[0]; } |
protected: |
EmbeddedContainer<LOperand*, R> results_; |