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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // Type is considered internal. | 368 // Type is considered internal. |
369 CheckTypeIs(node, Type::Internal()); | 369 CheckTypeIs(node, Type::Internal()); |
370 break; | 370 break; |
371 case IrOpcode::kOsrValue: | 371 case IrOpcode::kOsrValue: |
372 // OSR values have a value and a control input. | 372 // OSR values have a value and a control input. |
373 CHECK_EQ(1, control_count); | 373 CHECK_EQ(1, control_count); |
374 CHECK_EQ(1, input_count); | 374 CHECK_EQ(1, input_count); |
375 // Type is merged from other values in the graph and could be any. | 375 // Type is merged from other values in the graph and could be any. |
376 CheckTypeIs(node, Type::Any()); | 376 CheckTypeIs(node, Type::Any()); |
377 break; | 377 break; |
| 378 case IrOpcode::kOsrGuard: |
| 379 // OSR values have a value and a control input. |
| 380 CHECK_EQ(1, value_count); |
| 381 CHECK_EQ(1, effect_count); |
| 382 CHECK_EQ(1, control_count); |
| 383 switch (OsrGuardTypeOf(node->op())) { |
| 384 case OsrGuardType::kUninitialized: |
| 385 CheckTypeIs(node, Type::None()); |
| 386 break; |
| 387 case OsrGuardType::kSignedSmall: |
| 388 CheckTypeIs(node, Type::SignedSmall()); |
| 389 break; |
| 390 case OsrGuardType::kAny: |
| 391 CheckTypeIs(node, Type::Any()); |
| 392 break; |
| 393 } |
| 394 break; |
378 case IrOpcode::kProjection: { | 395 case IrOpcode::kProjection: { |
379 // Projection has an input that produces enough values. | 396 // Projection has an input that produces enough values. |
380 int index = static_cast<int>(ProjectionIndexOf(node->op())); | 397 int index = static_cast<int>(ProjectionIndexOf(node->op())); |
381 Node* input = NodeProperties::GetValueInput(node, 0); | 398 Node* input = NodeProperties::GetValueInput(node, 0); |
382 CHECK_GT(input->op()->ValueOutputCount(), index); | 399 CHECK_GT(input->op()->ValueOutputCount(), index); |
383 // Type can be anything. | 400 // Type can be anything. |
384 // TODO(rossberg): Introduce tuple types for this. | 401 // TODO(rossberg): Introduce tuple types for this. |
385 // TODO(titzer): Convince rossberg not to. | 402 // TODO(titzer): Convince rossberg not to. |
386 CheckTypeIs(node, Type::Any()); | 403 CheckTypeIs(node, Type::Any()); |
387 break; | 404 break; |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 replacement->op()->EffectOutputCount() > 0); | 1612 replacement->op()->EffectOutputCount() > 0); |
1596 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1613 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
1597 replacement->opcode() == IrOpcode::kFrameState); | 1614 replacement->opcode() == IrOpcode::kFrameState); |
1598 } | 1615 } |
1599 | 1616 |
1600 #endif // DEBUG | 1617 #endif // DEBUG |
1601 | 1618 |
1602 } // namespace compiler | 1619 } // namespace compiler |
1603 } // namespace internal | 1620 } // namespace internal |
1604 } // namespace v8 | 1621 } // namespace v8 |
OLD | NEW |