Commit 8948e08e authored by titzer's avatar titzer Committed by Commit bot

[turbofan] Check that inputs to Node::New are not NULL.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1492433003

Cr-Commit-Position: refs/heads/master@{#32472}
parent d9e0a5a9
...@@ -56,6 +56,16 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count, ...@@ -56,6 +56,16 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
Node* node; Node* node;
bool is_inline; 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) { if (input_count > kMaxInlineCapacity) {
// Allocate out-of-line inputs. // Allocate out-of-line inputs.
int capacity = int capacity =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment