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

Unified Diff: src/compiler/node.cc

Issue 1492433003: [turbofan] Check that inputs to Node::New are not NULL. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 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/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index 89eae1d2bc9e4ad2235d5f8d6e423adaff1cd9cf..bac783d66c38de77a6bb8428c9a915564ba42ff7 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -56,6 +56,16 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
Node* node;
bool is_inline;
+#if DEBUG
+ // Verify that none of the inputs are {nullptr}.
+ for (int i = 0; i < input_count; i++) {
+ if (inputs[i] == nullptr) {
+ V8_Fatal(__FILE__, __LINE__, "Node::New() Error: #%d:%s[%d] is NULL",
+ static_cast<int>(id), op->mnemonic(), i);
+ }
+ }
+#endif
+
if (input_count > kMaxInlineCapacity) {
// Allocate out-of-line inputs.
int capacity =
« 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