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 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5602 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry) | 5602 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry) |
5603 | 5603 |
5604 private: | 5604 private: |
5605 HStoreCodeEntry(HValue* function, HValue* code) { | 5605 HStoreCodeEntry(HValue* function, HValue* code) { |
5606 SetOperandAt(0, function); | 5606 SetOperandAt(0, function); |
5607 SetOperandAt(1, code); | 5607 SetOperandAt(1, code); |
5608 } | 5608 } |
5609 }; | 5609 }; |
5610 | 5610 |
5611 | 5611 |
5612 class HInnerAllocatedObject V8_FINAL: public HTemplateInstruction<1> { | 5612 class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<2> { |
5613 public: | 5613 public: |
5614 static HInnerAllocatedObject* New(Zone* zone, | 5614 static HInnerAllocatedObject* New(Zone* zone, |
5615 HValue* context, | 5615 HValue* context, |
5616 HValue* value, | 5616 HValue* value, |
5617 int offset, | 5617 HValue* offset, |
5618 HType type = HType::Tagged()) { | 5618 HType type = HType::Tagged()) { |
5619 return new(zone) HInnerAllocatedObject(value, offset, type); | 5619 return new(zone) HInnerAllocatedObject(value, offset, type); |
5620 } | 5620 } |
5621 | 5621 |
5622 HValue* base_object() { return OperandAt(0); } | 5622 HValue* base_object() { return OperandAt(0); } |
5623 int offset() { return offset_; } | 5623 HValue* offset() { return OperandAt(1); } |
5624 | 5624 |
5625 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 5625 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
5626 return Representation::Tagged(); | 5626 return index == 0 ? Representation::Tagged() : Representation::Integer32(); |
5627 } | 5627 } |
5628 | 5628 |
5629 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 5629 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
5630 | 5630 |
5631 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) | 5631 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) |
5632 | 5632 |
5633 private: | 5633 private: |
5634 HInnerAllocatedObject(HValue* value, int offset, HType type = HType::Tagged()) | 5634 HInnerAllocatedObject(HValue* value, |
5635 : HTemplateInstruction<1>(type), offset_(offset) { | 5635 HValue* offset, |
| 5636 HType type = HType::Tagged()) |
| 5637 : HTemplateInstruction<2>(type) { |
5636 ASSERT(value->IsAllocate()); | 5638 ASSERT(value->IsAllocate()); |
5637 SetOperandAt(0, value); | 5639 SetOperandAt(0, value); |
| 5640 SetOperandAt(1, offset); |
5638 set_type(type); | 5641 set_type(type); |
5639 set_representation(Representation::Tagged()); | 5642 set_representation(Representation::Tagged()); |
5640 } | 5643 } |
5641 | |
5642 int offset_; | |
5643 }; | 5644 }; |
5644 | 5645 |
5645 | 5646 |
5646 inline bool StoringValueNeedsWriteBarrier(HValue* value) { | 5647 inline bool StoringValueNeedsWriteBarrier(HValue* value) { |
5647 return !value->type().IsBoolean() | 5648 return !value->type().IsBoolean() |
5648 && !value->type().IsSmi() | 5649 && !value->type().IsSmi() |
5649 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); | 5650 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); |
5650 } | 5651 } |
5651 | 5652 |
5652 | 5653 |
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7485 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7486 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7486 }; | 7487 }; |
7487 | 7488 |
7488 | 7489 |
7489 #undef DECLARE_INSTRUCTION | 7490 #undef DECLARE_INSTRUCTION |
7490 #undef DECLARE_CONCRETE_INSTRUCTION | 7491 #undef DECLARE_CONCRETE_INSTRUCTION |
7491 | 7492 |
7492 } } // namespace v8::internal | 7493 } } // namespace v8::internal |
7493 | 7494 |
7494 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7495 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |