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

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

Issue 2529463002: [Turbofan]: generic lowering can use a constant vector (Closed)
Patch Set: Add verifier code. Created 4 years 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/js-operator.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('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>
11 #include <string> 11 #include <string>
12 12
13 #include "src/bit-vector.h" 13 #include "src/bit-vector.h"
14 #include "src/compiler/all-nodes.h" 14 #include "src/compiler/all-nodes.h"
15 #include "src/compiler/common-operator.h" 15 #include "src/compiler/common-operator.h"
16 #include "src/compiler/graph.h" 16 #include "src/compiler/graph.h"
17 #include "src/compiler/js-operator.h"
18 #include "src/compiler/node-properties.h"
17 #include "src/compiler/node.h" 19 #include "src/compiler/node.h"
18 #include "src/compiler/node-properties.h"
19 #include "src/compiler/opcodes.h" 20 #include "src/compiler/opcodes.h"
21 #include "src/compiler/operator-properties.h"
20 #include "src/compiler/operator.h" 22 #include "src/compiler/operator.h"
21 #include "src/compiler/operator-properties.h"
22 #include "src/compiler/schedule.h" 23 #include "src/compiler/schedule.h"
23 #include "src/compiler/simplified-operator.h" 24 #include "src/compiler/simplified-operator.h"
24 #include "src/ostreams.h" 25 #include "src/ostreams.h"
25 26
26 namespace v8 { 27 namespace v8 {
27 namespace internal { 28 namespace internal {
28 namespace compiler { 29 namespace compiler {
29 30
30 31
31 class Verifier::Visitor { 32 class Verifier::Visitor {
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // Type is OtherObject. 584 // Type is OtherObject.
584 CheckTypeIs(node, Type::OtherObject()); 585 CheckTypeIs(node, Type::OtherObject());
585 break; 586 break;
586 case IrOpcode::kJSCreateLiteralArray: 587 case IrOpcode::kJSCreateLiteralArray:
587 case IrOpcode::kJSCreateLiteralObject: 588 case IrOpcode::kJSCreateLiteralObject:
588 case IrOpcode::kJSCreateLiteralRegExp: 589 case IrOpcode::kJSCreateLiteralRegExp:
589 // Type is OtherObject. 590 // Type is OtherObject.
590 CheckTypeIs(node, Type::OtherObject()); 591 CheckTypeIs(node, Type::OtherObject());
591 break; 592 break;
592 case IrOpcode::kJSLoadProperty: 593 case IrOpcode::kJSLoadProperty:
594 // Type can be anything.
595 CheckTypeIs(node, Type::Any());
596 CHECK(PropertyAccessOf(node->op()).feedback().IsValid());
597 break;
593 case IrOpcode::kJSLoadNamed: 598 case IrOpcode::kJSLoadNamed:
599 // Type can be anything.
600 CheckTypeIs(node, Type::Any());
601 CHECK(NamedAccessOf(node->op()).feedback().IsValid());
602 break;
594 case IrOpcode::kJSLoadGlobal: 603 case IrOpcode::kJSLoadGlobal:
595 // Type can be anything. 604 // Type can be anything.
596 CheckTypeIs(node, Type::Any()); 605 CheckTypeIs(node, Type::Any());
606 CHECK(LoadGlobalParametersOf(node->op()).feedback().IsValid());
597 break; 607 break;
598 case IrOpcode::kJSStoreProperty: 608 case IrOpcode::kJSStoreProperty:
609 // Type is empty.
610 CheckNotTyped(node);
611 CHECK(PropertyAccessOf(node->op()).feedback().IsValid());
612 break;
599 case IrOpcode::kJSStoreNamed: 613 case IrOpcode::kJSStoreNamed:
614 // Type is empty.
615 CheckNotTyped(node);
616 CHECK(NamedAccessOf(node->op()).feedback().IsValid());
617 break;
600 case IrOpcode::kJSStoreGlobal: 618 case IrOpcode::kJSStoreGlobal:
619 // Type is empty.
620 CheckNotTyped(node);
621 CHECK(StoreGlobalParametersOf(node->op()).feedback().IsValid());
622 break;
601 case IrOpcode::kJSStoreDataPropertyInLiteral: 623 case IrOpcode::kJSStoreDataPropertyInLiteral:
602 // Type is empty. 624 // Type is empty.
603 CheckNotTyped(node); 625 CheckNotTyped(node);
604 break; 626 break;
605 case IrOpcode::kJSDeleteProperty: 627 case IrOpcode::kJSDeleteProperty:
606 case IrOpcode::kJSHasProperty: 628 case IrOpcode::kJSHasProperty:
607 case IrOpcode::kJSInstanceOf: 629 case IrOpcode::kJSInstanceOf:
608 case IrOpcode::kJSOrdinaryHasInstance: 630 case IrOpcode::kJSOrdinaryHasInstance:
609 // Type is Boolean. 631 // Type is Boolean.
610 CheckTypeIs(node, Type::Boolean()); 632 CheckTypeIs(node, Type::Boolean());
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 replacement->op()->EffectOutputCount() > 0); 1652 replacement->op()->EffectOutputCount() > 0);
1631 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1653 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1632 replacement->opcode() == IrOpcode::kFrameState); 1654 replacement->opcode() == IrOpcode::kFrameState);
1633 } 1655 }
1634 1656
1635 #endif // DEBUG 1657 #endif // DEBUG
1636 1658
1637 } // namespace compiler 1659 } // namespace compiler
1638 } // namespace internal 1660 } // namespace internal
1639 } // namespace v8 1661 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698