summaryrefslogtreecommitdiff
path: root/deps/v8/src
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2021-06-20 11:04:18 +0200
committerMichaël Zasso <targos@protonmail.com>2021-07-20 15:28:02 +0200
commit0479bcf59316efeb7298915b5a293748e1623e84 (patch)
treeaf537efd6aab96bb4e27132a31d65770ebfc6aa1 /deps/v8/src
parentc516f2c3e2dc9f22a4803286190d569fd494cd99 (diff)
downloadnode-new-0479bcf59316efeb7298915b5a293748e1623e84.tar.gz
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 <clemensb@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#74791} Refs: https://github.com/v8/v8/commit/a5cea1bfc38ceafc74f4baddd6ab94ea13757ef8 PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'deps/v8/src')
-rw-r--r--deps/v8/src/compiler/node.h2
-rw-r--r--deps/v8/src/compiler/operator.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/deps/v8/src/compiler/node.h b/deps/v8/src/compiler/node.h
index 37b45c403f..57d49fe1ac 100644
--- a/deps/v8/src/compiler/node.h
+++ b/deps/v8/src/compiler/node.h
@@ -50,7 +50,7 @@ class V8_EXPORT_PRIVATE Node final {
const Operator* op() const { return op_; }
- IrOpcode::Value opcode() const {
+ constexpr IrOpcode::Value opcode() const {
DCHECK_GE(IrOpcode::kLast, op_->opcode());
return static_cast<IrOpcode::Value>(op_->opcode());
}
diff --git a/deps/v8/src/compiler/operator.h b/deps/v8/src/compiler/operator.h
index 4206e753f1..f641394eb1 100644
--- a/deps/v8/src/compiler/operator.h
+++ b/deps/v8/src/compiler/operator.h
@@ -73,7 +73,7 @@ class V8_EXPORT_PRIVATE Operator : public NON_EXPORTED_BASE(ZoneObject) {
// A small integer unique to all instances of a particular kind of operator,
// useful for quick matching for specific kinds of operators. For fast access
// the opcode is stored directly in the operator object.
- Opcode opcode() const { return opcode_; }
+ constexpr Opcode opcode() const { return opcode_; }
// Returns a constant string representing the mnemonic of the operator,
// without the static parameters. Useful for debugging.