| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 V(ForceRepresentation) \ | 115 V(ForceRepresentation) \ |
| 116 V(FunctionLiteral) \ | 116 V(FunctionLiteral) \ |
| 117 V(GetCachedArrayIndex) \ | 117 V(GetCachedArrayIndex) \ |
| 118 V(GlobalObject) \ | 118 V(GlobalObject) \ |
| 119 V(GlobalReceiver) \ | 119 V(GlobalReceiver) \ |
| 120 V(Goto) \ | 120 V(Goto) \ |
| 121 V(HasCachedArrayIndexAndBranch) \ | 121 V(HasCachedArrayIndexAndBranch) \ |
| 122 V(HasInstanceTypeAndBranch) \ | 122 V(HasInstanceTypeAndBranch) \ |
| 123 V(InductionVariableAnnotation) \ | 123 V(InductionVariableAnnotation) \ |
| 124 V(In) \ | 124 V(In) \ |
| 125 V(InnerAllocatedObject) \ |
| 125 V(InstanceOf) \ | 126 V(InstanceOf) \ |
| 126 V(InstanceOfKnownGlobal) \ | 127 V(InstanceOfKnownGlobal) \ |
| 127 V(InstanceSize) \ | 128 V(InstanceSize) \ |
| 128 V(InvokeFunction) \ | 129 V(InvokeFunction) \ |
| 129 V(IsConstructCallAndBranch) \ | 130 V(IsConstructCallAndBranch) \ |
| 130 V(IsNilAndBranch) \ | 131 V(IsNilAndBranch) \ |
| 131 V(IsObjectAndBranch) \ | 132 V(IsObjectAndBranch) \ |
| 132 V(IsStringAndBranch) \ | 133 V(IsStringAndBranch) \ |
| 133 V(IsSmiAndBranch) \ | 134 V(IsSmiAndBranch) \ |
| 134 V(IsUndetectableAndBranch) \ | 135 V(IsUndetectableAndBranch) \ |
| (...skipping 4542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4677 virtual void PrintDataTo(StringStream* stream); | 4678 virtual void PrintDataTo(StringStream* stream); |
| 4678 | 4679 |
| 4679 DECLARE_CONCRETE_INSTRUCTION(Allocate) | 4680 DECLARE_CONCRETE_INSTRUCTION(Allocate) |
| 4680 | 4681 |
| 4681 private: | 4682 private: |
| 4682 HType type_; | 4683 HType type_; |
| 4683 Flags flags_; | 4684 Flags flags_; |
| 4684 }; | 4685 }; |
| 4685 | 4686 |
| 4686 | 4687 |
| 4688 class HInnerAllocatedObject: public HTemplateInstruction<1> { |
| 4689 public: |
| 4690 HInnerAllocatedObject(HValue* value, int offset) |
| 4691 : offset_(offset) { |
| 4692 ASSERT(value->IsAllocate()); |
| 4693 SetOperandAt(0, value); |
| 4694 set_representation(Representation::Tagged()); |
| 4695 } |
| 4696 |
| 4697 HValue* base_object() { return OperandAt(0); } |
| 4698 int offset() { return offset_; } |
| 4699 |
| 4700 virtual Representation RequiredInputRepresentation(int index) { |
| 4701 return Representation::Tagged(); |
| 4702 } |
| 4703 |
| 4704 virtual void PrintDataTo(StringStream* stream); |
| 4705 |
| 4706 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) |
| 4707 |
| 4708 private: |
| 4709 int offset_; |
| 4710 }; |
| 4711 |
| 4712 |
| 4687 inline bool StoringValueNeedsWriteBarrier(HValue* value) { | 4713 inline bool StoringValueNeedsWriteBarrier(HValue* value) { |
| 4688 return !value->type().IsBoolean() | 4714 return !value->type().IsBoolean() |
| 4689 && !value->type().IsSmi() | 4715 && !value->type().IsSmi() |
| 4690 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); | 4716 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); |
| 4691 } | 4717 } |
| 4692 | 4718 |
| 4693 | 4719 |
| 4694 inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, | 4720 inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
| 4695 HValue* new_space_dominator) { | 4721 HValue* new_space_dominator) { |
| 4722 if (object->IsInnerAllocatedObject()) { |
| 4723 return ReceiverObjectNeedsWriteBarrier( |
| 4724 HInnerAllocatedObject::cast(object)->base_object(), |
| 4725 new_space_dominator); |
| 4726 } |
| 4696 if (object != new_space_dominator) return true; | 4727 if (object != new_space_dominator) return true; |
| 4697 if (object->IsFastLiteral()) return false; | 4728 if (object->IsFastLiteral()) return false; |
| 4698 if (object->IsAllocateObject()) return false; | 4729 if (object->IsAllocateObject()) return false; |
| 4699 if (object->IsAllocate()) { | 4730 if (object->IsAllocate()) { |
| 4700 return !HAllocate::cast(object)->GuaranteedInNewSpace(); | 4731 return !HAllocate::cast(object)->GuaranteedInNewSpace(); |
| 4701 } | 4732 } |
| 4702 return true; | 4733 return true; |
| 4703 } | 4734 } |
| 4704 | 4735 |
| 4705 | 4736 |
| (...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6167 virtual bool IsDeletable() const { return true; } | 6198 virtual bool IsDeletable() const { return true; } |
| 6168 }; | 6199 }; |
| 6169 | 6200 |
| 6170 | 6201 |
| 6171 #undef DECLARE_INSTRUCTION | 6202 #undef DECLARE_INSTRUCTION |
| 6172 #undef DECLARE_CONCRETE_INSTRUCTION | 6203 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6173 | 6204 |
| 6174 } } // namespace v8::internal | 6205 } } // namespace v8::internal |
| 6175 | 6206 |
| 6176 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6207 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |