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

Unified Diff: src/compiler/verifier.cc

Issue 1375923002: [turbofan] Remove obsolete helpers from graph verifier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: One more Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index 9e0a0daa98f5cc76ca70a283beecd35c78e282f3..57bcef16a0d1a0b0c8ad48a6829389e02ed1112e 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -51,11 +51,6 @@ class Verifier::Visitor {
Typing typing;
private:
- // TODO(rossberg): Get rid of these once we got rid of NodeProperties.
- Type* type_of(Node* node) { return NodeProperties::GetType(node); }
- Node* ValueInput(Node* node, int i = 0) {
- return NodeProperties::GetValueInput(node, i);
- }
void CheckNotTyped(Node* node) {
if (NodeProperties::IsTyped(node)) {
std::ostringstream str;
@@ -65,35 +60,35 @@ class Verifier::Visitor {
}
}
void CheckUpperIs(Node* node, Type* type) {
- if (typing == TYPED && !type_of(node)->Is(type)) {
+ if (typing == TYPED && !NodeProperties::GetType(node)->Is(type)) {
std::ostringstream str;
str << "TypeError: node #" << node->id() << ":" << *node->op()
<< " type ";
- type_of(node)->PrintTo(str);
+ NodeProperties::GetType(node)->PrintTo(str);
str << " is not ";
type->PrintTo(str);
FATAL(str.str().c_str());
}
}
void CheckUpperMaybe(Node* node, Type* type) {
- if (typing == TYPED && !type_of(node)->Maybe(type)) {
+ if (typing == TYPED && !NodeProperties::GetType(node)->Maybe(type)) {
std::ostringstream str;
str << "TypeError: node #" << node->id() << ":" << *node->op()
<< " type ";
- type_of(node)->PrintTo(str);
+ NodeProperties::GetType(node)->PrintTo(str);
str << " must intersect ";
type->PrintTo(str);
FATAL(str.str().c_str());
}
}
void CheckValueInputIs(Node* node, int i, Type* type) {
- Node* input = ValueInput(node, i);
- if (typing == TYPED && !type_of(input)->Is(type)) {
+ Node* input = NodeProperties::GetValueInput(node, i);
+ if (typing == TYPED && !NodeProperties::GetType(input)->Is(type)) {
std::ostringstream str;
str << "TypeError: node #" << node->id() << ":" << *node->op()
<< "(input @" << i << " = " << input->opcode() << ":"
<< input->op()->mnemonic() << ") type ";
- type_of(input)->PrintTo(str);
+ NodeProperties::GetType(input)->PrintTo(str);
str << " is not ";
type->PrintTo(str);
FATAL(str.str().c_str());
@@ -425,7 +420,8 @@ void Verifier::Visitor::Check(Node* node) {
// TODO(rossberg): what are the constraints on these?
// Type must be subsumed by input type.
if (typing == TYPED) {
- CHECK(type_of(ValueInput(node))->Is(type_of(node)));
+ Node* val = NodeProperties::GetValueInput(node, 0);
+ CHECK(NodeProperties::GetType(val)->Is(NodeProperties::GetType(node)));
}
break;
}
@@ -565,7 +561,7 @@ void Verifier::Visitor::Check(Node* node) {
// TODO(rossberg): This should really be Is(Internal), but the typer
// currently can't do backwards propagation.
CheckUpperMaybe(context, Type::Internal());
- if (typing == TYPED) CHECK(type_of(node)->IsContext());
+ if (typing == TYPED) CHECK(NodeProperties::GetType(node)->IsContext());
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698