Index: src/mips/lithium-mips.h |
diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h |
index 93bc3b093c07abb33db7110bbfac69b19421f734..ee1c47d0573b74aab0a86ef0d60a1033fe59c1bc 100644 |
--- a/src/mips/lithium-mips.h |
+++ b/src/mips/lithium-mips.h |
@@ -265,7 +265,7 @@ class LInstruction: public ZoneObject { |
bool IsMarkedAsCall() const { return is_call_; } |
virtual bool HasResult() const = 0; |
- virtual LOperand* result() = 0; |
+ virtual LOperand* result() const = 0; |
LOperand* FirstInput() { return InputAt(0); } |
LOperand* Output() { return HasResult() ? result() : NULL; } |
@@ -301,9 +301,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_; |