Index: src/arm/lithium-arm.h |
diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h |
index d3146719f8a49c422964a04b21128301015b1b15..241bba96eef683ef28d77590ed19dcf33bc4dda9 100644 |
--- a/src/arm/lithium-arm.h |
+++ b/src/arm/lithium-arm.h |
@@ -268,7 +268,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; } |
@@ -304,9 +304,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_; |