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

Unified Diff: src/compiler/verifier.cc

Issue 879583002: [turbofan] Remove GenericAlgorithm from verifier and graph replay. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
Index: src/compiler/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index b2871ecbaf9ab6c01d4f9a6c21e802abe230c240..47edd35d553172346ee9967e24cf161a8b69988c 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -11,8 +11,7 @@
#include <string>
#include "src/bit-vector.h"
-#include "src/compiler/generic-algorithm.h"
-#include "src/compiler/graph-inl.h"
+#include "src/compiler/all-nodes.h"
#include "src/compiler/graph.h"
#include "src/compiler/node.h"
#include "src/compiler/node-properties-inl.h"
@@ -40,12 +39,11 @@ static bool IsUseDefChainLinkPresent(Node* def, Node* use) {
}
-class Verifier::Visitor : public NullNodeVisitor {
+class Verifier::Visitor {
public:
Visitor(Zone* z, Typing typed) : zone(z), typing(typed) {}
- // Fulfills the PreNodeCallback interface.
- void Pre(Node* node);
+ void Check(Node* node);
Zone* zone;
Typing typing;
@@ -113,7 +111,7 @@ class Verifier::Visitor : public NullNodeVisitor {
};
-void Verifier::Visitor::Pre(Node* node) {
+void Verifier::Visitor::Check(Node* node) {
int value_count = node->op()->ValueInputCount();
int context_count = OperatorProperties::GetContextInputCount(node->op());
int frame_state_count =
@@ -754,10 +752,11 @@ void Verifier::Visitor::Pre(Node* node) {
void Verifier::Run(Graph* graph, Typing typing) {
- Visitor visitor(graph->zone(), typing);
CHECK_NE(NULL, graph->start());
CHECK_NE(NULL, graph->end());
- graph->VisitNodeInputsFromEnd(&visitor);
+ Zone zone;
+ Visitor visitor(&zone, typing);
+ for (Node* node : AllNodes(&zone, graph).live) visitor.Check(node);
}

Powered by Google App Engine
This is Rietveld 408576698