| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 V(MapEnumLength) \ | 147 V(MapEnumLength) \ |
| 148 V(MathFloorOfDiv) \ | 148 V(MathFloorOfDiv) \ |
| 149 V(MathMinMax) \ | 149 V(MathMinMax) \ |
| 150 V(Mod) \ | 150 V(Mod) \ |
| 151 V(Mul) \ | 151 V(Mul) \ |
| 152 V(OsrEntry) \ | 152 V(OsrEntry) \ |
| 153 V(OuterContext) \ | 153 V(OuterContext) \ |
| 154 V(Parameter) \ | 154 V(Parameter) \ |
| 155 V(Power) \ | 155 V(Power) \ |
| 156 V(PushArgument) \ | 156 V(PushArgument) \ |
| 157 V(Random) \ | |
| 158 V(RegExpLiteral) \ | 157 V(RegExpLiteral) \ |
| 159 V(Return) \ | 158 V(Return) \ |
| 160 V(Ror) \ | 159 V(Ror) \ |
| 161 V(Sar) \ | 160 V(Sar) \ |
| 162 V(SeqStringGetChar) \ | 161 V(SeqStringGetChar) \ |
| 163 V(SeqStringSetChar) \ | 162 V(SeqStringSetChar) \ |
| 164 V(Shl) \ | 163 V(Shl) \ |
| 165 V(Shr) \ | 164 V(Shr) \ |
| 166 V(Simulate) \ | 165 V(Simulate) \ |
| 167 V(StackCheck) \ | 166 V(StackCheck) \ |
| (...skipping 4378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4546 SetFlag(kUseGVN); | 4545 SetFlag(kUseGVN); |
| 4547 SetGVNFlag(kChangesNewSpacePromotion); | 4546 SetGVNFlag(kChangesNewSpacePromotion); |
| 4548 } | 4547 } |
| 4549 | 4548 |
| 4550 virtual bool IsDeletable() const V8_OVERRIDE { | 4549 virtual bool IsDeletable() const V8_OVERRIDE { |
| 4551 return !right()->representation().IsTagged(); | 4550 return !right()->representation().IsTagged(); |
| 4552 } | 4551 } |
| 4553 }; | 4552 }; |
| 4554 | 4553 |
| 4555 | 4554 |
| 4556 class HRandom V8_FINAL : public HTemplateInstruction<1> { | |
| 4557 public: | |
| 4558 DECLARE_INSTRUCTION_FACTORY_P1(HRandom, HValue*); | |
| 4559 | |
| 4560 HValue* global_object() { return OperandAt(0); } | |
| 4561 | |
| 4562 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | |
| 4563 return Representation::Tagged(); | |
| 4564 } | |
| 4565 | |
| 4566 DECLARE_CONCRETE_INSTRUCTION(Random) | |
| 4567 | |
| 4568 private: | |
| 4569 explicit HRandom(HValue* global_object) { | |
| 4570 SetOperandAt(0, global_object); | |
| 4571 set_representation(Representation::Double()); | |
| 4572 } | |
| 4573 | |
| 4574 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | |
| 4575 }; | |
| 4576 | |
| 4577 | |
| 4578 class HAdd V8_FINAL : public HArithmeticBinaryOperation { | 4555 class HAdd V8_FINAL : public HArithmeticBinaryOperation { |
| 4579 public: | 4556 public: |
| 4580 static HInstruction* New(Zone* zone, | 4557 static HInstruction* New(Zone* zone, |
| 4581 HValue* context, | 4558 HValue* context, |
| 4582 HValue* left, | 4559 HValue* left, |
| 4583 HValue* right); | 4560 HValue* right); |
| 4584 | 4561 |
| 4585 // Add is only commutative if two integer values are added and not if two | 4562 // Add is only commutative if two integer values are added and not if two |
| 4586 // tagged values are added (because it might be a String concatenation). | 4563 // tagged values are added (because it might be a String concatenation). |
| 4587 virtual bool IsCommutative() const V8_OVERRIDE { | 4564 virtual bool IsCommutative() const V8_OVERRIDE { |
| (...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7254 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7231 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7255 }; | 7232 }; |
| 7256 | 7233 |
| 7257 | 7234 |
| 7258 #undef DECLARE_INSTRUCTION | 7235 #undef DECLARE_INSTRUCTION |
| 7259 #undef DECLARE_CONCRETE_INSTRUCTION | 7236 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7260 | 7237 |
| 7261 } } // namespace v8::internal | 7238 } } // namespace v8::internal |
| 7262 | 7239 |
| 7263 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7240 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |