| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 V(MapEnumLength) \ | 148 V(MapEnumLength) \ |
| 149 V(MathFloorOfDiv) \ | 149 V(MathFloorOfDiv) \ |
| 150 V(MathMinMax) \ | 150 V(MathMinMax) \ |
| 151 V(Mod) \ | 151 V(Mod) \ |
| 152 V(Mul) \ | 152 V(Mul) \ |
| 153 V(OsrEntry) \ | 153 V(OsrEntry) \ |
| 154 V(OuterContext) \ | 154 V(OuterContext) \ |
| 155 V(Parameter) \ | 155 V(Parameter) \ |
| 156 V(Power) \ | 156 V(Power) \ |
| 157 V(PushArgument) \ | 157 V(PushArgument) \ |
| 158 V(Random) \ | |
| 159 V(RegExpLiteral) \ | 158 V(RegExpLiteral) \ |
| 160 V(Return) \ | 159 V(Return) \ |
| 161 V(Ror) \ | 160 V(Ror) \ |
| 162 V(Sar) \ | 161 V(Sar) \ |
| 163 V(SeqStringGetChar) \ | 162 V(SeqStringGetChar) \ |
| 164 V(SeqStringSetChar) \ | 163 V(SeqStringSetChar) \ |
| 165 V(Shl) \ | 164 V(Shl) \ |
| 166 V(Shr) \ | 165 V(Shr) \ |
| 167 V(Simulate) \ | 166 V(Simulate) \ |
| 168 V(StackCheck) \ | 167 V(StackCheck) \ |
| (...skipping 4419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4588 SetFlag(kUseGVN); | 4587 SetFlag(kUseGVN); |
| 4589 SetGVNFlag(kChangesNewSpacePromotion); | 4588 SetGVNFlag(kChangesNewSpacePromotion); |
| 4590 } | 4589 } |
| 4591 | 4590 |
| 4592 virtual bool IsDeletable() const V8_OVERRIDE { | 4591 virtual bool IsDeletable() const V8_OVERRIDE { |
| 4593 return !right()->representation().IsTagged(); | 4592 return !right()->representation().IsTagged(); |
| 4594 } | 4593 } |
| 4595 }; | 4594 }; |
| 4596 | 4595 |
| 4597 | 4596 |
| 4598 class HRandom V8_FINAL : public HTemplateInstruction<1> { | |
| 4599 public: | |
| 4600 DECLARE_INSTRUCTION_FACTORY_P1(HRandom, HValue*); | |
| 4601 | |
| 4602 HValue* global_object() { return OperandAt(0); } | |
| 4603 | |
| 4604 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | |
| 4605 return Representation::Tagged(); | |
| 4606 } | |
| 4607 | |
| 4608 DECLARE_CONCRETE_INSTRUCTION(Random) | |
| 4609 | |
| 4610 private: | |
| 4611 explicit HRandom(HValue* global_object) { | |
| 4612 SetOperandAt(0, global_object); | |
| 4613 set_representation(Representation::Double()); | |
| 4614 } | |
| 4615 | |
| 4616 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | |
| 4617 }; | |
| 4618 | |
| 4619 | |
| 4620 class HAdd V8_FINAL : public HArithmeticBinaryOperation { | 4597 class HAdd V8_FINAL : public HArithmeticBinaryOperation { |
| 4621 public: | 4598 public: |
| 4622 static HInstruction* New(Zone* zone, | 4599 static HInstruction* New(Zone* zone, |
| 4623 HValue* context, | 4600 HValue* context, |
| 4624 HValue* left, | 4601 HValue* left, |
| 4625 HValue* right); | 4602 HValue* right); |
| 4626 | 4603 |
| 4627 // Add is only commutative if two integer values are added and not if two | 4604 // Add is only commutative if two integer values are added and not if two |
| 4628 // tagged values are added (because it might be a String concatenation). | 4605 // tagged values are added (because it might be a String concatenation). |
| 4629 virtual bool IsCommutative() const V8_OVERRIDE { | 4606 virtual bool IsCommutative() const V8_OVERRIDE { |
| (...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7318 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7295 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7319 }; | 7296 }; |
| 7320 | 7297 |
| 7321 | 7298 |
| 7322 #undef DECLARE_INSTRUCTION | 7299 #undef DECLARE_INSTRUCTION |
| 7323 #undef DECLARE_CONCRETE_INSTRUCTION | 7300 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7324 | 7301 |
| 7325 } } // namespace v8::internal | 7302 } } // namespace v8::internal |
| 7326 | 7303 |
| 7327 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7304 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |