Skip to content

Commit 65062b3

Browse files
targosBethGriggs
authored andcommitted
deps: V8: cherry-pick 7ff6609a5385
Original commit message: Move DCHECK() in JSCallOrConstructNode ctor into a helper function. As is, the DCHECK() has a #if inside, and MSVC has trouble pre-processing that. Fix this by moving the conditional inside the DCHECK() into a separate helper function. Bug: v8:11760 Change-Id: Ib4ae0fe263029bb426da378afa5b6881557ce652 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919421 Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#74807} Refs: v8/v8@7ff6609 Backport-PR-URL: #39470 PR-URL: #38990 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent c3efc70 commit 65062b3

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.11',
39+
'v8_embedder_string': '-node.12',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/compiler/js-operator.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,16 +1284,7 @@ class JSCallOrConstructNode : public JSNodeWrapperBase {
12841284
public:
12851285
explicit constexpr JSCallOrConstructNode(Node* node)
12861286
: 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));
12971288
}
12981289

12991290
#define INPUTS(V) \
@@ -1367,6 +1358,20 @@ class JSCallOrConstructNode : public JSNodeWrapperBase {
13671358
return TNode<HeapObject>::UncheckedCast(
13681359
NodeProperties::GetValueInput(node(), FeedbackVectorIndex()));
13691360
}
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+
}
13701375
};
13711376

13721377
template <int kOpcode>

0 commit comments

Comments
 (0)