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 <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 #include <queue> | 9 #include <queue> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 break; | 611 break; |
612 case IrOpcode::kStringAdd: | 612 case IrOpcode::kStringAdd: |
613 // (String, String) -> String | 613 // (String, String) -> String |
614 CheckValueInputIs(node, 0, Type::String()); | 614 CheckValueInputIs(node, 0, Type::String()); |
615 CheckValueInputIs(node, 1, Type::String()); | 615 CheckValueInputIs(node, 1, Type::String()); |
616 CheckUpperIs(node, Type::String()); | 616 CheckUpperIs(node, Type::String()); |
617 break; | 617 break; |
618 case IrOpcode::kReferenceEqual: { | 618 case IrOpcode::kReferenceEqual: { |
619 // (Unique, Any) -> Boolean and | 619 // (Unique, Any) -> Boolean and |
620 // (Any, Unique) -> Boolean | 620 // (Any, Unique) -> Boolean |
621 if (typing == TYPED) { | |
622 CHECK(bounds(ValueInput(node, 0)).upper->Is(Type::Unique()) || | |
623 bounds(ValueInput(node, 1)).upper->Is(Type::Unique())); | |
624 } | |
625 CheckUpperIs(node, Type::Boolean()); | 621 CheckUpperIs(node, Type::Boolean()); |
626 break; | 622 break; |
627 } | 623 } |
628 case IrOpcode::kObjectIsSmi: | 624 case IrOpcode::kObjectIsSmi: |
629 CheckValueInputIs(node, 0, Type::Any()); | 625 CheckValueInputIs(node, 0, Type::Any()); |
630 CheckUpperIs(node, Type::Boolean()); | 626 CheckUpperIs(node, Type::Boolean()); |
631 break; | 627 break; |
632 case IrOpcode::kObjectIsNonNegativeSmi: | 628 case IrOpcode::kObjectIsNonNegativeSmi: |
633 CheckValueInputIs(node, 0, Type::Any()); | 629 CheckValueInputIs(node, 0, Type::Any()); |
634 CheckUpperIs(node, Type::Boolean()); | 630 CheckUpperIs(node, Type::Boolean()); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 // Check inputs for all nodes in the block. | 1072 // Check inputs for all nodes in the block. |
1077 for (size_t i = 0; i < block->NodeCount(); i++) { | 1073 for (size_t i = 0; i < block->NodeCount(); i++) { |
1078 Node* node = block->NodeAt(i); | 1074 Node* node = block->NodeAt(i); |
1079 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1075 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
1080 } | 1076 } |
1081 } | 1077 } |
1082 } | 1078 } |
1083 } | 1079 } |
1084 } | 1080 } |
1085 } // namespace v8::internal::compiler | 1081 } // namespace v8::internal::compiler |
OLD | NEW |