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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 CheckTypeIs(node, Type::Number()); | 890 CheckTypeIs(node, Type::Number()); |
891 break; | 891 break; |
892 case IrOpcode::kStringEqual: | 892 case IrOpcode::kStringEqual: |
893 case IrOpcode::kStringLessThan: | 893 case IrOpcode::kStringLessThan: |
894 case IrOpcode::kStringLessThanOrEqual: | 894 case IrOpcode::kStringLessThanOrEqual: |
895 // (String, String) -> Boolean | 895 // (String, String) -> Boolean |
896 CheckValueInputIs(node, 0, Type::String()); | 896 CheckValueInputIs(node, 0, Type::String()); |
897 CheckValueInputIs(node, 1, Type::String()); | 897 CheckValueInputIs(node, 1, Type::String()); |
898 CheckTypeIs(node, Type::Boolean()); | 898 CheckTypeIs(node, Type::Boolean()); |
899 break; | 899 break; |
| 900 case IrOpcode::kStringCharAt: |
| 901 // (String, Unsigned32) -> String |
| 902 CheckValueInputIs(node, 0, Type::String()); |
| 903 CheckValueInputIs(node, 1, Type::Unsigned32()); |
| 904 CheckTypeIs(node, Type::String()); |
| 905 break; |
900 case IrOpcode::kStringCharCodeAt: | 906 case IrOpcode::kStringCharCodeAt: |
901 // (String, Unsigned32) -> UnsignedSmall | 907 // (String, Unsigned32) -> UnsignedSmall |
902 CheckValueInputIs(node, 0, Type::String()); | 908 CheckValueInputIs(node, 0, Type::String()); |
903 CheckValueInputIs(node, 1, Type::Unsigned32()); | 909 CheckValueInputIs(node, 1, Type::Unsigned32()); |
904 CheckTypeIs(node, Type::UnsignedSmall()); | 910 CheckTypeIs(node, Type::UnsignedSmall()); |
905 break; | 911 break; |
906 case IrOpcode::kStringFromCharCode: | 912 case IrOpcode::kStringFromCharCode: |
907 // Number -> String | 913 // Number -> String |
908 CheckValueInputIs(node, 0, Type::Number()); | 914 CheckValueInputIs(node, 0, Type::Number()); |
909 CheckTypeIs(node, Type::String()); | 915 CheckTypeIs(node, Type::String()); |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 replacement->op()->EffectOutputCount() > 0); | 1676 replacement->op()->EffectOutputCount() > 0); |
1671 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1677 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
1672 replacement->opcode() == IrOpcode::kFrameState); | 1678 replacement->opcode() == IrOpcode::kFrameState); |
1673 } | 1679 } |
1674 | 1680 |
1675 #endif // DEBUG | 1681 #endif // DEBUG |
1676 | 1682 |
1677 } // namespace compiler | 1683 } // namespace compiler |
1678 } // namespace internal | 1684 } // namespace internal |
1679 } // namespace v8 | 1685 } // namespace v8 |
OLD | NEW |