| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 V(BitwiseBinaryOperation) \ | 59 V(BitwiseBinaryOperation) \ |
| 60 V(ControlInstruction) \ | 60 V(ControlInstruction) \ |
| 61 V(Instruction) \ | 61 V(Instruction) \ |
| 62 | 62 |
| 63 | 63 |
| 64 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ | 64 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ |
| 65 V(AbnormalExit) \ | 65 V(AbnormalExit) \ |
| 66 V(AccessArgumentsAt) \ | 66 V(AccessArgumentsAt) \ |
| 67 V(Add) \ | 67 V(Add) \ |
| 68 V(Allocate) \ | 68 V(Allocate) \ |
| 69 V(AllocateObject) \ | |
| 70 V(ApplyArguments) \ | 69 V(ApplyArguments) \ |
| 71 V(ArgumentsElements) \ | 70 V(ArgumentsElements) \ |
| 72 V(ArgumentsLength) \ | 71 V(ArgumentsLength) \ |
| 73 V(ArgumentsObject) \ | 72 V(ArgumentsObject) \ |
| 74 V(Bitwise) \ | 73 V(Bitwise) \ |
| 75 V(BitNot) \ | 74 V(BitNot) \ |
| 76 V(BlockEntry) \ | 75 V(BlockEntry) \ |
| 77 V(BoundsCheck) \ | 76 V(BoundsCheck) \ |
| 78 V(BoundsCheckBaseIndexInformation) \ | 77 V(BoundsCheckBaseIndexInformation) \ |
| 79 V(Branch) \ | 78 V(Branch) \ |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 782 |
| 784 enum Flag { | 783 enum Flag { |
| 785 kFlexibleRepresentation, | 784 kFlexibleRepresentation, |
| 786 kCannotBeTagged, | 785 kCannotBeTagged, |
| 787 // Participate in Global Value Numbering, i.e. elimination of | 786 // Participate in Global Value Numbering, i.e. elimination of |
| 788 // unnecessary recomputations. If an instruction sets this flag, it must | 787 // unnecessary recomputations. If an instruction sets this flag, it must |
| 789 // implement DataEquals(), which will be used to determine if other | 788 // implement DataEquals(), which will be used to determine if other |
| 790 // occurrences of the instruction are indeed the same. | 789 // occurrences of the instruction are indeed the same. |
| 791 kUseGVN, | 790 kUseGVN, |
| 792 // Track instructions that are dominating side effects. If an instruction | 791 // Track instructions that are dominating side effects. If an instruction |
| 793 // sets this flag, it must implement SetSideEffectDominator() and should | 792 // sets this flag, it must implement HandleSideEffectDominator() and should |
| 794 // indicate which side effects to track by setting GVN flags. | 793 // indicate which side effects to track by setting GVN flags. |
| 795 kTrackSideEffectDominators, | 794 kTrackSideEffectDominators, |
| 796 kCanOverflow, | 795 kCanOverflow, |
| 797 kBailoutOnMinusZero, | 796 kBailoutOnMinusZero, |
| 798 kCanBeDivByZero, | 797 kCanBeDivByZero, |
| 799 kAllowUndefinedAsNaN, | 798 kAllowUndefinedAsNaN, |
| 800 kIsArguments, | 799 kIsArguments, |
| 801 kTruncatingToInt32, | 800 kTruncatingToInt32, |
| 802 kAllUsesTruncatingToInt32, | 801 kAllUsesTruncatingToInt32, |
| 803 // Set after an instruction is killed. | 802 // Set after an instruction is killed. |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 | 1101 |
| 1103 // Updated the inferred type of this instruction and returns true if | 1102 // Updated the inferred type of this instruction and returns true if |
| 1104 // it has changed. | 1103 // it has changed. |
| 1105 bool UpdateInferredType(); | 1104 bool UpdateInferredType(); |
| 1106 | 1105 |
| 1107 virtual HType CalculateInferredType(); | 1106 virtual HType CalculateInferredType(); |
| 1108 | 1107 |
| 1109 // This function must be overridden for instructions which have the | 1108 // This function must be overridden for instructions which have the |
| 1110 // kTrackSideEffectDominators flag set, to track instructions that are | 1109 // kTrackSideEffectDominators flag set, to track instructions that are |
| 1111 // dominating side effects. | 1110 // dominating side effects. |
| 1112 virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator) { | 1111 virtual void HandleSideEffectDominator(GVNFlag side_effect, |
| 1112 HValue* dominator) { |
| 1113 UNREACHABLE(); | 1113 UNREACHABLE(); |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 // Check if this instruction has some reason that prevents elimination. | 1116 // Check if this instruction has some reason that prevents elimination. |
| 1117 bool CannotBeEliminated() const { | 1117 bool CannotBeEliminated() const { |
| 1118 return HasObservableSideEffects() || !IsDeletable(); | 1118 return HasObservableSideEffects() || !IsDeletable(); |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 #ifdef DEBUG | 1121 #ifdef DEBUG |
| 1122 virtual void Verify() = 0; | 1122 virtual void Verify() = 0; |
| (...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2767 } | 2767 } |
| 2768 }; | 2768 }; |
| 2769 check_map->map_set_.Sort(); | 2769 check_map->map_set_.Sort(); |
| 2770 return check_map; | 2770 return check_map; |
| 2771 } | 2771 } |
| 2772 | 2772 |
| 2773 virtual bool HasEscapingOperandAt(int index) { return false; } | 2773 virtual bool HasEscapingOperandAt(int index) { return false; } |
| 2774 virtual Representation RequiredInputRepresentation(int index) { | 2774 virtual Representation RequiredInputRepresentation(int index) { |
| 2775 return Representation::Tagged(); | 2775 return Representation::Tagged(); |
| 2776 } | 2776 } |
| 2777 virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator); | 2777 virtual void HandleSideEffectDominator(GVNFlag side_effect, |
| 2778 HValue* dominator); |
| 2778 virtual void PrintDataTo(StringStream* stream); | 2779 virtual void PrintDataTo(StringStream* stream); |
| 2779 virtual HType CalculateInferredType(); | 2780 virtual HType CalculateInferredType(); |
| 2780 | 2781 |
| 2781 HValue* value() { return OperandAt(0); } | 2782 HValue* value() { return OperandAt(0); } |
| 2782 SmallMapList* map_set() { return &map_set_; } | 2783 SmallMapList* map_set() { return &map_set_; } |
| 2783 | 2784 |
| 2784 virtual void FinalizeUniqueValueId(); | 2785 virtual void FinalizeUniqueValueId(); |
| 2785 | 2786 |
| 2786 DECLARE_CONCRETE_INSTRUCTION(CheckMaps) | 2787 DECLARE_CONCRETE_INSTRUCTION(CheckMaps) |
| 2787 | 2788 |
| (...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4943 } | 4944 } |
| 4944 | 4945 |
| 4945 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) | 4946 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) |
| 4946 | 4947 |
| 4947 private: | 4948 private: |
| 4948 Handle<Object> name_; | 4949 Handle<Object> name_; |
| 4949 bool for_typeof_; | 4950 bool for_typeof_; |
| 4950 }; | 4951 }; |
| 4951 | 4952 |
| 4952 | 4953 |
| 4953 class HAllocateObject: public HTemplateInstruction<1> { | |
| 4954 public: | |
| 4955 HAllocateObject(HValue* context, Handle<JSFunction> constructor) | |
| 4956 : constructor_(constructor) { | |
| 4957 SetOperandAt(0, context); | |
| 4958 set_representation(Representation::Tagged()); | |
| 4959 SetGVNFlag(kChangesNewSpacePromotion); | |
| 4960 constructor_initial_map_ = constructor->has_initial_map() | |
| 4961 ? Handle<Map>(constructor->initial_map()) | |
| 4962 : Handle<Map>::null(); | |
| 4963 // If slack tracking finished, the instance size and property counts | |
| 4964 // remain unchanged so that we can allocate memory for the object. | |
| 4965 ASSERT(!constructor->shared()->IsInobjectSlackTrackingInProgress()); | |
| 4966 } | |
| 4967 | |
| 4968 // Maximum instance size for which allocations will be inlined. | |
| 4969 static const int kMaxSize = 64 * kPointerSize; | |
| 4970 | |
| 4971 HValue* context() { return OperandAt(0); } | |
| 4972 Handle<JSFunction> constructor() { return constructor_; } | |
| 4973 Handle<Map> constructor_initial_map() { return constructor_initial_map_; } | |
| 4974 | |
| 4975 virtual Representation RequiredInputRepresentation(int index) { | |
| 4976 return Representation::Tagged(); | |
| 4977 } | |
| 4978 virtual Handle<Map> GetMonomorphicJSObjectMap() { | |
| 4979 ASSERT(!constructor_initial_map_.is_null()); | |
| 4980 return constructor_initial_map_; | |
| 4981 } | |
| 4982 virtual HType CalculateInferredType(); | |
| 4983 | |
| 4984 DECLARE_CONCRETE_INSTRUCTION(AllocateObject) | |
| 4985 | |
| 4986 private: | |
| 4987 // TODO(svenpanne) Might be safe, but leave it out until we know for sure. | |
| 4988 // virtual bool IsDeletable() const { return true; } | |
| 4989 | |
| 4990 Handle<JSFunction> constructor_; | |
| 4991 Handle<Map> constructor_initial_map_; | |
| 4992 }; | |
| 4993 | |
| 4994 | |
| 4995 class HAllocate: public HTemplateInstruction<2> { | 4954 class HAllocate: public HTemplateInstruction<2> { |
| 4996 public: | 4955 public: |
| 4997 enum Flags { | 4956 enum Flags { |
| 4998 CAN_ALLOCATE_IN_NEW_SPACE = 1 << 0, | 4957 CAN_ALLOCATE_IN_NEW_SPACE = 1 << 0, |
| 4999 CAN_ALLOCATE_IN_OLD_DATA_SPACE = 1 << 1, | 4958 CAN_ALLOCATE_IN_OLD_DATA_SPACE = 1 << 1, |
| 5000 CAN_ALLOCATE_IN_OLD_POINTER_SPACE = 1 << 2, | 4959 CAN_ALLOCATE_IN_OLD_POINTER_SPACE = 1 << 2, |
| 5001 ALLOCATE_DOUBLE_ALIGNED = 1 << 3 | 4960 ALLOCATE_DOUBLE_ALIGNED = 1 << 3 |
| 5002 }; | 4961 }; |
| 5003 | 4962 |
| 5004 HAllocate(HValue* context, HValue* size, HType type, Flags flags) | 4963 HAllocate(HValue* context, HValue* size, HType type, Flags flags) |
| 5005 : type_(type), | 4964 : type_(type), |
| 5006 flags_(flags) { | 4965 flags_(flags) { |
| 5007 SetOperandAt(0, context); | 4966 SetOperandAt(0, context); |
| 5008 SetOperandAt(1, size); | 4967 SetOperandAt(1, size); |
| 5009 set_representation(Representation::Tagged()); | 4968 set_representation(Representation::Tagged()); |
| 4969 SetFlag(kTrackSideEffectDominators); |
| 5010 SetGVNFlag(kChangesNewSpacePromotion); | 4970 SetGVNFlag(kChangesNewSpacePromotion); |
| 4971 SetGVNFlag(kDependsOnNewSpacePromotion); |
| 5011 } | 4972 } |
| 5012 | 4973 |
| 4974 // Maximum instance size for which allocations will be inlined. |
| 4975 static const int kMaxInlineSize = 64 * kPointerSize; |
| 4976 |
| 5013 static Flags DefaultFlags() { | 4977 static Flags DefaultFlags() { |
| 5014 return CAN_ALLOCATE_IN_NEW_SPACE; | 4978 return CAN_ALLOCATE_IN_NEW_SPACE; |
| 5015 } | 4979 } |
| 5016 | 4980 |
| 5017 static Flags DefaultFlags(ElementsKind kind) { | 4981 static Flags DefaultFlags(ElementsKind kind) { |
| 5018 Flags flags = CAN_ALLOCATE_IN_NEW_SPACE; | 4982 Flags flags = CAN_ALLOCATE_IN_NEW_SPACE; |
| 5019 if (IsFastDoubleElementsKind(kind)) { | 4983 if (IsFastDoubleElementsKind(kind)) { |
| 5020 flags = static_cast<HAllocate::Flags>( | 4984 flags = static_cast<HAllocate::Flags>( |
| 5021 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED); | 4985 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED); |
| 5022 } | 4986 } |
| 5023 return flags; | 4987 return flags; |
| 5024 } | 4988 } |
| 5025 | 4989 |
| 5026 HValue* context() { return OperandAt(0); } | 4990 HValue* context() { return OperandAt(0); } |
| 5027 HValue* size() { return OperandAt(1); } | 4991 HValue* size() { return OperandAt(1); } |
| 4992 HType type() { return type_; } |
| 5028 | 4993 |
| 5029 virtual Representation RequiredInputRepresentation(int index) { | 4994 virtual Representation RequiredInputRepresentation(int index) { |
| 5030 if (index == 0) { | 4995 if (index == 0) { |
| 5031 return Representation::Tagged(); | 4996 return Representation::Tagged(); |
| 5032 } else { | 4997 } else { |
| 5033 return Representation::Integer32(); | 4998 return Representation::Integer32(); |
| 5034 } | 4999 } |
| 5035 } | 5000 } |
| 5036 | 5001 |
| 5002 virtual Handle<Map> GetMonomorphicJSObjectMap() { |
| 5003 return known_initial_map_; |
| 5004 } |
| 5005 |
| 5006 void set_known_initial_map(Handle<Map> known_initial_map) { |
| 5007 known_initial_map_ = known_initial_map; |
| 5008 } |
| 5009 |
| 5037 virtual HType CalculateInferredType(); | 5010 virtual HType CalculateInferredType(); |
| 5038 | 5011 |
| 5039 bool CanAllocateInNewSpace() const { | 5012 bool CanAllocateInNewSpace() const { |
| 5040 return (flags_ & CAN_ALLOCATE_IN_NEW_SPACE) != 0; | 5013 return (flags_ & CAN_ALLOCATE_IN_NEW_SPACE) != 0; |
| 5041 } | 5014 } |
| 5042 | 5015 |
| 5043 bool CanAllocateInOldDataSpace() const { | 5016 bool CanAllocateInOldDataSpace() const { |
| 5044 return (flags_ & CAN_ALLOCATE_IN_OLD_DATA_SPACE) != 0; | 5017 return (flags_ & CAN_ALLOCATE_IN_OLD_DATA_SPACE) != 0; |
| 5045 } | 5018 } |
| 5046 | 5019 |
| 5047 bool CanAllocateInOldPointerSpace() const { | 5020 bool CanAllocateInOldPointerSpace() const { |
| 5048 return (flags_ & CAN_ALLOCATE_IN_OLD_POINTER_SPACE) != 0; | 5021 return (flags_ & CAN_ALLOCATE_IN_OLD_POINTER_SPACE) != 0; |
| 5049 } | 5022 } |
| 5050 | 5023 |
| 5051 bool CanAllocateInOldSpace() const { | 5024 bool CanAllocateInOldSpace() const { |
| 5052 return CanAllocateInOldDataSpace() || | 5025 return CanAllocateInOldDataSpace() || |
| 5053 CanAllocateInOldPointerSpace(); | 5026 CanAllocateInOldPointerSpace(); |
| 5054 } | 5027 } |
| 5055 | 5028 |
| 5056 bool GuaranteedInNewSpace() const { | 5029 bool GuaranteedInNewSpace() const { |
| 5057 return CanAllocateInNewSpace() && !CanAllocateInOldSpace(); | 5030 return CanAllocateInNewSpace() && !CanAllocateInOldSpace(); |
| 5058 } | 5031 } |
| 5059 | 5032 |
| 5060 bool MustAllocateDoubleAligned() const { | 5033 bool MustAllocateDoubleAligned() const { |
| 5061 return (flags_ & ALLOCATE_DOUBLE_ALIGNED) != 0; | 5034 return (flags_ & ALLOCATE_DOUBLE_ALIGNED) != 0; |
| 5062 } | 5035 } |
| 5063 | 5036 |
| 5037 void UpdateSize(HValue* size) { |
| 5038 SetOperandAt(1, size); |
| 5039 } |
| 5040 |
| 5041 virtual void HandleSideEffectDominator(GVNFlag side_effect, |
| 5042 HValue* dominator); |
| 5043 |
| 5064 virtual void PrintDataTo(StringStream* stream); | 5044 virtual void PrintDataTo(StringStream* stream); |
| 5065 | 5045 |
| 5066 DECLARE_CONCRETE_INSTRUCTION(Allocate) | 5046 DECLARE_CONCRETE_INSTRUCTION(Allocate) |
| 5067 | 5047 |
| 5068 private: | 5048 private: |
| 5069 HType type_; | 5049 HType type_; |
| 5070 Flags flags_; | 5050 Flags flags_; |
| 5051 Handle<Map> known_initial_map_; |
| 5071 }; | 5052 }; |
| 5072 | 5053 |
| 5073 | 5054 |
| 5074 class HInnerAllocatedObject: public HTemplateInstruction<1> { | 5055 class HInnerAllocatedObject: public HTemplateInstruction<1> { |
| 5075 public: | 5056 public: |
| 5076 HInnerAllocatedObject(HValue* value, int offset) | 5057 HInnerAllocatedObject(HValue* value, int offset, HType type = HType::Tagged()) |
| 5077 : offset_(offset) { | 5058 : offset_(offset), |
| 5059 type_(type) { |
| 5078 ASSERT(value->IsAllocate()); | 5060 ASSERT(value->IsAllocate()); |
| 5079 SetOperandAt(0, value); | 5061 SetOperandAt(0, value); |
| 5080 set_representation(Representation::Tagged()); | 5062 set_representation(Representation::Tagged()); |
| 5081 } | 5063 } |
| 5082 | 5064 |
| 5083 HValue* base_object() { return OperandAt(0); } | 5065 HValue* base_object() { return OperandAt(0); } |
| 5084 int offset() { return offset_; } | 5066 int offset() { return offset_; } |
| 5085 | 5067 |
| 5086 virtual Representation RequiredInputRepresentation(int index) { | 5068 virtual Representation RequiredInputRepresentation(int index) { |
| 5087 return Representation::Tagged(); | 5069 return Representation::Tagged(); |
| 5088 } | 5070 } |
| 5089 | 5071 |
| 5072 virtual HType CalculateInferredType() { return type_; } |
| 5073 |
| 5090 virtual void PrintDataTo(StringStream* stream); | 5074 virtual void PrintDataTo(StringStream* stream); |
| 5091 | 5075 |
| 5092 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) | 5076 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) |
| 5093 | 5077 |
| 5094 private: | 5078 private: |
| 5095 int offset_; | 5079 int offset_; |
| 5080 HType type_; |
| 5096 }; | 5081 }; |
| 5097 | 5082 |
| 5098 | 5083 |
| 5099 inline bool StoringValueNeedsWriteBarrier(HValue* value) { | 5084 inline bool StoringValueNeedsWriteBarrier(HValue* value) { |
| 5100 return !value->type().IsBoolean() | 5085 return !value->type().IsBoolean() |
| 5101 && !value->type().IsSmi() | 5086 && !value->type().IsSmi() |
| 5102 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); | 5087 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); |
| 5103 } | 5088 } |
| 5104 | 5089 |
| 5105 | 5090 |
| 5106 inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, | 5091 inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
| 5107 HValue* new_space_dominator) { | 5092 HValue* new_space_dominator) { |
| 5108 if (object->IsInnerAllocatedObject()) { | 5093 if (object->IsInnerAllocatedObject()) { |
| 5109 return ReceiverObjectNeedsWriteBarrier( | 5094 return ReceiverObjectNeedsWriteBarrier( |
| 5110 HInnerAllocatedObject::cast(object)->base_object(), | 5095 HInnerAllocatedObject::cast(object)->base_object(), |
| 5111 new_space_dominator); | 5096 new_space_dominator); |
| 5112 } | 5097 } |
| 5113 if (object->IsConstant() && HConstant::cast(object)->IsCell()) { | 5098 if (object->IsConstant() && HConstant::cast(object)->IsCell()) { |
| 5114 return false; | 5099 return false; |
| 5115 } | 5100 } |
| 5116 if (object != new_space_dominator) return true; | 5101 if (object != new_space_dominator) return true; |
| 5117 if (object->IsAllocateObject()) return false; | |
| 5118 if (object->IsAllocate()) { | 5102 if (object->IsAllocate()) { |
| 5119 return !HAllocate::cast(object)->GuaranteedInNewSpace(); | 5103 return !HAllocate::cast(object)->GuaranteedInNewSpace(); |
| 5120 } | 5104 } |
| 5121 return true; | 5105 return true; |
| 5122 } | 5106 } |
| 5123 | 5107 |
| 5124 | 5108 |
| 5125 class HStoreGlobalCell: public HUnaryOperation { | 5109 class HStoreGlobalCell: public HUnaryOperation { |
| 5126 public: | 5110 public: |
| 5127 HStoreGlobalCell(HValue* value, | 5111 HStoreGlobalCell(HValue* value, |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5808 virtual Representation RequiredInputRepresentation(int index) { | 5792 virtual Representation RequiredInputRepresentation(int index) { |
| 5809 if (FLAG_track_double_fields && | 5793 if (FLAG_track_double_fields && |
| 5810 index == 1 && field_representation_.IsDouble()) { | 5794 index == 1 && field_representation_.IsDouble()) { |
| 5811 return field_representation_; | 5795 return field_representation_; |
| 5812 } else if (FLAG_track_fields && | 5796 } else if (FLAG_track_fields && |
| 5813 index == 1 && field_representation_.IsSmi()) { | 5797 index == 1 && field_representation_.IsSmi()) { |
| 5814 return field_representation_; | 5798 return field_representation_; |
| 5815 } | 5799 } |
| 5816 return Representation::Tagged(); | 5800 return Representation::Tagged(); |
| 5817 } | 5801 } |
| 5818 virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator) { | 5802 virtual void HandleSideEffectDominator(GVNFlag side_effect, |
| 5803 HValue* dominator) { |
| 5819 ASSERT(side_effect == kChangesNewSpacePromotion); | 5804 ASSERT(side_effect == kChangesNewSpacePromotion); |
| 5820 new_space_dominator_ = dominator; | 5805 new_space_dominator_ = dominator; |
| 5821 } | 5806 } |
| 5822 virtual void PrintDataTo(StringStream* stream); | 5807 virtual void PrintDataTo(StringStream* stream); |
| 5823 | 5808 |
| 5824 void SkipWriteBarrier() { write_barrier_mode_ = SKIP_WRITE_BARRIER; } | 5809 void SkipWriteBarrier() { write_barrier_mode_ = SKIP_WRITE_BARRIER; } |
| 5825 bool IsSkipWriteBarrier() const { | 5810 bool IsSkipWriteBarrier() const { |
| 5826 return write_barrier_mode_ == SKIP_WRITE_BARRIER; | 5811 return write_barrier_mode_ == SKIP_WRITE_BARRIER; |
| 5827 } | 5812 } |
| 5828 | 5813 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6010 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | 5995 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } |
| 6011 bool IsUninitialized() { return is_uninitialized_; } | 5996 bool IsUninitialized() { return is_uninitialized_; } |
| 6012 void SetUninitialized(bool is_uninitialized) { | 5997 void SetUninitialized(bool is_uninitialized) { |
| 6013 is_uninitialized_ = is_uninitialized; | 5998 is_uninitialized_ = is_uninitialized; |
| 6014 } | 5999 } |
| 6015 | 6000 |
| 6016 bool IsConstantHoleStore() { | 6001 bool IsConstantHoleStore() { |
| 6017 return value()->IsConstant() && HConstant::cast(value())->IsTheHole(); | 6002 return value()->IsConstant() && HConstant::cast(value())->IsTheHole(); |
| 6018 } | 6003 } |
| 6019 | 6004 |
| 6020 virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator) { | 6005 virtual void HandleSideEffectDominator(GVNFlag side_effect, |
| 6006 HValue* dominator) { |
| 6021 ASSERT(side_effect == kChangesNewSpacePromotion); | 6007 ASSERT(side_effect == kChangesNewSpacePromotion); |
| 6022 new_space_dominator_ = dominator; | 6008 new_space_dominator_ = dominator; |
| 6023 } | 6009 } |
| 6024 | 6010 |
| 6025 HValue* new_space_dominator() const { return new_space_dominator_; } | 6011 HValue* new_space_dominator() const { return new_space_dominator_; } |
| 6026 | 6012 |
| 6027 bool NeedsWriteBarrier() { | 6013 bool NeedsWriteBarrier() { |
| 6028 if (value_is_smi()) { | 6014 if (value_is_smi()) { |
| 6029 return false; | 6015 return false; |
| 6030 } else { | 6016 } else { |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6652 virtual bool IsDeletable() const { return true; } | 6638 virtual bool IsDeletable() const { return true; } |
| 6653 }; | 6639 }; |
| 6654 | 6640 |
| 6655 | 6641 |
| 6656 #undef DECLARE_INSTRUCTION | 6642 #undef DECLARE_INSTRUCTION |
| 6657 #undef DECLARE_CONCRETE_INSTRUCTION | 6643 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6658 | 6644 |
| 6659 } } // namespace v8::internal | 6645 } } // namespace v8::internal |
| 6660 | 6646 |
| 6661 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6647 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |