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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 V(LoadNamedGeneric) \ | 139 V(LoadNamedGeneric) \ |
140 V(Mod) \ | 140 V(Mod) \ |
141 V(Mul) \ | 141 V(Mul) \ |
142 V(ObjectLiteralFast) \ | 142 V(ObjectLiteralFast) \ |
143 V(ObjectLiteralGeneric) \ | 143 V(ObjectLiteralGeneric) \ |
144 V(OsrEntry) \ | 144 V(OsrEntry) \ |
145 V(OuterContext) \ | 145 V(OuterContext) \ |
146 V(Parameter) \ | 146 V(Parameter) \ |
147 V(Power) \ | 147 V(Power) \ |
148 V(PushArgument) \ | 148 V(PushArgument) \ |
| 149 V(Random) \ |
149 V(RegExpLiteral) \ | 150 V(RegExpLiteral) \ |
150 V(Return) \ | 151 V(Return) \ |
151 V(Sar) \ | 152 V(Sar) \ |
152 V(Shl) \ | 153 V(Shl) \ |
153 V(Shr) \ | 154 V(Shr) \ |
154 V(Simulate) \ | 155 V(Simulate) \ |
155 V(SoftDeoptimize) \ | 156 V(SoftDeoptimize) \ |
156 V(StackCheck) \ | 157 V(StackCheck) \ |
157 V(StoreContextSlot) \ | 158 V(StoreContextSlot) \ |
158 V(StoreGlobalCell) \ | 159 V(StoreGlobalCell) \ |
(...skipping 2832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2991 : Representation::None(); | 2992 : Representation::None(); |
2992 } | 2993 } |
2993 | 2994 |
2994 DECLARE_CONCRETE_INSTRUCTION(Power) | 2995 DECLARE_CONCRETE_INSTRUCTION(Power) |
2995 | 2996 |
2996 protected: | 2997 protected: |
2997 virtual bool DataEquals(HValue* other) { return true; } | 2998 virtual bool DataEquals(HValue* other) { return true; } |
2998 }; | 2999 }; |
2999 | 3000 |
3000 | 3001 |
| 3002 class HRandom: public HTemplateInstruction<1> { |
| 3003 public: |
| 3004 explicit HRandom(HValue* global_object) { |
| 3005 SetOperandAt(0, global_object); |
| 3006 set_representation(Representation::Double()); |
| 3007 } |
| 3008 |
| 3009 HValue* global_object() { return OperandAt(0); } |
| 3010 |
| 3011 virtual Representation RequiredInputRepresentation(int index) { |
| 3012 return Representation::Tagged(); |
| 3013 } |
| 3014 |
| 3015 DECLARE_CONCRETE_INSTRUCTION(Random) |
| 3016 }; |
| 3017 |
| 3018 |
3001 class HAdd: public HArithmeticBinaryOperation { | 3019 class HAdd: public HArithmeticBinaryOperation { |
3002 public: | 3020 public: |
3003 HAdd(HValue* context, HValue* left, HValue* right) | 3021 HAdd(HValue* context, HValue* left, HValue* right) |
3004 : HArithmeticBinaryOperation(context, left, right) { | 3022 : HArithmeticBinaryOperation(context, left, right) { |
3005 SetFlag(kCanOverflow); | 3023 SetFlag(kCanOverflow); |
3006 } | 3024 } |
3007 | 3025 |
3008 // Add is only commutative if two integer values are added and not if two | 3026 // Add is only commutative if two integer values are added and not if two |
3009 // tagged values are added (because it might be a String concatenation). | 3027 // tagged values are added (because it might be a String concatenation). |
3010 virtual bool IsCommutative() const { | 3028 virtual bool IsCommutative() const { |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4501 | 4519 |
4502 DECLARE_CONCRETE_INSTRUCTION(In) | 4520 DECLARE_CONCRETE_INSTRUCTION(In) |
4503 }; | 4521 }; |
4504 | 4522 |
4505 #undef DECLARE_INSTRUCTION | 4523 #undef DECLARE_INSTRUCTION |
4506 #undef DECLARE_CONCRETE_INSTRUCTION | 4524 #undef DECLARE_CONCRETE_INSTRUCTION |
4507 | 4525 |
4508 } } // namespace v8::internal | 4526 } } // namespace v8::internal |
4509 | 4527 |
4510 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4528 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |