| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index b4fc65635f47b6db2396208e73b0b3b9e124f996..74ebffa27f8110a466dedd994281d24cbe4ba441 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -3228,8 +3228,27 @@ class HConstant: public HTemplateInstruction<0> {
|
| DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation);
|
| DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double);
|
| DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>);
|
| + DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Map>, UniqueValueId);
|
| DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference);
|
|
|
| + static HConstant* CreateAndInsertAfter(Zone* zone,
|
| + HValue* context,
|
| + int32_t value,
|
| + HInstruction* instruction) {
|
| + HConstant* new_constant = HConstant::New(zone, context, value);
|
| + new_constant->InsertAfter(instruction);
|
| + return new_constant;
|
| + }
|
| +
|
| + static HConstant* CreateAndInsertBefore(Zone* zone,
|
| + HValue* context,
|
| + int32_t value,
|
| + HInstruction* instruction) {
|
| + HConstant* new_constant = HConstant::New(zone, context, value);
|
| + new_constant->InsertBefore(instruction);
|
| + return new_constant;
|
| + }
|
| +
|
| Handle<Object> handle() {
|
| if (handle_.is_null()) {
|
| Factory* factory = Isolate::Current()->factory();
|
| @@ -3430,6 +3449,8 @@ class HConstant: public HTemplateInstruction<0> {
|
| bool is_not_in_new_space,
|
| bool is_cell,
|
| bool boolean_value);
|
| + HConstant(Handle<Map> handle,
|
| + UniqueValueId unique_id);
|
| explicit HConstant(ExternalReference reference);
|
|
|
| void Initialize(Representation r);
|
| @@ -5063,10 +5084,6 @@ class HAllocate: public HTemplateInstruction<2> {
|
| flags_ = static_cast<HAllocate::Flags>(flags_ | ALLOCATE_DOUBLE_ALIGNED);
|
| }
|
|
|
| - void UpdateSize(HValue* size) {
|
| - SetOperandAt(1, size);
|
| - }
|
| -
|
| virtual void HandleSideEffectDominator(GVNFlag side_effect,
|
| HValue* dominator);
|
|
|
| @@ -5088,7 +5105,9 @@ class HAllocate: public HTemplateInstruction<2> {
|
| HType type,
|
| PretenureFlag pretenure_flag,
|
| InstanceType instance_type)
|
| - : HTemplateInstruction<2>(type) {
|
| + : HTemplateInstruction<2>(type),
|
| + dominating_allocate_(NULL),
|
| + filler_free_space_size_(NULL) {
|
| SetOperandAt(0, context);
|
| SetOperandAt(1, size);
|
| set_representation(Representation::Tagged());
|
| @@ -5105,8 +5124,27 @@ class HAllocate: public HTemplateInstruction<2> {
|
| }
|
| }
|
|
|
| + void UpdateSize(HValue* size) {
|
| + SetOperandAt(1, size);
|
| + }
|
| +
|
| + HAllocate* GetFoldableDominator(HAllocate* dominator);
|
| +
|
| + void UpdateFreeSpaceFiller(int32_t filler_size);
|
| +
|
| + void CreateFreeSpaceFiller(int32_t filler_size);
|
| +
|
| + bool IsFoldable(HAllocate* allocate) {
|
| + return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) ||
|
| + (IsOldDataSpaceAllocation() && allocate->IsOldDataSpaceAllocation()) ||
|
| + (IsOldPointerSpaceAllocation() &&
|
| + allocate->IsOldPointerSpaceAllocation());
|
| + }
|
| +
|
| Flags flags_;
|
| Handle<Map> known_initial_map_;
|
| + HAllocate* dominating_allocate_;
|
| + HConstant* filler_free_space_size_;
|
| };
|
|
|
|
|
|
|