| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 V(LoadKeyed) \ | 136 V(LoadKeyed) \ |
| 137 V(LoadKeyedGeneric) \ | 137 V(LoadKeyedGeneric) \ |
| 138 V(LoadNamedField) \ | 138 V(LoadNamedField) \ |
| 139 V(LoadNamedFieldPolymorphic) \ | 139 V(LoadNamedFieldPolymorphic) \ |
| 140 V(LoadNamedGeneric) \ | 140 V(LoadNamedGeneric) \ |
| 141 V(MapEnumLength) \ | 141 V(MapEnumLength) \ |
| 142 V(MathFloorOfDiv) \ | 142 V(MathFloorOfDiv) \ |
| 143 V(MathMinMax) \ | 143 V(MathMinMax) \ |
| 144 V(Mod) \ | 144 V(Mod) \ |
| 145 V(Mul) \ | 145 V(Mul) \ |
| 146 V(MultiplyAddD) \ |
| 146 V(ObjectLiteral) \ | 147 V(ObjectLiteral) \ |
| 147 V(OsrEntry) \ | 148 V(OsrEntry) \ |
| 148 V(OuterContext) \ | 149 V(OuterContext) \ |
| 149 V(Parameter) \ | 150 V(Parameter) \ |
| 150 V(Power) \ | 151 V(Power) \ |
| 151 V(PushArgument) \ | 152 V(PushArgument) \ |
| 152 V(Random) \ | 153 V(Random) \ |
| 153 V(RegExpLiteral) \ | 154 V(RegExpLiteral) \ |
| 154 V(Return) \ | 155 V(Return) \ |
| 155 V(Ror) \ | 156 V(Ror) \ |
| (...skipping 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3530 | 3531 |
| 3531 DECLARE_CONCRETE_INSTRUCTION(Mul) | 3532 DECLARE_CONCRETE_INSTRUCTION(Mul) |
| 3532 | 3533 |
| 3533 protected: | 3534 protected: |
| 3534 virtual bool DataEquals(HValue* other) { return true; } | 3535 virtual bool DataEquals(HValue* other) { return true; } |
| 3535 | 3536 |
| 3536 virtual Range* InferRange(Zone* zone); | 3537 virtual Range* InferRange(Zone* zone); |
| 3537 }; | 3538 }; |
| 3538 | 3539 |
| 3539 | 3540 |
| 3541 class HMultiplyAddD: public HTemplateInstruction<4> { |
| 3542 public: |
| 3543 HMultiplyAddD(HValue* context, HValue* a, HValue* b, HValue* c) { |
| 3544 ASSERT(a != NULL && b != NULL && c != NULL); |
| 3545 SetOperandAt(0, context); |
| 3546 SetOperandAt(1, a); |
| 3547 SetOperandAt(2, b); |
| 3548 SetOperandAt(3, c); |
| 3549 |
| 3550 set_representation(Representation::Double()); |
| 3551 } |
| 3552 |
| 3553 HValue* context() { return OperandAt(0); } |
| 3554 HValue* a() { return OperandAt(1); } |
| 3555 HValue* b() { return OperandAt(2); } |
| 3556 HValue* c() { return OperandAt(3); } |
| 3557 |
| 3558 virtual void PrintDataTo(StringStream* stream); |
| 3559 |
| 3560 virtual Representation RequiredInputRepresentation(int index) { |
| 3561 return index == 0 ? Representation::Tagged() : Representation::Double(); |
| 3562 } |
| 3563 |
| 3564 DECLARE_CONCRETE_INSTRUCTION(MultiplyAddD) |
| 3565 }; |
| 3566 |
| 3567 |
| 3540 class HMod: public HArithmeticBinaryOperation { | 3568 class HMod: public HArithmeticBinaryOperation { |
| 3541 public: | 3569 public: |
| 3542 HMod(HValue* context, HValue* left, HValue* right) | 3570 HMod(HValue* context, HValue* left, HValue* right) |
| 3543 : HArithmeticBinaryOperation(context, left, right) { | 3571 : HArithmeticBinaryOperation(context, left, right) { |
| 3544 SetFlag(kCanBeDivByZero); | 3572 SetFlag(kCanBeDivByZero); |
| 3545 } | 3573 } |
| 3546 | 3574 |
| 3547 bool HasPowerOf2Divisor() { | 3575 bool HasPowerOf2Divisor() { |
| 3548 if (right()->IsConstant() && | 3576 if (right()->IsConstant() && |
| 3549 HConstant::cast(right())->HasInteger32Value()) { | 3577 HConstant::cast(right())->HasInteger32Value()) { |
| (...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 virtual bool IsDeletable() const { return true; } | 5310 virtual bool IsDeletable() const { return true; } |
| 5283 }; | 5311 }; |
| 5284 | 5312 |
| 5285 | 5313 |
| 5286 #undef DECLARE_INSTRUCTION | 5314 #undef DECLARE_INSTRUCTION |
| 5287 #undef DECLARE_CONCRETE_INSTRUCTION | 5315 #undef DECLARE_CONCRETE_INSTRUCTION |
| 5288 | 5316 |
| 5289 } } // namespace v8::internal | 5317 } } // namespace v8::internal |
| 5290 | 5318 |
| 5291 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5319 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |