OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/verifier.h" | 5 #include "src/compiler/verifier.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <queue> | 8 #include <queue> |
9 #include <sstream> | 9 #include <sstream> |
10 #include <string> | 10 #include <string> |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 case IrOpcode::kNumberToInt32: | 533 case IrOpcode::kNumberToInt32: |
534 // Number -> Signed32 | 534 // Number -> Signed32 |
535 CheckValueInputIs(node, 0, Type::Number()); | 535 CheckValueInputIs(node, 0, Type::Number()); |
536 CheckUpperIs(node, Type::Signed32()); | 536 CheckUpperIs(node, Type::Signed32()); |
537 break; | 537 break; |
538 case IrOpcode::kNumberToUint32: | 538 case IrOpcode::kNumberToUint32: |
539 // Number -> Unsigned32 | 539 // Number -> Unsigned32 |
540 CheckValueInputIs(node, 0, Type::Number()); | 540 CheckValueInputIs(node, 0, Type::Number()); |
541 CheckUpperIs(node, Type::Unsigned32()); | 541 CheckUpperIs(node, Type::Unsigned32()); |
542 break; | 542 break; |
| 543 case IrOpcode::kPlainPrimitiveToNumber: |
| 544 // PlainPrimitive -> Number |
| 545 CheckValueInputIs(node, 0, Type::PlainPrimitive()); |
| 546 CheckUpperIs(node, Type::Number()); |
| 547 break; |
543 case IrOpcode::kStringEqual: | 548 case IrOpcode::kStringEqual: |
544 case IrOpcode::kStringLessThan: | 549 case IrOpcode::kStringLessThan: |
545 case IrOpcode::kStringLessThanOrEqual: | 550 case IrOpcode::kStringLessThanOrEqual: |
546 // (String, String) -> Boolean | 551 // (String, String) -> Boolean |
547 CheckValueInputIs(node, 0, Type::String()); | 552 CheckValueInputIs(node, 0, Type::String()); |
548 CheckValueInputIs(node, 1, Type::String()); | 553 CheckValueInputIs(node, 1, Type::String()); |
549 CheckUpperIs(node, Type::Boolean()); | 554 CheckUpperIs(node, Type::Boolean()); |
550 break; | 555 break; |
551 case IrOpcode::kStringAdd: | 556 case IrOpcode::kStringAdd: |
552 // (String, String) -> String | 557 // (String, String) -> String |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 // Check inputs for all nodes in the block. | 1008 // Check inputs for all nodes in the block. |
1004 for (size_t i = 0; i < block->NodeCount(); i++) { | 1009 for (size_t i = 0; i < block->NodeCount(); i++) { |
1005 Node* node = block->NodeAt(i); | 1010 Node* node = block->NodeAt(i); |
1006 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1011 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
1007 } | 1012 } |
1008 } | 1013 } |
1009 } | 1014 } |
1010 } | 1015 } |
1011 } | 1016 } |
1012 } // namespace v8::internal::compiler | 1017 } // namespace v8::internal::compiler |
OLD | NEW |