| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 V(FunctionLiteral) \ | 114 V(FunctionLiteral) \ |
| 115 V(GetCachedArrayIndex) \ | 115 V(GetCachedArrayIndex) \ |
| 116 V(GlobalObject) \ | 116 V(GlobalObject) \ |
| 117 V(GlobalReceiver) \ | 117 V(GlobalReceiver) \ |
| 118 V(Goto) \ | 118 V(Goto) \ |
| 119 V(HasCachedArrayIndexAndBranch) \ | 119 V(HasCachedArrayIndexAndBranch) \ |
| 120 V(HasInstanceTypeAndBranch) \ | 120 V(HasInstanceTypeAndBranch) \ |
| 121 V(In) \ | 121 V(In) \ |
| 122 V(InstanceOf) \ | 122 V(InstanceOf) \ |
| 123 V(InstanceOfKnownGlobal) \ | 123 V(InstanceOfKnownGlobal) \ |
| 124 V(InstanceSize) \ |
| 124 V(InvokeFunction) \ | 125 V(InvokeFunction) \ |
| 125 V(IsConstructCallAndBranch) \ | 126 V(IsConstructCallAndBranch) \ |
| 126 V(IsNilAndBranch) \ | 127 V(IsNilAndBranch) \ |
| 127 V(IsObjectAndBranch) \ | 128 V(IsObjectAndBranch) \ |
| 128 V(IsStringAndBranch) \ | 129 V(IsStringAndBranch) \ |
| 129 V(IsSmiAndBranch) \ | 130 V(IsSmiAndBranch) \ |
| 130 V(IsUndetectableAndBranch) \ | 131 V(IsUndetectableAndBranch) \ |
| 131 V(JSArrayLength) \ | 132 V(JSArrayLength) \ |
| 132 V(LeaveInlined) \ | 133 V(LeaveInlined) \ |
| 133 V(LoadContextSlot) \ | 134 V(LoadContextSlot) \ |
| (...skipping 3480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3614 | 3615 |
| 3615 virtual HType CalculateInferredType(); | 3616 virtual HType CalculateInferredType(); |
| 3616 | 3617 |
| 3617 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal) | 3618 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal) |
| 3618 | 3619 |
| 3619 private: | 3620 private: |
| 3620 Handle<JSFunction> function_; | 3621 Handle<JSFunction> function_; |
| 3621 }; | 3622 }; |
| 3622 | 3623 |
| 3623 | 3624 |
| 3625 // TODO(mstarzinger): This instruction should be modeled as a load of the map |
| 3626 // field followed by a load of the instance size field once HLoadNamedField is |
| 3627 // flexible enough to accommodate byte-field loads. |
| 3628 class HInstanceSize: public HTemplateInstruction<1> { |
| 3629 public: |
| 3630 explicit HInstanceSize(HValue* object) { |
| 3631 SetOperandAt(0, object); |
| 3632 set_representation(Representation::Integer32()); |
| 3633 } |
| 3634 |
| 3635 HValue* object() { return OperandAt(0); } |
| 3636 |
| 3637 virtual Representation RequiredInputRepresentation(int index) { |
| 3638 return Representation::Tagged(); |
| 3639 } |
| 3640 |
| 3641 DECLARE_CONCRETE_INSTRUCTION(InstanceSize) |
| 3642 }; |
| 3643 |
| 3644 |
| 3624 class HPower: public HTemplateInstruction<2> { | 3645 class HPower: public HTemplateInstruction<2> { |
| 3625 public: | 3646 public: |
| 3626 HPower(HValue* left, HValue* right) { | 3647 HPower(HValue* left, HValue* right) { |
| 3627 SetOperandAt(0, left); | 3648 SetOperandAt(0, left); |
| 3628 SetOperandAt(1, right); | 3649 SetOperandAt(1, right); |
| 3629 set_representation(Representation::Double()); | 3650 set_representation(Representation::Double()); |
| 3630 SetFlag(kUseGVN); | 3651 SetFlag(kUseGVN); |
| 3631 SetGVNFlag(kChangesNewSpacePromotion); | 3652 SetGVNFlag(kChangesNewSpacePromotion); |
| 3632 } | 3653 } |
| 3633 | 3654 |
| (...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5743 virtual bool IsDeletable() const { return true; } | 5764 virtual bool IsDeletable() const { return true; } |
| 5744 }; | 5765 }; |
| 5745 | 5766 |
| 5746 | 5767 |
| 5747 #undef DECLARE_INSTRUCTION | 5768 #undef DECLARE_INSTRUCTION |
| 5748 #undef DECLARE_CONCRETE_INSTRUCTION | 5769 #undef DECLARE_CONCRETE_INSTRUCTION |
| 5749 | 5770 |
| 5750 } } // namespace v8::internal | 5771 } } // namespace v8::internal |
| 5751 | 5772 |
| 5752 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5773 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |