[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}
This commit is contained in:
titzer 2015-12-01 08:32:20 -08:00 committed by Commit bot
parent d9e0a5a9ad
commit 8948e08ed7

View File

@ -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 =