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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 V(FunctionLiteral) \ | 119 V(FunctionLiteral) \ |
120 V(GetCachedArrayIndex) \ | 120 V(GetCachedArrayIndex) \ |
121 V(GlobalObject) \ | 121 V(GlobalObject) \ |
122 V(GlobalReceiver) \ | 122 V(GlobalReceiver) \ |
123 V(Goto) \ | 123 V(Goto) \ |
124 V(HasCachedArrayIndexAndBranch) \ | 124 V(HasCachedArrayIndexAndBranch) \ |
125 V(HasInstanceTypeAndBranch) \ | 125 V(HasInstanceTypeAndBranch) \ |
126 V(InnerAllocatedObject) \ | 126 V(InnerAllocatedObject) \ |
127 V(InstanceOf) \ | 127 V(InstanceOf) \ |
128 V(InstanceOfKnownGlobal) \ | 128 V(InstanceOfKnownGlobal) \ |
129 V(InstanceSize) \ | |
130 V(InvokeFunction) \ | 129 V(InvokeFunction) \ |
131 V(IsConstructCallAndBranch) \ | 130 V(IsConstructCallAndBranch) \ |
132 V(IsObjectAndBranch) \ | 131 V(IsObjectAndBranch) \ |
133 V(IsStringAndBranch) \ | 132 V(IsStringAndBranch) \ |
134 V(IsSmiAndBranch) \ | 133 V(IsSmiAndBranch) \ |
135 V(IsUndetectableAndBranch) \ | 134 V(IsUndetectableAndBranch) \ |
136 V(LeaveInlined) \ | 135 V(LeaveInlined) \ |
137 V(LoadContextSlot) \ | 136 V(LoadContextSlot) \ |
138 V(LoadExternalArrayPointer) \ | 137 V(LoadExternalArrayPointer) \ |
139 V(LoadFieldByIndex) \ | 138 V(LoadFieldByIndex) \ |
(...skipping 4303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 SetOperandAt(0, context); | 4442 SetOperandAt(0, context); |
4444 SetOperandAt(1, left); | 4443 SetOperandAt(1, left); |
4445 set_representation(Representation::Tagged()); | 4444 set_representation(Representation::Tagged()); |
4446 SetAllSideEffects(); | 4445 SetAllSideEffects(); |
4447 } | 4446 } |
4448 | 4447 |
4449 Handle<JSFunction> function_; | 4448 Handle<JSFunction> function_; |
4450 }; | 4449 }; |
4451 | 4450 |
4452 | 4451 |
4453 // TODO(mstarzinger): This instruction should be modeled as a load of the map | |
4454 // field followed by a load of the instance size field once HLoadNamedField is | |
4455 // flexible enough to accommodate byte-field loads. | |
4456 class HInstanceSize V8_FINAL : public HTemplateInstruction<1> { | |
4457 public: | |
4458 explicit HInstanceSize(HValue* object) { | |
4459 SetOperandAt(0, object); | |
4460 set_representation(Representation::Integer32()); | |
4461 } | |
4462 | |
4463 HValue* object() { return OperandAt(0); } | |
4464 | |
4465 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | |
4466 return Representation::Tagged(); | |
4467 } | |
4468 | |
4469 DECLARE_CONCRETE_INSTRUCTION(InstanceSize) | |
4470 }; | |
4471 | |
4472 | |
4473 class HPower V8_FINAL : public HTemplateInstruction<2> { | 4452 class HPower V8_FINAL : public HTemplateInstruction<2> { |
4474 public: | 4453 public: |
4475 static HInstruction* New(Zone* zone, | 4454 static HInstruction* New(Zone* zone, |
4476 HValue* context, | 4455 HValue* context, |
4477 HValue* left, | 4456 HValue* left, |
4478 HValue* right); | 4457 HValue* right); |
4479 | 4458 |
4480 HValue* left() { return OperandAt(0); } | 4459 HValue* left() { return OperandAt(0); } |
4481 HValue* right() const { return OperandAt(1); } | 4460 HValue* right() const { return OperandAt(1); } |
4482 | 4461 |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5798 } | 5777 } |
5799 | 5778 |
5800 static HObjectAccess ForFunctionContextPointer() { | 5779 static HObjectAccess ForFunctionContextPointer() { |
5801 return HObjectAccess(kInobject, JSFunction::kContextOffset); | 5780 return HObjectAccess(kInobject, JSFunction::kContextOffset); |
5802 } | 5781 } |
5803 | 5782 |
5804 static HObjectAccess ForMap() { | 5783 static HObjectAccess ForMap() { |
5805 return HObjectAccess(kMaps, JSObject::kMapOffset); | 5784 return HObjectAccess(kMaps, JSObject::kMapOffset); |
5806 } | 5785 } |
5807 | 5786 |
| 5787 static HObjectAccess ForMapInstanceSize() { |
| 5788 return HObjectAccess(kInobject, |
| 5789 Map::kInstanceSizeOffset, |
| 5790 Representation::Byte()); |
| 5791 } |
| 5792 |
5808 static HObjectAccess ForPropertyCellValue() { | 5793 static HObjectAccess ForPropertyCellValue() { |
5809 return HObjectAccess(kInobject, PropertyCell::kValueOffset); | 5794 return HObjectAccess(kInobject, PropertyCell::kValueOffset); |
5810 } | 5795 } |
5811 | 5796 |
5812 static HObjectAccess ForCellValue() { | 5797 static HObjectAccess ForCellValue() { |
5813 return HObjectAccess(kInobject, Cell::kValueOffset); | 5798 return HObjectAccess(kInobject, Cell::kValueOffset); |
5814 } | 5799 } |
5815 | 5800 |
5816 static HObjectAccess ForAllocationMementoSite() { | 5801 static HObjectAccess ForAllocationMementoSite() { |
5817 return HObjectAccess(kInobject, AllocationMemento::kAllocationSiteOffset); | 5802 return HObjectAccess(kInobject, AllocationMemento::kAllocationSiteOffset); |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7111 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7096 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7112 }; | 7097 }; |
7113 | 7098 |
7114 | 7099 |
7115 #undef DECLARE_INSTRUCTION | 7100 #undef DECLARE_INSTRUCTION |
7116 #undef DECLARE_CONCRETE_INSTRUCTION | 7101 #undef DECLARE_CONCRETE_INSTRUCTION |
7117 | 7102 |
7118 } } // namespace v8::internal | 7103 } } // namespace v8::internal |
7119 | 7104 |
7120 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7105 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |