diff --git a/common.gypi b/common.gypi index 4c584060e66852..b5c0a18c594af4 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.11', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/compiler/js-operator.h b/deps/v8/src/compiler/js-operator.h index 8080d4caefefc5..b136adc5735efa 100644 --- a/deps/v8/src/compiler/js-operator.h +++ b/deps/v8/src/compiler/js-operator.h @@ -1284,16 +1284,7 @@ class JSCallOrConstructNode : public JSNodeWrapperBase { public: explicit constexpr JSCallOrConstructNode(Node* node) : JSNodeWrapperBase(node) { - DCHECK(node->opcode() == IrOpcode::kJSCall || - node->opcode() == IrOpcode::kJSCallWithArrayLike || - node->opcode() == IrOpcode::kJSCallWithSpread || - node->opcode() == IrOpcode::kJSConstruct || - node->opcode() == IrOpcode::kJSConstructWithArrayLike || - node->opcode() == IrOpcode::kJSConstructWithSpread -#if V8_ENABLE_WEBASSEMBLY - || node->opcode() == IrOpcode::kJSWasmCall -#endif // V8_ENABLE_WEBASSEMBLY - ); // NOLINT(whitespace/parens) + DCHECK(IsValidNode(node)); } #define INPUTS(V) \ @@ -1367,6 +1358,20 @@ class JSCallOrConstructNode : public JSNodeWrapperBase { return TNode::UncheckedCast( NodeProperties::GetValueInput(node(), FeedbackVectorIndex())); } + + private: + static constexpr bool IsValidNode(Node* node) { + return node->opcode() == IrOpcode::kJSCall || + node->opcode() == IrOpcode::kJSCallWithArrayLike || + node->opcode() == IrOpcode::kJSCallWithSpread || + node->opcode() == IrOpcode::kJSConstruct || + node->opcode() == IrOpcode::kJSConstructWithArrayLike || + node->opcode() == IrOpcode::kJSConstructWithSpread +#if V8_ENABLE_WEBASSEMBLY + || node->opcode() == IrOpcode::kJSWasmCall +#endif // V8_ENABLE_WEBASSEMBLY + ; // NOLINT(whitespace/semicolon) + } }; template