Skip to content

Commit 794ad2e

Browse files
targosBethGriggs
authored andcommitted
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: v8/v8@71e8f8b 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 53cc6c8 commit 794ad2e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
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.8',
39+
'v8_embedder_string': '-node.9',
4040

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

deps/v8/src/codegen/interface-descriptors-inl.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ StaticCallInterfaceDescriptor<DerivedDescriptor>::GetStackParameterCount() {
176176
DerivedDescriptor::GetRegisterParameterCount();
177177
}
178178

179+
// static
180+
template <typename DerivedDescriptor>
181+
constexpr Register
182+
StaticCallInterfaceDescriptor<DerivedDescriptor>::GetRegisterParameter(int i) {
183+
return DerivedDescriptor::registers()[i];
184+
}
185+
179186
// static
180187
constexpr Register FastNewObjectDescriptor::TargetRegister() {
181188
return kJSFunctionRegister;

deps/v8/src/codegen/interface-descriptors.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,7 @@ class StaticCallInterfaceDescriptor : public CallInterfaceDescriptor {
457457
static constexpr inline int GetRegisterParameterCount();
458458
static constexpr inline int GetStackParameterCount();
459459
static constexpr inline Register* GetRegisterData();
460-
461-
static constexpr inline Register GetRegisterParameter(int i) {
462-
return DerivedDescriptor::registers()[i];
463-
}
460+
static constexpr inline Register GetRegisterParameter(int i);
464461

465462
explicit StaticCallInterfaceDescriptor(CallDescriptors::Key key)
466463
: CallInterfaceDescriptor(key) {}

0 commit comments

Comments
 (0)