Skip to content

Commit c3efc70

Browse files
targosBethGriggs
authored andcommitted
deps: V8: cherry-pick a5cea1bfc38c
Original commit message: Mark Node::opcode() and Operator::opcode() as constexpr. Without the explicit constexpr keyword, Clang seems to be able to treat these methods as constexpr, whereas MSVC will not. Bug: v8:11760 Change-Id: I9f6492f38fb50dcaf7a4f09da0bd79c0da6a50eb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912916 Reviewed-by: Clemens Backes <[email protected]> Reviewed-by: Maya Lekova <[email protected]> Commit-Queue: Lei Zhang <[email protected]> Cr-Commit-Position: refs/heads/master@{#74791} Refs: v8/v8@a5cea1b Backport-PR-URL: #39470 PR-URL: #38990 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 201da87 commit c3efc70

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

common.gypi

+1-1
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.10',
39+
'v8_embedder_string': '-node.11',
4040

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

deps/v8/src/compiler/node.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class V8_EXPORT_PRIVATE Node final {
5050

5151
const Operator* op() const { return op_; }
5252

53-
IrOpcode::Value opcode() const {
53+
constexpr IrOpcode::Value opcode() const {
5454
DCHECK_GE(IrOpcode::kLast, op_->opcode());
5555
return static_cast<IrOpcode::Value>(op_->opcode());
5656
}

deps/v8/src/compiler/operator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class V8_EXPORT_PRIVATE Operator : public NON_EXPORTED_BASE(ZoneObject) {
7373
// A small integer unique to all instances of a particular kind of operator,
7474
// useful for quick matching for specific kinds of operators. For fast access
7575
// the opcode is stored directly in the operator object.
76-
Opcode opcode() const { return opcode_; }
76+
constexpr Opcode opcode() const { return opcode_; }
7777

7878
// Returns a constant string representing the mnemonic of the operator,
7979
// without the static parameters. Useful for debugging.

0 commit comments

Comments
 (0)