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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 case IrOpcode::kJSCallRuntime: | 719 case IrOpcode::kJSCallRuntime: |
720 // Type can be anything. | 720 // Type can be anything. |
721 CheckTypeIs(node, Type::Any()); | 721 CheckTypeIs(node, Type::Any()); |
722 break; | 722 break; |
723 | 723 |
724 case IrOpcode::kJSForInPrepare: { | 724 case IrOpcode::kJSForInPrepare: { |
725 // TODO(bmeurer): What are the constraints on thse? | 725 // TODO(bmeurer): What are the constraints on thse? |
726 CheckTypeIs(node, Type::Any()); | 726 CheckTypeIs(node, Type::Any()); |
727 break; | 727 break; |
728 } | 728 } |
| 729 case IrOpcode::kJSForInLoadProperty: { |
| 730 CheckTypeIs(node, Type::NonInternal()); |
| 731 break; |
| 732 } |
| 733 case IrOpcode::kJSForInHasOwnProperty: { |
| 734 CheckTypeIs(node, Type::Boolean()); |
| 735 break; |
| 736 } |
729 case IrOpcode::kJSForInNext: { | 737 case IrOpcode::kJSForInNext: { |
730 CheckTypeIs(node, Type::Union(Type::Name(), Type::Undefined(), zone)); | 738 CheckTypeIs(node, Type::Union(Type::Name(), Type::Undefined(), zone)); |
731 break; | 739 break; |
732 } | 740 } |
733 | 741 |
734 case IrOpcode::kJSLoadMessage: | 742 case IrOpcode::kJSLoadMessage: |
735 case IrOpcode::kJSStoreMessage: | 743 case IrOpcode::kJSStoreMessage: |
736 break; | 744 break; |
737 | 745 |
738 case IrOpcode::kJSLoadModule: | 746 case IrOpcode::kJSLoadModule: |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 break; | 1209 break; |
1202 case IrOpcode::kCheckTaggedHole: | 1210 case IrOpcode::kCheckTaggedHole: |
1203 CheckValueInputIs(node, 0, Type::Any()); | 1211 CheckValueInputIs(node, 0, Type::Any()); |
1204 CheckTypeIs(node, Type::NonInternal()); | 1212 CheckTypeIs(node, Type::NonInternal()); |
1205 break; | 1213 break; |
1206 case IrOpcode::kConvertTaggedHoleToUndefined: | 1214 case IrOpcode::kConvertTaggedHoleToUndefined: |
1207 CheckValueInputIs(node, 0, Type::Any()); | 1215 CheckValueInputIs(node, 0, Type::Any()); |
1208 CheckTypeIs(node, Type::NonInternal()); | 1216 CheckTypeIs(node, Type::NonInternal()); |
1209 break; | 1217 break; |
1210 | 1218 |
| 1219 case IrOpcode::kLoadFieldByIndex: |
| 1220 // (Any, Signed32) -> NonInternal |
| 1221 CheckValueInputIs(node, 0, Type::Any()); |
| 1222 CheckValueInputIs(node, 1, Type::Signed32()); |
| 1223 CheckTypeIs(node, Type::NonInternal()); |
| 1224 break; |
1211 case IrOpcode::kLoadField: | 1225 case IrOpcode::kLoadField: |
1212 // Object -> fieldtype | 1226 // Object -> fieldtype |
1213 // TODO(rossberg): activate once machine ops are typed. | 1227 // TODO(rossberg): activate once machine ops are typed. |
1214 // CheckValueInputIs(node, 0, Type::Object()); | 1228 // CheckValueInputIs(node, 0, Type::Object()); |
1215 // CheckTypeIs(node, FieldAccessOf(node->op()).type)); | 1229 // CheckTypeIs(node, FieldAccessOf(node->op()).type)); |
1216 break; | 1230 break; |
1217 case IrOpcode::kLoadBuffer: | 1231 case IrOpcode::kLoadBuffer: |
1218 break; | 1232 break; |
1219 case IrOpcode::kLoadElement: | 1233 case IrOpcode::kLoadElement: |
1220 // Object -> elementtype | 1234 // Object -> elementtype |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1748 replacement->op()->EffectOutputCount() > 0); | 1762 replacement->op()->EffectOutputCount() > 0); |
1749 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1763 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
1750 replacement->opcode() == IrOpcode::kFrameState); | 1764 replacement->opcode() == IrOpcode::kFrameState); |
1751 } | 1765 } |
1752 | 1766 |
1753 #endif // DEBUG | 1767 #endif // DEBUG |
1754 | 1768 |
1755 } // namespace compiler | 1769 } // namespace compiler |
1756 } // namespace internal | 1770 } // namespace internal |
1757 } // namespace v8 | 1771 } // namespace v8 |
OLD | NEW |