Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: src/compiler/verifier.cc

Issue 2388303006: Reland of "[turbofan] Osr value typing + dynamic type checks on entry. (patchset #5 id:80001 of htt… (Closed)
Patch Set: Tweaks Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/typer.cc ('k') | test/cctest/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/cctest/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698