Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index c9a4bf062d3a7c3c6b4c79d36d4abe4959c6d8e2..0c1b8bb7781e19104c5e846193787b5deb004867 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -3477,16 +3477,26 @@ class HLoadContextSlot: public HUnaryOperation { |
class HStoreContextSlot: public HTemplateInstruction<2> { |
public: |
+ enum Check { |
+ kEmpty, |
+ kIsHoleCheck |
+ }; |
+ |
HStoreContextSlot(HValue* context, int slot_index, HValue* value) |
- : slot_index_(slot_index) { |
+ : slot_index_(slot_index), check_(kEmpty) { |
SetOperandAt(0, context); |
SetOperandAt(1, value); |
SetFlag(kChangesContextSlots); |
} |
+ void ForceIsHoleCheck() { |
+ check_ = kIsHoleCheck; |
+ } |
+ |
HValue* context() { return OperandAt(0); } |
HValue* value() { return OperandAt(1); } |
int slot_index() const { return slot_index_; } |
+ bool RequiresHoleCheck() const { return check_ == kIsHoleCheck; } |
bool NeedsWriteBarrier() { |
return StoringValueNeedsWriteBarrier(value()); |
@@ -3502,6 +3512,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> { |
private: |
int slot_index_; |
+ Check check_; |
}; |