deps: V8: backport 71e8f8bb3c26

Original commit message:

    [codegen] Move definition of GetRegisterParameter to inline header

    This fixes compilation of V8 in Node.js with Visual Studio 2019.
    Without this change, MSVC errors with C3779 (a function that returns
    'auto' cannot be used before it is defined) on the `static constexpr
    auto registers()` method.

    Bug: v8:11420
    Change-Id: Id545199e2cdc10c8560031fb5950ec1171e5d554
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964095
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#75173}

Refs: https://github.com/v8/v8/commit/71e8f8bb3c2654ba3b114f24d64a939b116f23e1

Backport-PR-URL: https://github.com/nodejs/node/pull/39470
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>
This commit is contained in:
Michaël Zasso authored and Beth Griggs committed 2021-07-29 17:14:29 +01:00
1 parent 53cc6c8000
commit 794ad2e016
3 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -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.8',
'v8_embedder_string': '-node.9',
##### V8 defaults for Node.js #####
+7
View File
@@ -176,6 +176,13 @@ StaticCallInterfaceDescriptor<DerivedDescriptor>::GetStackParameterCount() {
DerivedDescriptor::GetRegisterParameterCount();
}
// static
template <typename DerivedDescriptor>
constexpr Register
StaticCallInterfaceDescriptor<DerivedDescriptor>::GetRegisterParameter(int i) {
return DerivedDescriptor::registers()[i];
}
// static
constexpr Register FastNewObjectDescriptor::TargetRegister() {
return kJSFunctionRegister;
+1 -4
View File
@@ -457,10 +457,7 @@ class StaticCallInterfaceDescriptor : public CallInterfaceDescriptor {
static constexpr inline int GetRegisterParameterCount();
static constexpr inline int GetStackParameterCount();
static constexpr inline Register* GetRegisterData();
static constexpr inline Register GetRegisterParameter(int i) {
return DerivedDescriptor::registers()[i];
}
static constexpr inline Register GetRegisterParameter(int i);
explicit StaticCallInterfaceDescriptor(CallDescriptors::Key key)
: CallInterfaceDescriptor(key) {}