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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 CHECK_EQ(effect_count, control->op()->ControlInputCount()); | 406 CHECK_EQ(effect_count, control->op()->ControlInputCount()); |
407 CHECK_EQ(input_count, 1 + effect_count); | 407 CHECK_EQ(input_count, 1 + effect_count); |
408 break; | 408 break; |
409 } | 409 } |
410 case IrOpcode::kEffectSet: { | 410 case IrOpcode::kEffectSet: { |
411 CHECK_EQ(0, value_count); | 411 CHECK_EQ(0, value_count); |
412 CHECK_EQ(0, control_count); | 412 CHECK_EQ(0, control_count); |
413 CHECK_LT(1, effect_count); | 413 CHECK_LT(1, effect_count); |
414 break; | 414 break; |
415 } | 415 } |
| 416 case IrOpcode::kGuard: |
| 417 // TODO(bmeurer): what are the constraints on these? |
| 418 break; |
416 case IrOpcode::kBeginRegion: | 419 case IrOpcode::kBeginRegion: |
417 // TODO(rossberg): what are the constraints on these? | 420 // TODO(rossberg): what are the constraints on these? |
418 break; | 421 break; |
419 case IrOpcode::kFinishRegion: { | 422 case IrOpcode::kFinishRegion: { |
420 // TODO(rossberg): what are the constraints on these? | 423 // TODO(rossberg): what are the constraints on these? |
421 // Type must be subsumed by input type. | 424 // Type must be subsumed by input type. |
422 if (typing == TYPED) { | 425 if (typing == TYPED) { |
423 Node* val = NodeProperties::GetValueInput(node, 0); | 426 Node* val = NodeProperties::GetValueInput(node, 0); |
424 CHECK(NodeProperties::GetType(val)->Is(NodeProperties::GetType(node))); | 427 CHECK(NodeProperties::GetType(val)->Is(NodeProperties::GetType(node))); |
425 } | 428 } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 CheckValueInputIs(node, 0, Type::String()); | 682 CheckValueInputIs(node, 0, Type::String()); |
680 CheckValueInputIs(node, 1, Type::String()); | 683 CheckValueInputIs(node, 1, Type::String()); |
681 CheckUpperIs(node, Type::Boolean()); | 684 CheckUpperIs(node, Type::Boolean()); |
682 break; | 685 break; |
683 case IrOpcode::kReferenceEqual: { | 686 case IrOpcode::kReferenceEqual: { |
684 // (Unique, Any) -> Boolean and | 687 // (Unique, Any) -> Boolean and |
685 // (Any, Unique) -> Boolean | 688 // (Any, Unique) -> Boolean |
686 CheckUpperIs(node, Type::Boolean()); | 689 CheckUpperIs(node, Type::Boolean()); |
687 break; | 690 break; |
688 } | 691 } |
| 692 case IrOpcode::kObjectIsNumber: |
689 case IrOpcode::kObjectIsSmi: | 693 case IrOpcode::kObjectIsSmi: |
690 CheckValueInputIs(node, 0, Type::Any()); | 694 CheckValueInputIs(node, 0, Type::Any()); |
691 CheckUpperIs(node, Type::Boolean()); | 695 CheckUpperIs(node, Type::Boolean()); |
692 break; | 696 break; |
693 case IrOpcode::kAllocate: | 697 case IrOpcode::kAllocate: |
694 CheckValueInputIs(node, 0, Type::PlainNumber()); | 698 CheckValueInputIs(node, 0, Type::PlainNumber()); |
695 CheckUpperIs(node, Type::TaggedPointer()); | 699 CheckUpperIs(node, Type::TaggedPointer()); |
696 break; | 700 break; |
697 | 701 |
698 case IrOpcode::kChangeTaggedToInt32: { | 702 case IrOpcode::kChangeTaggedToInt32: { |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 replacement->op()->EffectOutputCount() > 0); | 1223 replacement->op()->EffectOutputCount() > 0); |
1220 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1224 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
1221 replacement->opcode() == IrOpcode::kFrameState); | 1225 replacement->opcode() == IrOpcode::kFrameState); |
1222 } | 1226 } |
1223 | 1227 |
1224 #endif // DEBUG | 1228 #endif // DEBUG |
1225 | 1229 |
1226 } // namespace compiler | 1230 } // namespace compiler |
1227 } // namespace internal | 1231 } // namespace internal |
1228 } // namespace v8 | 1232 } // namespace v8 |
OLD | NEW |