Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index c1dafa8b5a7a73171c3c6c693f60210656ccac27..0ecbbca1bf66cc24f80b614fbfd406fa9cedd4ea 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -333,9 +333,9 @@ class HGraph V8_FINAL : public ZoneObject { |
void CollectPhis(); |
void set_undefined_constant(HConstant* constant) { |
- undefined_constant_.set(constant); |
+ constant_undefined_.set(constant); |
} |
- HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } |
+ HConstant* GetConstantUndefined() const { return constant_undefined_.get(); } |
HConstant* GetConstant0(); |
HConstant* GetConstant1(); |
HConstant* GetConstantMinus1(); |
@@ -345,6 +345,14 @@ class HGraph V8_FINAL : public ZoneObject { |
HConstant* GetConstantNull(); |
HConstant* GetInvalidContext(); |
+ bool IsConstantUndefined(HConstant* constant); |
+ bool IsConstant0(HConstant* constant); |
+ bool IsConstant1(HConstant* constant); |
+ bool IsConstantMinus1(HConstant* constant); |
+ bool IsConstantTrue(HConstant* constant); |
+ bool IsConstantFalse(HConstant* constant); |
+ bool IsConstantHole(HConstant* constant); |
+ bool IsConstantNull(HConstant* constant); |
bool IsStandardConstant(HConstant* constant); |
HBasicBlock* CreateBasicBlock(); |
@@ -359,6 +367,7 @@ class HGraph V8_FINAL : public ZoneObject { |
int GetMaximumValueID() const { return values_.length(); } |
int GetNextBlockID() { return next_block_id_++; } |
int GetNextValueID(HValue* value) { |
+ ASSERT(!disallow_adding_new_values_); |
values_.Add(value, zone()); |
return values_.length() - 1; |
} |
@@ -366,6 +375,9 @@ class HGraph V8_FINAL : public ZoneObject { |
if (id >= 0 && id < values_.length()) return values_[id]; |
return NULL; |
} |
+ void DisallowAddingNewValues() { |
+ disallow_adding_new_values_ = true; |
+ } |
bool Optimize(BailoutReason* bailout_reason); |
@@ -477,7 +489,7 @@ class HGraph V8_FINAL : public ZoneObject { |
ZoneList<HValue*> values_; |
ZoneList<HPhi*>* phi_list_; |
ZoneList<HInstruction*>* uint32_instructions_; |
- SetOncePointer<HConstant> undefined_constant_; |
+ SetOncePointer<HConstant> constant_undefined_; |
SetOncePointer<HConstant> constant_0_; |
SetOncePointer<HConstant> constant_1_; |
SetOncePointer<HConstant> constant_minus1_; |
@@ -500,6 +512,7 @@ class HGraph V8_FINAL : public ZoneObject { |
int type_change_checksum_; |
int maximum_environment_size_; |
int no_side_effects_scope_count_; |
+ bool disallow_adding_new_values_; |
DISALLOW_COPY_AND_ASSIGN(HGraph); |
}; |