| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // Type is an external pointer. | 394 // Type is an external pointer. |
| 395 CheckTypeIs(node, Type::ExternalPointer()); | 395 CheckTypeIs(node, Type::ExternalPointer()); |
| 396 break; | 396 break; |
| 397 case IrOpcode::kOsrValue: | 397 case IrOpcode::kOsrValue: |
| 398 // OSR values have a value and a control input. | 398 // OSR values have a value and a control input. |
| 399 CHECK_EQ(1, control_count); | 399 CHECK_EQ(1, control_count); |
| 400 CHECK_EQ(1, input_count); | 400 CHECK_EQ(1, input_count); |
| 401 // Type is merged from other values in the graph and could be any. | 401 // Type is merged from other values in the graph and could be any. |
| 402 CheckTypeIs(node, Type::Any()); | 402 CheckTypeIs(node, Type::Any()); |
| 403 break; | 403 break; |
| 404 case IrOpcode::kOsrGuard: | |
| 405 // OSR values have a value and a control input. | |
| 406 CHECK_EQ(1, value_count); | |
| 407 CHECK_EQ(1, effect_count); | |
| 408 CHECK_EQ(1, control_count); | |
| 409 switch (OsrGuardTypeOf(node->op())) { | |
| 410 case OsrGuardType::kUninitialized: | |
| 411 CheckTypeIs(node, Type::None()); | |
| 412 break; | |
| 413 case OsrGuardType::kSignedSmall: | |
| 414 CheckTypeIs(node, Type::SignedSmall()); | |
| 415 break; | |
| 416 case OsrGuardType::kAny: | |
| 417 CheckTypeIs(node, Type::Any()); | |
| 418 break; | |
| 419 } | |
| 420 break; | |
| 421 case IrOpcode::kProjection: { | 404 case IrOpcode::kProjection: { |
| 422 // Projection has an input that produces enough values. | 405 // Projection has an input that produces enough values. |
| 423 int index = static_cast<int>(ProjectionIndexOf(node->op())); | 406 int index = static_cast<int>(ProjectionIndexOf(node->op())); |
| 424 Node* input = NodeProperties::GetValueInput(node, 0); | 407 Node* input = NodeProperties::GetValueInput(node, 0); |
| 425 CHECK_GT(input->op()->ValueOutputCount(), index); | 408 CHECK_GT(input->op()->ValueOutputCount(), index); |
| 426 // Type can be anything. | 409 // Type can be anything. |
| 427 // TODO(rossberg): Introduce tuple types for this. | 410 // TODO(rossberg): Introduce tuple types for this. |
| 428 // TODO(titzer): Convince rossberg not to. | 411 // TODO(titzer): Convince rossberg not to. |
| 429 CheckTypeIs(node, Type::Any()); | 412 CheckTypeIs(node, Type::Any()); |
| 430 break; | 413 break; |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 replacement->op()->EffectOutputCount() > 0); | 1746 replacement->op()->EffectOutputCount() > 0); |
| 1764 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1747 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
| 1765 replacement->opcode() == IrOpcode::kFrameState); | 1748 replacement->opcode() == IrOpcode::kFrameState); |
| 1766 } | 1749 } |
| 1767 | 1750 |
| 1768 #endif // DEBUG | 1751 #endif // DEBUG |
| 1769 | 1752 |
| 1770 } // namespace compiler | 1753 } // namespace compiler |
| 1771 } // namespace internal | 1754 } // namespace internal |
| 1772 } // namespace v8 | 1755 } // namespace v8 |
| OLD | NEW |