@@ -1284,16 +1284,7 @@ class JSCallOrConstructNode : public JSNodeWrapperBase {
1284
1284
public:
1285
1285
explicit constexpr JSCallOrConstructNode (Node* node)
1286
1286
: JSNodeWrapperBase(node) {
1287
- DCHECK (node->opcode () == IrOpcode::kJSCall ||
1288
- node->opcode () == IrOpcode::kJSCallWithArrayLike ||
1289
- node->opcode () == IrOpcode::kJSCallWithSpread ||
1290
- node->opcode () == IrOpcode::kJSConstruct ||
1291
- node->opcode () == IrOpcode::kJSConstructWithArrayLike ||
1292
- node->opcode () == IrOpcode::kJSConstructWithSpread
1293
- #if V8_ENABLE_WEBASSEMBLY
1294
- || node->opcode () == IrOpcode::kJSWasmCall
1295
- #endif // V8_ENABLE_WEBASSEMBLY
1296
- ); // NOLINT(whitespace/parens)
1287
+ DCHECK (IsValidNode (node));
1297
1288
}
1298
1289
1299
1290
#define INPUTS (V ) \
@@ -1367,6 +1358,20 @@ class JSCallOrConstructNode : public JSNodeWrapperBase {
1367
1358
return TNode<HeapObject>::UncheckedCast (
1368
1359
NodeProperties::GetValueInput (node (), FeedbackVectorIndex ()));
1369
1360
}
1361
+
1362
+ private:
1363
+ static constexpr bool IsValidNode (Node* node) {
1364
+ return node->opcode () == IrOpcode::kJSCall ||
1365
+ node->opcode () == IrOpcode::kJSCallWithArrayLike ||
1366
+ node->opcode () == IrOpcode::kJSCallWithSpread ||
1367
+ node->opcode () == IrOpcode::kJSConstruct ||
1368
+ node->opcode () == IrOpcode::kJSConstructWithArrayLike ||
1369
+ node->opcode () == IrOpcode::kJSConstructWithSpread
1370
+ #if V8_ENABLE_WEBASSEMBLY
1371
+ || node->opcode () == IrOpcode::kJSWasmCall
1372
+ #endif // V8_ENABLE_WEBASSEMBLY
1373
+ ; // NOLINT(whitespace/semicolon)
1374
+ }
1370
1375
};
1371
1376
1372
1377
template <int kOpcode >
0 commit comments