OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 V(CompareMap) \ | 94 V(CompareMap) \ |
95 V(CompareSymbolEq) \ | 95 V(CompareSymbolEq) \ |
96 V(Constant) \ | 96 V(Constant) \ |
97 V(Context) \ | 97 V(Context) \ |
98 V(DeleteProperty) \ | 98 V(DeleteProperty) \ |
99 V(Deoptimize) \ | 99 V(Deoptimize) \ |
100 V(Div) \ | 100 V(Div) \ |
101 V(EnterInlined) \ | 101 V(EnterInlined) \ |
102 V(ExternalArrayLength) \ | 102 V(ExternalArrayLength) \ |
103 V(FixedArrayLength) \ | 103 V(FixedArrayLength) \ |
| 104 V(ForceRepresentation) \ |
104 V(FunctionLiteral) \ | 105 V(FunctionLiteral) \ |
105 V(GetCachedArrayIndex) \ | 106 V(GetCachedArrayIndex) \ |
106 V(GlobalObject) \ | 107 V(GlobalObject) \ |
107 V(GlobalReceiver) \ | 108 V(GlobalReceiver) \ |
108 V(Goto) \ | 109 V(Goto) \ |
109 V(HasInstanceType) \ | 110 V(HasInstanceType) \ |
110 V(HasCachedArrayIndex) \ | 111 V(HasCachedArrayIndex) \ |
111 V(In) \ | 112 V(In) \ |
112 V(InstanceOf) \ | 113 V(InstanceOf) \ |
113 V(InstanceOfKnownGlobal) \ | 114 V(InstanceOfKnownGlobal) \ |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 } | 1003 } |
1003 | 1004 |
1004 virtual Representation RequiredInputRepresentation(int index) const { | 1005 virtual Representation RequiredInputRepresentation(int index) const { |
1005 return Representation::Tagged(); | 1006 return Representation::Tagged(); |
1006 } | 1007 } |
1007 | 1008 |
1008 DECLARE_CONCRETE_INSTRUCTION(Throw) | 1009 DECLARE_CONCRETE_INSTRUCTION(Throw) |
1009 }; | 1010 }; |
1010 | 1011 |
1011 | 1012 |
| 1013 class HForceRepresentation: public HTemplateInstruction<1> { |
| 1014 public: |
| 1015 HForceRepresentation(HValue* value, Representation required_representation) { |
| 1016 SetOperandAt(0, value); |
| 1017 set_representation(required_representation); |
| 1018 } |
| 1019 |
| 1020 HValue* value() { return OperandAt(0); } |
| 1021 |
| 1022 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
| 1023 |
| 1024 virtual Representation RequiredInputRepresentation(int index) const { |
| 1025 return representation(); // Same as the output representation. |
| 1026 } |
| 1027 |
| 1028 DECLARE_CONCRETE_INSTRUCTION(ForceRepresentation) |
| 1029 }; |
| 1030 |
| 1031 |
1012 class HChange: public HUnaryOperation { | 1032 class HChange: public HUnaryOperation { |
1013 public: | 1033 public: |
1014 HChange(HValue* value, | 1034 HChange(HValue* value, |
1015 Representation from, | 1035 Representation from, |
1016 Representation to, | 1036 Representation to, |
1017 bool is_truncating) | 1037 bool is_truncating) |
1018 : HUnaryOperation(value), from_(from) { | 1038 : HUnaryOperation(value), from_(from) { |
1019 ASSERT(!from.IsNone() && !to.IsNone()); | 1039 ASSERT(!from.IsNone() && !to.IsNone()); |
1020 ASSERT(!from.Equals(to)); | 1040 ASSERT(!from.Equals(to)); |
1021 set_representation(to); | 1041 set_representation(to); |
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3936 | 3956 |
3937 DECLARE_CONCRETE_INSTRUCTION(In) | 3957 DECLARE_CONCRETE_INSTRUCTION(In) |
3938 }; | 3958 }; |
3939 | 3959 |
3940 #undef DECLARE_INSTRUCTION | 3960 #undef DECLARE_INSTRUCTION |
3941 #undef DECLARE_CONCRETE_INSTRUCTION | 3961 #undef DECLARE_CONCRETE_INSTRUCTION |
3942 | 3962 |
3943 } } // namespace v8::internal | 3963 } } // namespace v8::internal |
3944 | 3964 |
3945 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3965 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |