OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 HValue* context() const { return OperandAt(0); } | 2446 HValue* context() const { return OperandAt(0); } |
2447 HValue* value() const { return OperandAt(1); } | 2447 HValue* value() const { return OperandAt(1); } |
2448 | 2448 |
2449 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 2449 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
2450 | 2450 |
2451 Representation RequiredInputRepresentation(int index) override { | 2451 Representation RequiredInputRepresentation(int index) override { |
2452 if (index == 0) { | 2452 if (index == 0) { |
2453 return Representation::Tagged(); | 2453 return Representation::Tagged(); |
2454 } else { | 2454 } else { |
2455 switch (op_) { | 2455 switch (op_) { |
| 2456 case kMathCos: |
2456 case kMathFloor: | 2457 case kMathFloor: |
2457 case kMathRound: | 2458 case kMathRound: |
2458 case kMathFround: | 2459 case kMathFround: |
| 2460 case kMathSin: |
2459 case kMathSqrt: | 2461 case kMathSqrt: |
2460 case kMathPowHalf: | 2462 case kMathPowHalf: |
2461 case kMathLog: | 2463 case kMathLog: |
2462 case kMathExp: | 2464 case kMathExp: |
2463 return Representation::Double(); | 2465 return Representation::Double(); |
2464 case kMathAbs: | 2466 case kMathAbs: |
2465 return representation(); | 2467 return representation(); |
2466 case kMathClz32: | 2468 case kMathClz32: |
2467 return Representation::Integer32(); | 2469 return Representation::Integer32(); |
2468 default: | 2470 default: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2517 case kMathClz32: | 2519 case kMathClz32: |
2518 set_representation(Representation::Integer32()); | 2520 set_representation(Representation::Integer32()); |
2519 break; | 2521 break; |
2520 case kMathAbs: | 2522 case kMathAbs: |
2521 // Not setting representation here: it is None intentionally. | 2523 // Not setting representation here: it is None intentionally. |
2522 SetFlag(kFlexibleRepresentation); | 2524 SetFlag(kFlexibleRepresentation); |
2523 // TODO(svenpanne) This flag is actually only needed if representation() | 2525 // TODO(svenpanne) This flag is actually only needed if representation() |
2524 // is tagged, and not when it is an unboxed double or unboxed integer. | 2526 // is tagged, and not when it is an unboxed double or unboxed integer. |
2525 SetChangesFlag(kNewSpacePromotion); | 2527 SetChangesFlag(kNewSpacePromotion); |
2526 break; | 2528 break; |
| 2529 case kMathCos: |
2527 case kMathFround: | 2530 case kMathFround: |
2528 case kMathLog: | 2531 case kMathLog: |
2529 case kMathExp: | 2532 case kMathExp: |
| 2533 case kMathSin: |
2530 case kMathSqrt: | 2534 case kMathSqrt: |
2531 case kMathPowHalf: | 2535 case kMathPowHalf: |
2532 set_representation(Representation::Double()); | 2536 set_representation(Representation::Double()); |
2533 break; | 2537 break; |
2534 default: | 2538 default: |
2535 UNREACHABLE(); | 2539 UNREACHABLE(); |
2536 } | 2540 } |
2537 SetFlag(kUseGVN); | 2541 SetFlag(kUseGVN); |
2538 SetFlag(kAllowUndefinedAsNaN); | 2542 SetFlag(kAllowUndefinedAsNaN); |
2539 } | 2543 } |
(...skipping 4641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7181 bool IsDeletable() const override { return true; } | 7185 bool IsDeletable() const override { return true; } |
7182 }; | 7186 }; |
7183 | 7187 |
7184 #undef DECLARE_INSTRUCTION | 7188 #undef DECLARE_INSTRUCTION |
7185 #undef DECLARE_CONCRETE_INSTRUCTION | 7189 #undef DECLARE_CONCRETE_INSTRUCTION |
7186 | 7190 |
7187 } // namespace internal | 7191 } // namespace internal |
7188 } // namespace v8 | 7192 } // namespace v8 |
7189 | 7193 |
7190 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7194 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |