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

Unified Diff: src/compiler/verifier.h

Issue 1367423002: [turbofan] Move node verification methods to the Verifier class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks 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 | « src/compiler/node-properties.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/verifier.h
diff --git a/src/compiler/verifier.h b/src/compiler/verifier.h
index 8c5962fcad2171b34d9f1027a26c2152bb2d4eb1..cee323e48035bf69a65ec106bef07bec4f659dc5 100644
--- a/src/compiler/verifier.h
+++ b/src/compiler/verifier.h
@@ -12,6 +12,8 @@ namespace internal {
namespace compiler {
class Graph;
+class Edge;
+class Node;
class Schedule;
// Verifies properties of a graph, such as the well-formedness of inputs to
@@ -22,6 +24,28 @@ class Verifier {
static void Run(Graph* graph, Typing typing = TYPED);
+#ifdef DEBUG
+ // Verifies consistency of node inputs and uses:
+ // - node inputs should agree with the input count computed from
+ // the node's operator.
+ // - effect inputs should have effect outputs.
+ // - control inputs should have control outputs.
+ // - frame state inputs should be frame states.
+ // - if the node has control uses, it should produce control.
+ // - if the node has effect uses, it should produce effect.
+ // - if the node has frame state uses, it must be a frame state.
+ static void VerifyNode(Node* node);
+
+ // Verify that {replacement} has the required outputs
+ // (effect, control or frame state) to be used as an input for {edge}.
+ static void VerifyEdgeInputReplacement(const Edge& edge,
+ const Node* replacement);
+#else
+ static void VerifyNode(Node* node) {}
+ static void VerifyEdgeInputReplacement(const Edge& edge,
+ const Node* replacement) {}
+#endif // DEBUG
+
private:
class Visitor;
DISALLOW_COPY_AND_ASSIGN(Verifier);
« no previous file with comments | « src/compiler/node-properties.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698