nodejs: update to 23.1.0

This commit is contained in:
Raed Rizqie 2024-10-27 01:06:53 +08:00 committed by Christoph Reiter
parent 9b5a6097c0
commit e453406fef
11 changed files with 250 additions and 120 deletions

View File

@ -847,7 +847,7 @@ index 0f02d2dc..81fdadf9 100755
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (
SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%"
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 5563cec2..02029273 100644
index 893e032f..d6eb3323 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -2,6 +2,7 @@ const { resolve, dirname, join } = require('node:path')
@ -858,7 +858,7 @@ index 5563cec2..02029273 100644
const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions')
const usage = require('./utils/npm-usage.js')
const LogFile = require('./utils/log-file.js')
@@ -433,7 +434,7 @@ class Npm {
@@ -437,7 +438,7 @@ class Npm {
}
get globalDir () {
@ -867,7 +867,7 @@ index 5563cec2..02029273 100644
? resolve(this.globalPrefix, 'lib', 'node_modules')
: resolve(this.globalPrefix, 'node_modules')
}
@@ -448,7 +449,7 @@ class Npm {
@@ -452,7 +453,7 @@ class Npm {
get globalBin () {
const b = this.globalPrefix

View File

@ -4,7 +4,7 @@
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h
index 74d4cb15..cca77487 100644
index 18466688..052ac9c6 100644
--- a/deps/v8/include/v8-fast-api-calls.h
+++ b/deps/v8/include/v8-fast-api-calls.h
@@ -328,7 +328,7 @@ class CTypeInfo {
@ -29,10 +29,10 @@ index b53fa280..bf22bc07 100644
reinterpret_cast<i::compiler::Node*>(object)->Print();
}
diff --git a/deps/v8/src/diagnostics/objects-printer.cc b/deps/v8/src/diagnostics/objects-printer.cc
index 7677022c..b4d119b4 100644
index 3fb40e6e..274b510e 100644
--- a/deps/v8/src/diagnostics/objects-printer.cc
+++ b/deps/v8/src/diagnostics/objects-printer.cc
@@ -3693,19 +3693,19 @@ inline i::Tagged<i::Object> GetObjectFromRaw(void* object) {
@@ -4007,19 +4007,19 @@ inline i::Tagged<i::Object> GetObjectFromRaw(void* object) {
// The following functions are used by our gdb macros.
//
V8_DONT_STRIP_SYMBOL
@ -55,7 +55,7 @@ index 7677022c..b4d119b4 100644
void* object) {
std::stringstream strm;
i::Print(GetObjectFromRaw(object), strm);
@@ -3713,7 +3713,7 @@ V8_EXPORT_PRIVATE extern std::string _v8_internal_Print_Object_To_String(
@@ -4027,7 +4027,7 @@ V8_EXPORT_PRIVATE extern std::string _v8_internal_Print_Object_To_String(
}
V8_DONT_STRIP_SYMBOL
@ -64,7 +64,7 @@ index 7677022c..b4d119b4 100644
#ifdef OBJECT_PRINT
i::StdoutStream os;
i::LoadHandler::PrintHandler(GetObjectFromRaw(object), os);
@@ -3722,7 +3722,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_LoadHandler(void* object) {
@@ -4036,7 +4036,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_LoadHandler(void* object) {
}
V8_DONT_STRIP_SYMBOL
@ -73,7 +73,7 @@ index 7677022c..b4d119b4 100644
#ifdef OBJECT_PRINT
i::StdoutStream os;
i::StoreHandler::PrintHandler(GetObjectFromRaw(object), os);
@@ -3731,7 +3731,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_StoreHandler(void* object) {
@@ -4045,7 +4045,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_StoreHandler(void* object) {
}
V8_DONT_STRIP_SYMBOL
@ -82,7 +82,7 @@ index 7677022c..b4d119b4 100644
i::Address address = reinterpret_cast<i::Address>(object);
i::Isolate* isolate = i::Isolate::Current();
@@ -3767,7 +3767,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_Code(void* object) {
@@ -4081,7 +4081,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_Code(void* object) {
}
V8_DONT_STRIP_SYMBOL
@ -91,7 +91,7 @@ index 7677022c..b4d119b4 100644
size_t range_limit) {
i::Address address = reinterpret_cast<i::Address>(object);
i::Isolate* isolate = i::Isolate::Current();
@@ -3798,7 +3798,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_OnlyCode(void* object,
@@ -4112,7 +4112,7 @@ V8_EXPORT_PRIVATE extern void _v8_internal_Print_OnlyCode(void* object,
}
V8_DONT_STRIP_SYMBOL
@ -100,12 +100,12 @@ index 7677022c..b4d119b4 100644
i::Isolate* isolate = i::Isolate::Current();
isolate->PrintStack(stdout);
}
@@ -3850,7 +3850,7 @@ _v8_internal_Expand_StackTrace(i::Isolate* isolate) {
@@ -4165,7 +4165,7 @@ _v8_internal_Expand_StackTrace(i::Isolate* isolate) {
}
V8_DONT_STRIP_SYMBOL
-V8_EXPORT_PRIVATE extern void _v8_internal_Print_TransitionTree(void* object) {
+extern void _v8_internal_Print_TransitionTree(void* object) {
-V8_EXPORT_PRIVATE extern void _v8_internal_Print_TransitionTree(
+extern void _v8_internal_Print_TransitionTree(
void* object, bool start_at_root = false) {
i::Tagged<i::Object> o(GetObjectFromRaw(object));
if (!IsMap(o)) {
printf("Please provide a valid Map\n");

View File

@ -11,17 +11,17 @@ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/deps/v8/src/base/platform/time.cc b/deps/v8/src/base/platform/time.cc
index b6da0a69..48e5e84c 100644
index e04e5e44..3561c249 100644
--- a/deps/v8/src/base/platform/time.cc
+++ b/deps/v8/src/base/platform/time.cc
@@ -816,13 +816,13 @@ ThreadTicks ThreadTicks::Now() {
@@ -804,13 +804,13 @@ ThreadTicks ThreadTicks::Now() {
return ThreadTicks(ComputeThreadTicks());
#elif V8_OS_FUCHSIA
return ThreadTicks(GetFuchsiaThreadTicks());
+#elif V8_OS_WIN
+ return ThreadTicks::GetForThread(::GetCurrentThread());
#elif (defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
defined(V8_OS_ANDROID)
defined(V8_OS_ANDROID) || defined(V8_OS_ZOS)
return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID));
#elif V8_OS_SOLARIS
return ThreadTicks(gethrvtime() / Time::kNanosecondsPerMicrosecond);

View File

@ -7,9 +7,9 @@ Subject: [PATCH 21/23] Use wide-character Win32 API functions to handle
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
deps/v8/src/base/debug/stack_trace_win.cc | 2 +-
deps/v8/src/base/platform/platform-win32.cc | 8 ++++----
deps/v8/src/base/platform/platform-win32.cc | 10 +++++-----
deps/v8/src/diagnostics/unwinding-info-win64.cc | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/deps/v8/src/base/debug/stack_trace_win.cc b/deps/v8/src/base/debug/stack_trace_win.cc
index f981bec6..16655d51 100644
@ -25,10 +25,19 @@ index f981bec6..16655d51 100644
// To get the path without the filename, we just need to remove the final
// slash and everything after it.
diff --git a/deps/v8/src/base/platform/platform-win32.cc b/deps/v8/src/base/platform/platform-win32.cc
index 152fbbf3..2b7dea59 100644
index fa03a80e..800816ee 100644
--- a/deps/v8/src/base/platform/platform-win32.cc
+++ b/deps/v8/src/base/platform/platform-win32.cc
@@ -760,13 +760,13 @@ void OS::EnsureWin32MemoryAPILoaded() {
@@ -759,7 +759,7 @@ bool UserShadowStackEnabled() {
"IsUserCetAvailableInEnvironment"));
auto get_process_mitigation_policy =
reinterpret_cast<decltype(&GetProcessMitigationPolicy)>(::GetProcAddress(
- ::GetModuleHandle(L"Kernel32.dll"), "GetProcessMitigationPolicy"));
+ ::GetModuleHandleW(L"kernel32.dll"), "GetProcessMitigationPolicy"));
if (!is_user_cet_available_in_environment || !get_process_mitigation_policy) {
return false;
@@ -802,13 +802,13 @@ void OS::EnsureWin32MemoryAPILoaded() {
static bool loaded = false;
if (!loaded) {
VirtualAlloc2 = (VirtualAlloc2_t)GetProcAddress(
@ -45,12 +54,12 @@ index 152fbbf3..2b7dea59 100644
loaded = true;
}
@@ -1043,7 +1043,7 @@ bool OS::DiscardSystemPages(void* address, size_t size) {
@@ -1091,7 +1091,7 @@ bool OS::DiscardSystemPages(void* address, size_t size) {
reinterpret_cast<DiscardVirtualMemoryFunction>(-1))
discard_virtual_memory =
reinterpret_cast<DiscardVirtualMemoryFunction>(GetProcAddress(
- GetModuleHandle(L"Kernel32.dll"), "DiscardVirtualMemory"));
+ GetModuleHandleW(L"Kernel32.dll"), "DiscardVirtualMemory"));
+ GetModuleHandleW(L"kernel32.dll"), "DiscardVirtualMemory"));
// Use DiscardVirtualMemory when available because it releases faster than
// MEM_RESET.
DiscardVirtualMemoryFunction discard_function = discard_virtual_memory.load();

View File

@ -4,10 +4,10 @@
3 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/configure.py b/configure.py
index c68e4b48..1004016f 100755
index a5f47af1..828930f9 100755
--- a/configure.py
+++ b/configure.py
@@ -1528,6 +1528,8 @@ def configure_node(o):
@@ -1564,6 +1564,8 @@ def configure_node(o):
shlib_suffix = '%s.a'
elif sys.platform.startswith('zos'):
shlib_suffix = '%s.x'
@ -16,7 +16,7 @@ index c68e4b48..1004016f 100755
else:
shlib_suffix = 'so.%s'
if '%s' in shlib_suffix:
@@ -1577,7 +1579,7 @@ def configure_library(lib, output, pkgname=None):
@@ -1613,7 +1615,7 @@ def configure_library(lib, output, pkgname=None):
# libpath needs to be provided ahead libraries
if options.__dict__[shared_lib + '_libpath']:
@ -25,7 +25,7 @@ index c68e4b48..1004016f 100755
if 'msvs_settings' not in output:
output['msvs_settings'] = { 'VCLinkerTool': { 'AdditionalOptions': [] } }
output['msvs_settings']['VCLinkerTool']['AdditionalOptions'] += [
@@ -2255,7 +2257,7 @@ gyp_args += ['-Dpython=' + python]
@@ -2303,7 +2305,7 @@ gyp_args += ['-Dpython=' + python]
if options.use_ninja:
gyp_args += ['-f', 'ninja-' + flavor]
@ -35,7 +35,7 @@ index c68e4b48..1004016f 100755
else:
gyp_args += ['-f', 'make-' + flavor]
diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
index 392d9009..708e5f38 100644
index 32a21224..60b5fef0 100644
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -100,6 +100,8 @@ def CalculateVariables(default_variables, params):
@ -73,7 +73,7 @@ index 392d9009..708e5f38 100644
+
LINK_COMMANDS_MAC = """\
quiet_cmd_alink = LIBTOOL-STATIC $@
cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
cmd_alink = rm -f $@ && %(python)s gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %%.o,$^)
@@ -380,6 +402,8 @@ CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
LINK.target ?= %(LINK.target)s
LDFLAGS.target ?= $(LDFLAGS)
@ -136,10 +136,10 @@ index 392d9009..708e5f38 100644
copy_archive_arguments = "-pPRf"
header_params.update(
diff --git a/tools/install.py b/tools/install.py
index bf54249b..8df0dd5d 100755
index 7232be86..6ca7ae64 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -152,7 +152,10 @@ def files(options, action):
@@ -158,7 +158,10 @@ def files(options, action):
if 'true' == options.variables.get('node_shared'):
if options.is_win:
action(options, [os.path.join(options.build_dir, 'libnode.dll')], 'bin/libnode.dll')

View File

@ -1,8 +1,8 @@
diff --git a/common.gypi b/common.gypi
index fc45ca43..c79f163e 100644
index 23196aae..33ddc56f 100644
--- a/common.gypi
+++ b/common.gypi
@@ -152,7 +152,7 @@
@@ -153,7 +153,7 @@
'cflags': [ '-fPIC' ],
'ldflags': [ '-fPIC' ]
}],
@ -11,7 +11,7 @@ index fc45ca43..c79f163e 100644
'msbuild_toolset': 'ClangCL',
}],
],
@@ -243,7 +243,7 @@
@@ -244,7 +244,7 @@
'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ],
'ldflags': [ '-fPIC' ]
}],
@ -20,7 +20,7 @@ index fc45ca43..c79f163e 100644
'msbuild_toolset': 'ClangCL',
}],
],
@@ -482,6 +482,9 @@
@@ -483,6 +483,9 @@
'NOMINMAX',
],
}],
@ -46,6 +46,22 @@ index c7b8800a..b6703471 100644
'include_dirs': [ '.', 'include' ],
'direct_dependent_settings': {
'include_dirs': [ 'include' ],
diff --git a/deps/ncrypto/ncrypto.gyp b/deps/ncrypto/ncrypto.gyp
index 90ac158d..6c370d16 100644
--- a/deps/ncrypto/ncrypto.gyp
+++ b/deps/ncrypto/ncrypto.gyp
@@ -17,6 +17,11 @@
},
'sources': [ '<@(ncrypto_sources)' ],
'conditions': [
+ ['OS!="msvc"', {
+ 'cflags': [
+ '-Wno-deprecated-declarations',
+ ],
+ }],
['node_shared_openssl=="false"', {
'dependencies': [
'../openssl/openssl.gyp:openssl'
diff --git a/deps/ngtcp2/ngtcp2.gyp b/deps/ngtcp2/ngtcp2.gyp
index 0f2929b7..07dca184 100644
--- a/deps/ngtcp2/ngtcp2.gyp
@ -74,22 +90,50 @@ index ca8cd2fa..3a51b363 100644
},
]
}
diff --git a/deps/uv/include/uv/win.h b/deps/uv/include/uv/win.h
index 12ac53b4..a8f4e697 100644
--- a/deps/uv/include/uv/win.h
+++ b/deps/uv/include/uv/win.h
@@ -287,7 +287,7 @@ typedef struct {
DWORD tls_index;
} uv_key_t;
-#define UV_ONCE_INIT { 0, NULL }
+#define UV_ONCE_INIT { 0, INIT_ONCE_STATIC_INIT }
typedef struct uv_once_s {
unsigned char unused;
diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c
index e0dba1aa..98ea9d6d 100644
--- a/deps/uv/src/win/util.c
+++ b/deps/uv/src/win/util.c
@@ -509,7 +509,7 @@ unsigned int uv_available_parallelism(void) {
DWORD_PTR procmask;
DWORD_PTR sysmask;
int count;
- int i;
+ unsigned int i;
/* TODO(bnoordhuis) Use GetLogicalProcessorInformationEx() to support systems
* with > 64 CPUs? See https://github.com/libuv/libuv/pull/3458
diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp
index 6c86c3fa..4e439dbb 100644
index fea86b4a..8608af01 100644
--- a/deps/uv/uv.gyp
+++ b/deps/uv/uv.gyp
@@ -193,6 +193,17 @@
@@ -194,6 +194,19 @@
},
'conditions': [
[ 'OS=="win"', {
+ 'conditions': [
+ ['OS!="msvc"', {
+ 'type': 'static_library',
+ }],
+ ['OS!="msvc" and clang==0', {
+ 'cflags_c': [
+ 'conditions': [
+ ['clang==0', {
+ 'cflags': [
+ '-Wno-cast-function-type',
+ '-Wno-maybe-uninitialized'
+ '-Wno-maybe-uninitialized',
+ ],
+ }],
+ ],
+ }],
+ ],
@ -97,10 +141,10 @@ index 6c86c3fa..4e439dbb 100644
'_WIN32_WINNT=0x0602',
'_GNU_SOURCE',
diff --git a/node.gyp b/node.gyp
index 2a8e6a66..b1b17fad 100644
index 5b5b2b7c..14ed62d1 100644
--- a/node.gyp
+++ b/node.gyp
@@ -465,14 +465,14 @@
@@ -473,14 +473,14 @@
# Putting these explicitly here so not to depend on `common.gypi`.
# `common.gypi` need to be more general because it is used to build userland native addons.
# Refs: https://github.com/nodejs/node-gyp/issues/1118
@ -117,7 +161,7 @@ index 2a8e6a66..b1b17fad 100644
'-Werror=extra-semi',
],
},
@@ -582,6 +582,9 @@
@@ -584,6 +584,9 @@
'WARNING_CFLAGS': [ '-Werror' ],
},
}],
@ -127,7 +171,7 @@ index 2a8e6a66..b1b17fad 100644
[ 'node_intermediate_lib_type=="static_library" and '
'node_shared=="true" and OS in "aix os400"', {
# For AIX, shared lib is linked by static lib and .exp. In the
@@ -592,7 +595,7 @@
@@ -594,7 +597,7 @@
}, {
'dependencies': [ '<(node_lib_target_name)' ],
'conditions': [
@ -136,7 +180,7 @@ index 2a8e6a66..b1b17fad 100644
'dependencies': ['generate_node_def'],
'msvs_settings': {
'VCLinkerTool': {
@@ -626,7 +629,7 @@
@@ -628,7 +631,7 @@
'-Wl,--no-whole-archive',
],
}],
@ -145,7 +189,7 @@ index 2a8e6a66..b1b17fad 100644
'sources': [ 'src/res/node.rc' ],
}],
],
@@ -1442,7 +1445,7 @@
@@ -1462,7 +1465,7 @@
},
]
}], # end aix section
@ -155,7 +199,7 @@ index 2a8e6a66..b1b17fad 100644
{
'target_name': 'gen_node_def',
diff --git a/node.gypi b/node.gypi
index ccce1243..64a61ad6 100644
index 9c989022..d20a6d38 100644
--- a/node.gypi
+++ b/node.gypi
@@ -27,7 +27,10 @@
@ -170,12 +214,3 @@ index ccce1243..64a61ad6 100644
}],
[ '"<(_type)"=="executable"', {
'msvs_settings': {
@@ -66,7 +69,7 @@
'_UNICODE=1',
],
'conditions': [
- ['clang==0', {
+ ['OS=="msvc" and clang==0', {
'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h',
'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc',
'sources': [

View File

@ -1,5 +1,22 @@
diff --git a/deps/v8/src/base/platform/platform-win32.cc b/deps/v8/src/base/platform/platform-win32.cc
index fa03a80e..38fa8f10 100644
--- a/deps/v8/src/base/platform/platform-win32.cc
+++ b/deps/v8/src/base/platform/platform-win32.cc
@@ -69,6 +69,12 @@ static_assert(offsetof(V8_CRITICAL_SECTION, SpinCount) ==
// the Microsoft Visual Studio C++ CRT.
#ifdef __MINGW32__
+// FIXME: Missing from <sysinfoapi.h>
+BOOL IsUserCetAvailableInEnvironment(
+ DWORD UserCetEnvironment
+);
+
+#define USER_CET_ENVIRONMENT_WIN32_PROCESS 0x00000000U
#ifndef __MINGW64_VERSION_MAJOR
diff --git a/deps/v8/third_party/abseil-cpp/absl/base/internal/thread_identity.h b/deps/v8/third_party/abseil-cpp/absl/base/internal/thread_identity.h
index b6e917ce..8b298c61 100644
index acfc15a8..a3f3df78 100644
--- a/deps/v8/third_party/abseil-cpp/absl/base/internal/thread_identity.h
+++ b/deps/v8/third_party/abseil-cpp/absl/base/internal/thread_identity.h
@@ -20,7 +20,7 @@
@ -11,8 +28,20 @@ index b6e917ce..8b298c61 100644
#include <pthread.h>
// Defines __GOOGLE_GRTE_VERSION__ (via glibc-specific features.h) when
// supported.
diff --git a/deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc b/deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc
index 89791745..eb1fe66f 100644
--- a/deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc
+++ b/deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc
@@ -47,6 +47,7 @@
#include <wchar.h>
#include <windows.globalization.h>
#include <windows.h>
+#include <winstring.h> // for WindowsCreateStringReference
#endif
#endif
diff --git a/deps/v8/third_party/zlib/cpu_features.c b/deps/v8/third_party/zlib/cpu_features.c
index 64e0428c..8f69b299 100644
index 34ae7b91..746654e6 100644
--- a/deps/v8/third_party/zlib/cpu_features.c
+++ b/deps/v8/third_party/zlib/cpu_features.c
@@ -9,7 +9,7 @@
@ -24,7 +53,7 @@ index 64e0428c..8f69b299 100644
#include <intrin.h>
#elif defined(ADLER32_SIMD_SSSE3)
#include <cpuid.h>
@@ -52,7 +52,7 @@ int ZLIB_INTERNAL x86_cpu_enable_avx512 = 0;
@@ -56,7 +56,7 @@ int ZLIB_INTERNAL riscv_cpu_enable_vclmul = 0;
#include <windows.h>
#elif defined(ARMV8_OS_IOS)
#include <sys/sysctl.h>
@ -33,7 +62,7 @@ index 64e0428c..8f69b299 100644
#include <pthread.h>
#else
#error cpu_features.c CPU feature detection in not defined for your platform
@@ -161,7 +161,7 @@ static void _cpu_check_features(void)
@@ -168,7 +168,7 @@ static void _cpu_check_features(void)
int x86_cpu_has_pclmulqdq;
int abcd[4];

View File

@ -1,8 +1,8 @@
diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn
index e2e0c16d..975dcd47 100644
index 19e0d2b5..41eee81b 100644
--- a/deps/v8/BUILD.gn
+++ b/deps/v8/BUILD.gn
@@ -22,7 +22,7 @@ target_is_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) ||
@@ -23,7 +23,7 @@ target_is_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) ||
(current_cpu != v8_current_cpu && v8_multi_arch_build)
# For faster Windows builds. See https://crbug.com/v8/8475.
@ -11,16 +11,19 @@ index e2e0c16d..975dcd47 100644
declare_args() {
# Print to stdout on Android.
@@ -6744,7 +6744,7 @@ v8_source_set("v8_heap_base") {
@@ -6938,9 +6938,9 @@ v8_source_set("v8_heap_base") {
"src/heap/base/worklist.cc",
]
- if (is_clang || !is_win) {
+ if (is_clang || !is_msvc) {
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ]
} else if (current_cpu == "x86") {
@@ -6764,7 +6764,7 @@ v8_source_set("v8_heap_base") {
- if (is_win) {
+ if (is_msvc) {
# Prefer a masm version with unwind directives.
sources += [ "src/heap/base/asm/x64/push_registers_masm.asm" ]
} else {
@@ -6965,7 +6965,7 @@ v8_source_set("v8_heap_base") {
} else if (current_cpu == "riscv64" || current_cpu == "riscv32") {
sources += [ "src/heap/base/asm/riscv/push_registers_asm.cc" ]
}
@ -29,25 +32,77 @@ index e2e0c16d..975dcd47 100644
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_masm.asm" ]
} else if (current_cpu == "x86") {
diff --git a/deps/v8/src/heap/base/asm/x64/push_registers_asm.cc b/deps/v8/src/heap/base/asm/x64/push_registers_asm.cc
index 554caddf..8bf9c4eb 100644
--- a/deps/v8/src/heap/base/asm/x64/push_registers_asm.cc
+++ b/deps/v8/src/heap/base/asm/x64/push_registers_asm.cc
@@ -21,8 +21,48 @@
// Source: https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf
#ifdef _WIN64
-#error "The masm based version must be used for Windows"
-#endif
+
+asm(".globl PushAllRegistersAndIterateStack \n"
+ "PushAllRegistersAndIterateStack: \n"
+ // rbp is callee-saved. Maintain proper frame pointer for debugging.
+ " push %rbp \n"
+ " mov %rsp, %rbp \n"
+ // Dummy for alignment.
+ " push $0xCDCDCD \n"
+ " push %rsi \n"
+ " push %rdi \n"
+ " push %rbx \n"
+ " push %r12 \n"
+ " push %r13 \n"
+ " push %r14 \n"
+ " push %r15 \n"
+ " sub $160, %rsp \n"
+ // Use aligned instrs as we are certain that the stack is properly aligned.
+ " movdqa %xmm6, 144(%rsp) \n"
+ " movdqa %xmm7, 128(%rsp) \n"
+ " movdqa %xmm8, 112(%rsp) \n"
+ " movdqa %xmm9, 96(%rsp) \n"
+ " movdqa %xmm10, 80(%rsp) \n"
+ " movdqa %xmm11, 64(%rsp) \n"
+ " movdqa %xmm12, 48(%rsp) \n"
+ " movdqa %xmm13, 32(%rsp) \n"
+ " movdqa %xmm14, 16(%rsp) \n"
+ " movdqa %xmm15, (%rsp) \n"
+ // Pass 1st parameter (rcx) unchanged (Stack*).
+ // Pass 2nd parameter (rdx) unchanged (StackVisitor*).
+ // Save 3rd parameter (r8; IterateStackCallback)
+ " mov %r8, %r9 \n"
+ // Pass 3rd parameter as rsp (stack pointer).
+ " mov %rsp, %r8 \n"
+ // Call the callback.
+ " call *%r9 \n"
+ // Pop the callee-saved registers.
+ " add $224, %rsp \n"
+ // Restore rbp as it was used as frame pointer.
+ " pop %rbp \n"
+ " ret \n");
+
+#else // !_WIN64
asm(
#ifdef __APPLE__
@@ -64,3 +104,5 @@ asm(
".Lfunc_end0-PushAllRegistersAndIterateStack \n"
#endif // !defined(__APPLE__)
);
+
+#endif // !_WIN64
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
index c680132f..b945fdca 100644
index 226a3f6d..28348121 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -1899,7 +1899,7 @@
@@ -1895,7 +1895,7 @@
}],
# Chnges in push_registers_asm.cc in V8 v12.8 requires using
# Changes in push_registers_asm.cc in V8 v12.8 requires using
# push_registers_masm on Windows even with ClangCL on x64
- ['OS=="win"', {
+ ['OS=="msvc"', {
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
'sources': [
@@ -1970,7 +1970,7 @@
}],
]
}],
- ['OS=="win" and clang==0', {
+ ['OS=="msvc" and clang==0', {
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
'sources': [

View File

@ -1,8 +1,8 @@
diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn
index e2e0c16d..60342a8b 100644
index 19e0d2b5..6ba7ff0f 100644
--- a/deps/v8/BUILD.gn
+++ b/deps/v8/BUILD.gn
@@ -1412,18 +1412,22 @@ config("toolchain") {
@@ -1487,18 +1487,22 @@ config("toolchain") {
if (v8_current_cpu == "x86") {
defines += [ "V8_TARGET_ARCH_IA32" ]
@ -27,7 +27,7 @@ index e2e0c16d..60342a8b 100644
}
}
if (is_android && v8_android_log_stdout) {
@@ -1478,7 +1482,7 @@ config("toolchain") {
@@ -1526,7 +1530,7 @@ config("toolchain") {
}
if (v8_no_inline) {
@ -36,7 +36,7 @@ index e2e0c16d..60342a8b 100644
cflags += [ "/Ob0" ]
} else {
cflags += [
@@ -1505,7 +1509,7 @@ config("toolchain") {
@@ -1553,7 +1557,7 @@ config("toolchain") {
}
}
@ -45,7 +45,7 @@ index e2e0c16d..60342a8b 100644
cflags += [
# On clang and gcc, disable warnings about offsetof being used on
# non-standard-layout types. offsetof is only specified for
@@ -1516,7 +1520,15 @@ config("toolchain") {
@@ -1564,7 +1568,15 @@ config("toolchain") {
]
}
@ -62,7 +62,7 @@ index e2e0c16d..60342a8b 100644
cflags += [
"/wd4245", # Conversion with signed/unsigned mismatch.
"/wd4267", # Conversion with possible loss of data.
@@ -1538,7 +1550,7 @@ config("toolchain") {
@@ -1586,7 +1598,7 @@ config("toolchain") {
]
}
@ -71,7 +71,7 @@ index e2e0c16d..60342a8b 100644
cflags += [
"/wd4506", # Benign "no definition for inline function"
@@ -1679,7 +1691,7 @@ config("toolchain") {
@@ -1727,7 +1739,7 @@ config("toolchain") {
]
}
@ -80,7 +80,7 @@ index e2e0c16d..60342a8b 100644
cflags += [
# Disable gcc warnings for optimizations based on the assumption that
# signed overflow does not occur. Generates false positives (see
@@ -1720,6 +1732,11 @@ config("toolchain") {
@@ -1768,6 +1780,11 @@ config("toolchain") {
# Disable dangling pointer warnings, which are often false positives when
# using scopes.
"-Wno-dangling-pointer",
@ -93,7 +93,7 @@ index e2e0c16d..60342a8b 100644
}
diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi
index 6e21dac6..9bc57d01 100644
index 18479d7d..8afbdb69 100644
--- a/tools/v8_gypfiles/features.gypi
+++ b/tools/v8_gypfiles/features.gypi
@@ -41,6 +41,11 @@
@ -109,7 +109,7 @@ index 6e21dac6..9bc57d01 100644
'is_fuchsia': 1,
}, {
diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi
index 5bf396e0..74d2af9c 100644
index e75ccf52..4089bc56 100644
--- a/tools/v8_gypfiles/toolchain.gypi
+++ b/tools/v8_gypfiles/toolchain.gypi
@@ -131,7 +131,7 @@
@ -149,19 +149,19 @@ index 5bf396e0..74d2af9c 100644
'defines': [
'V8_TARGET_ARCH_ARM',
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
index c680132f..d8588ca7 100644
index 226a3f6d..eccebfe3 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -48,7 +48,7 @@
'type': 'none',
'toolsets': ['host', 'target'],
'conditions': [
- ['OS=="win" and clang==0', {
+ ['OS=="msvc" and clang==0', {
- ['OS=="win"', {
+ ['OS=="msvc"', {
'direct_dependent_settings': {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
@@ -484,7 +484,7 @@
@@ -487,7 +487,7 @@
'v8_libplatform',
]
}],

View File

@ -1,8 +1,8 @@
diff --git a/deps/v8/third_party/abseil-cpp/BUILD.gn b/deps/v8/third_party/abseil-cpp/BUILD.gn
index 7dc29908..0ec6b719 100644
index 70459636..ae9a27dc 100644
--- a/deps/v8/third_party/abseil-cpp/BUILD.gn
+++ b/deps/v8/third_party/abseil-cpp/BUILD.gn
@@ -220,7 +220,7 @@ config("absl_public_cflags_cc") {
@@ -235,7 +235,7 @@ config("absl_public_cflags_cc") {
config("absl_test_cflags_cc") {
cflags_cc = []
@ -11,7 +11,7 @@ index 7dc29908..0ec6b719 100644
cflags_cc += [
"-Wno-conversion-null",
"-Wno-missing-declarations",
@@ -229,7 +229,7 @@ config("absl_test_cflags_cc") {
@@ -244,7 +244,7 @@ config("absl_test_cflags_cc") {
"-Wno-unused-private-field",
]
}
@ -20,7 +20,7 @@ index 7dc29908..0ec6b719 100644
cflags_cc += [
"/wd4101", # unreferenced local variable
]
@@ -238,7 +238,7 @@ config("absl_test_cflags_cc") {
@@ -253,7 +253,7 @@ config("absl_test_cflags_cc") {
config("absl_test_config") {
cflags_cc = []
@ -30,7 +30,7 @@ index 7dc29908..0ec6b719 100644
}
if (is_clang) {
diff --git a/deps/v8/third_party/abseil-cpp/absl/debugging/BUILD.gn b/deps/v8/third_party/abseil-cpp/absl/debugging/BUILD.gn
index 0f7a1f3e..0158e52c 100644
index 1d7f1444..43d50fa3 100644
--- a/deps/v8/third_party/abseil-cpp/absl/debugging/BUILD.gn
+++ b/deps/v8/third_party/abseil-cpp/absl/debugging/BUILD.gn
@@ -66,6 +66,10 @@ absl_source_set("symbolize") {
@ -45,7 +45,7 @@ index 0f7a1f3e..0158e52c 100644
absl_source_set("examine_stack") {
diff --git a/deps/v8/third_party/abseil-cpp/absl/random/internal/BUILD.gn b/deps/v8/third_party/abseil-cpp/absl/random/internal/BUILD.gn
index 54754f77..0e74fb56 100644
index 21d28b97..fc290a3b 100644
--- a/deps/v8/third_party/abseil-cpp/absl/random/internal/BUILD.gn
+++ b/deps/v8/third_party/abseil-cpp/absl/random/internal/BUILD.gn
@@ -39,7 +39,7 @@ absl_source_set("seed_material") {
@ -71,7 +71,7 @@ index 1cf84b3d..be157107 100644
}
}
diff --git a/deps/v8/third_party/jsoncpp/BUILD.gn b/deps/v8/third_party/jsoncpp/BUILD.gn
index 6324be01..f352cf43 100644
index 6324be01..e346b612 100644
--- a/deps/v8/third_party/jsoncpp/BUILD.gn
+++ b/deps/v8/third_party/jsoncpp/BUILD.gn
@@ -12,7 +12,7 @@ config("jsoncpp_config") {
@ -93,7 +93,7 @@ index 6324be01..f352cf43 100644
}
}
diff --git a/deps/v8/third_party/zlib/BUILD.gn b/deps/v8/third_party/zlib/BUILD.gn
index 7fff5762..93408778 100644
index 378bd0df..c6b4de97 100644
--- a/deps/v8/third_party/zlib/BUILD.gn
+++ b/deps/v8/third_party/zlib/BUILD.gn
@@ -39,7 +39,7 @@ config("zlib_internal_config") {
@ -114,7 +114,7 @@ index 7fff5762..93408778 100644
cflags = [ "-mssse3" ]
}
}
@@ -228,7 +228,7 @@ source_set("zlib_crc32_simd") {
@@ -234,7 +234,7 @@ source_set("zlib_crc32_simd") {
"crc_folding.c",
]
@ -123,7 +123,7 @@ index 7fff5762..93408778 100644
cflags = [
"-msse4.2",
"-mpclmul",
@@ -272,7 +272,7 @@ source_set("zlib_slide_hash_simd") {
@@ -278,7 +278,7 @@ source_set("zlib_slide_hash_simd") {
}
config("zlib_warnings") {

View File

@ -8,7 +8,7 @@
_realname=nodejs
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=22.9.0
pkgver=23.1.0
pkgrel=1
pkgdesc="An open-source, cross-platform JavaScript runtime environment (mingw-w64)"
arch=('any')
@ -113,6 +113,8 @@ prepare() {
apply_patch_with_msg \
0201-v8-buildflags-fixes.patch \
0202-v8-builtin-deps-buildflags-fixes.patch
find 'deps/npm/node_modules' -depth -name '*.orig' -exec rm -f {} ';'
}
build() {
@ -182,7 +184,7 @@ package() {
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/nodejs/LICENSE"
}
sha256sums=('a55aeb368dee93432f610127cf94ce682aac07b93dcbbaadd856df122c9239df'
sha256sums=('57cbfd3dd51f9300ea2b8e60a8ed215b1eaa71fbde4c3903a7d31a443a4a4423'
'cb56e4f4160dae1041448be64760296634a3aa86fb163ccbfd645f4ae96d2026'
'e9a8bd133ec58cdf1987ec4c3dd7f0b2e290ebd708d0f988f56e28c01f376767'
'c420caaa03bc1c809f48ddcb19157ba0284e33fb6cffff8354c9fc4aa75e2afc'
@ -192,17 +194,17 @@ sha256sums=('a55aeb368dee93432f610127cf94ce682aac07b93dcbbaadd856df122c9239df'
'8a685608e4ef8d2a53222135dfbc51bb337b043939dcd7f50683acd8787f4fe1'
'c2daca3eec876a98adcbb35c7438afe24beb8a1953b62947912f7ea25c63fcb9'
'63cc0a5996fcbdc0959ede2755740493b7c3eda5d878dacc76f6ddec22321c65'
'5d986e7f7654778f02e624eb2ac15765e35559bac2c9aa37dae010bc329e05bd'
'1e9c1d3c3d49ab922c002439a383175208a9c38e6a41dfc66a6ea52e60b0618f'
'442ffeefa393487940735247b5cad9eb585d9b3667a45e5efb7a4973daac9261'
'709f14cc5abf36bad8b24d014985a0a77718739e0c1dc932565796a1480d1887'
'99e64bacf33db5cee211eba00841368d22b40030a91e0475c93c4fe4f76f27d1'
'ec5e6dcb3207682b99990af05a93f4f1e653307fa928c4c48e0fdf1e60000861'
'08ca21ae3202c5081b23b7b86c5dd8a93e4c85924edc939278873c09935e64d6'
'67953237885a5b990f326b7155780ea082d933ee40d071cba22953d9d8299d3d'
'10944ecd5dbc60c8d698ecb2b4ed5acb0289a40c5376fe0aea80c409206d7f8a'
'208e9816d851245271a78516e86505c03f3fc7918663372974a128e2f1f09c62'
'c7d56e545bf21328b0e9f88add15dc7bc39f3adb90d2079bf3448cc8746fa9e3'
'335a58064e22d0ca140be69060951054dbabf5c4c929d7831209609da48aa506'
'930d964034563ba9ffc49c65dfd1e00b19d8906447b9e5186543acfe531cc4c2'
'701cef4edacfd6b2512bb7a42ef388eb704bc500108062af4ead0439667da416'
'7d498f8090ab05458f28a5d2c60ef8511d2b48bc5368fda06922c35ca2584a22'
'601ca4c84533c88fe30b5bbfa3f9cabc51a7316b8ce88e56a641b10861d66135'
'c464c7aed1e23d53ff7140185a7f9c3f3ef73049b7f2374f808efb78f01523a4'
'18ca0c99da6761aeba3b2e8b6fa23787d7d3114e1798fecd9037e9a7a8bc93c1'
'd4343762547064931ccfacca4906ad042f4ef81f73f86ee654ee152e0bc8844f'
'67d40fde6aaa108db2de4d946874857607bade8fa0ee76d77b759439fa80f246'
@ -210,8 +212,8 @@ sha256sums=('a55aeb368dee93432f610127cf94ce682aac07b93dcbbaadd856df122c9239df'
'd5cc3e2bf8b506dce2a96105eb6a6ff300088a7b488cbe6d390efdb7d6c630e5'
'b07a5125182104cd43a1bd07a637096962fc475664e2292cc4bd79a69ca442da'
'22330afcfd297e680062f89d62816afa7b3e6b316950927fe31c6eff31642f26'
'788858123f565ae0526b438f11ead5abbc2ec9239565e295c256d71d8a0d2d20'
'e097e80a416b758cdcb84cb9cf164afde9efb3221c40d782f4cf54d06f9623b3'
'65deeaa7424174d925276a95f3fe4ec2dcdc4cdc5a30f7b874b38626b3bd6f0b'
'ef4304e43d86f79adceabe04068e5b19b0b24b880731abc02517230b83484638'
'892d5f1d47079a5389be8078f87cb43a68e73b7809e9e2f58b30e57e06506e57'
'88aec176748473f6aa81344a9f9f4752d1d366fa5b0a9be1ce42d41f80173565'
'a884c89fb7838274f5b4c845f53e93aaadc9fe105801726c0c86fd185d97ba20'
'39e1ddc31b445672a657760a2d494c2c143b9f0b0c5106d468ffb8d478e438ec'
'284251ff443506cd61530a026afb421d0084e4ad25c037bcfe3a045246d729a2')