| 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 #include "src/compiler/simplified-operator.h" | 5 #include "src/compiler/simplified-operator.h" |
| 6 | 6 |
| 7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
| 8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
| 9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
| 10 #include "src/types.h" | 10 #include "src/types.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 switch (mode) { | 500 switch (mode) { |
| 501 case CheckForMinusZeroMode::kCheckForMinusZero: | 501 case CheckForMinusZeroMode::kCheckForMinusZero: |
| 502 return &cache_.kCheckedInt32MulCheckForMinusZeroOperator; | 502 return &cache_.kCheckedInt32MulCheckForMinusZeroOperator; |
| 503 case CheckForMinusZeroMode::kDontCheckForMinusZero: | 503 case CheckForMinusZeroMode::kDontCheckForMinusZero: |
| 504 return &cache_.kCheckedInt32MulDontCheckForMinusZeroOperator; | 504 return &cache_.kCheckedInt32MulDontCheckForMinusZeroOperator; |
| 505 } | 505 } |
| 506 UNREACHABLE(); | 506 UNREACHABLE(); |
| 507 return nullptr; | 507 return nullptr; |
| 508 } | 508 } |
| 509 | 509 |
| 510 const Operator* SimplifiedOperatorBuilder::CheckMaps(int map_input_count) { |
| 511 // TODO(bmeurer): Cache the most important versions of this operator. |
| 512 DCHECK_LT(0, map_input_count); |
| 513 int const value_input_count = 1 + map_input_count; |
| 514 return new (zone()) Operator1<int>( // -- |
| 515 IrOpcode::kCheckMaps, // opcode |
| 516 Operator::kNoThrow | Operator::kNoWrite, // flags |
| 517 "CheckMaps", // name |
| 518 value_input_count, 1, 1, 0, 1, 0, // counts |
| 519 map_input_count); // parameter |
| 520 } |
| 521 |
| 510 const Operator* SimplifiedOperatorBuilder::CheckFloat64Hole( | 522 const Operator* SimplifiedOperatorBuilder::CheckFloat64Hole( |
| 511 CheckFloat64HoleMode mode) { | 523 CheckFloat64HoleMode mode) { |
| 512 switch (mode) { | 524 switch (mode) { |
| 513 case CheckFloat64HoleMode::kAllowReturnHole: | 525 case CheckFloat64HoleMode::kAllowReturnHole: |
| 514 return &cache_.kCheckFloat64HoleAllowReturnHoleOperator; | 526 return &cache_.kCheckFloat64HoleAllowReturnHoleOperator; |
| 515 case CheckFloat64HoleMode::kNeverReturnHole: | 527 case CheckFloat64HoleMode::kNeverReturnHole: |
| 516 return &cache_.kCheckFloat64HoleNeverReturnHoleOperator; | 528 return &cache_.kCheckFloat64HoleNeverReturnHoleOperator; |
| 517 } | 529 } |
| 518 UNREACHABLE(); | 530 UNREACHABLE(); |
| 519 return nullptr; | 531 return nullptr; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 Operator::kNoDeopt | Operator::kNoThrow | properties, \ | 644 Operator::kNoDeopt | Operator::kNoThrow | properties, \ |
| 633 #Name, value_input_count, 1, control_input_count, \ | 645 #Name, value_input_count, 1, control_input_count, \ |
| 634 output_count, 1, 0, access); \ | 646 output_count, 1, 0, access); \ |
| 635 } | 647 } |
| 636 ACCESS_OP_LIST(ACCESS) | 648 ACCESS_OP_LIST(ACCESS) |
| 637 #undef ACCESS | 649 #undef ACCESS |
| 638 | 650 |
| 639 } // namespace compiler | 651 } // namespace compiler |
| 640 } // namespace internal | 652 } // namespace internal |
| 641 } // namespace v8 | 653 } // namespace v8 |
| OLD | NEW |