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

Unified Diff: src/compiler/graph.cc

Issue 1347353003: [turbofan] Checking of input counts on node creation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: NewNode -> AddNode 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/graph.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph.cc
diff --git a/src/compiler/graph.cc b/src/compiler/graph.cc
index 00074b55135e9a620619836d791250d130f1e59a..ac7c80c568a94fdf378dbfc2b2e5cc2fdd54234c 100644
--- a/src/compiler/graph.cc
+++ b/src/compiler/graph.cc
@@ -8,6 +8,7 @@
#include "src/base/bits.h"
#include "src/compiler/node.h"
+#include "src/compiler/operator-properties.h"
namespace v8 {
namespace internal {
@@ -43,7 +44,13 @@ void Graph::RemoveDecorator(GraphDecorator* decorator) {
Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs,
bool incomplete) {
- DCHECK_LE(op->ValueInputCount(), input_count);
+ DCHECK_EQ(OperatorProperties::GetTotalInputCount(op), input_count);
+ return NewNodeUnchecked(op, input_count, inputs, incomplete);
+}
+
+
+Node* Graph::NewNodeUnchecked(const Operator* op, int input_count,
+ Node** inputs, bool incomplete) {
Node* const node =
Node::New(zone(), NextNodeId(), op, input_count, inputs, incomplete);
Decorate(node);
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698