Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 25ac2df12152fcfd25a32d5e064386afde483fe5..c19d7902c74c35a91079e270ab63d77384ab56e6 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -1237,6 +1237,8 @@ class HInstruction : public HValue { |
position_.set_operand_position(index, pos); |
} |
+ bool Dominates(HInstruction* other); |
+ |
bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } |
virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; |
@@ -5456,6 +5458,10 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { |
HValue* context() { return OperandAt(0); } |
HValue* size() { return OperandAt(1); } |
+ bool has_size_upper_bound() { return size_upper_bound_ != NULL; } |
+ HConstant* size_upper_bound() { return size_upper_bound_; } |
+ void set_size_upper_bound(HConstant* value) { size_upper_bound_ = value; } |
Hannes Payer (out of office)
2014/01/16 12:58:39
I guess set_size_upper_bound should only be called
|
+ |
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
if (index == 0) { |
return Representation::Tagged(); |
@@ -5526,9 +5532,10 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { |
: HTemplateInstruction<2>(type), |
dominating_allocate_(NULL), |
filler_free_space_size_(NULL), |
+ size_upper_bound_(NULL), |
clear_next_map_word_(false) { |
SetOperandAt(0, context); |
- SetOperandAt(1, size); |
+ UpdateSize(size); |
set_representation(Representation::Tagged()); |
SetFlag(kTrackSideEffectDominators); |
SetGVNFlag(kChangesNewSpacePromotion); |
@@ -5562,6 +5569,11 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { |
void UpdateSize(HValue* size) { |
SetOperandAt(1, size); |
+ if (size->IsInteger32Constant()) { |
+ size_upper_bound_ = HConstant::cast(size); |
+ } else { |
+ size_upper_bound_ = NULL; |
+ } |
} |
HAllocate* GetFoldableDominator(HAllocate* dominator); |
@@ -5583,6 +5595,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { |
Handle<Map> known_initial_map_; |
HAllocate* dominating_allocate_; |
HStoreNamedField* filler_free_space_size_; |
+ HConstant* size_upper_bound_; |
bool clear_next_map_word_; |
}; |