Skip to content

Commit

Permalink
Merge pull request #1022 from nodejs/main
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio committed Sep 3, 2024
2 parents eaf7cdf + 298dea0 commit 3261b06
Show file tree
Hide file tree
Showing 197 changed files with 5,805 additions and 3,649 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/.github/ISSUE_TEMPLATE/* @nodejs/tsc
/CODE_OF_CONDUCT.md @nodejs/tsc
/CONTRIBUTING.md @nodejs/tsc
/doc/contributing/*.md @nodejs/tsc
/doc/contributing/**/* @nodejs/tsc
/GOVERNANCE.md @nodejs/tsc
/SECURITY.md @nodejs/tsc
/LICENSE @nodejs/tsc
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ jobs:
# information.)
- name: tools/doc/node_modules workaround
run: make tools/doc/node_modules
# This is needed due to https://github.com/nodejs/build/issues/3878
- name: Cleanup
run: |
echo "::group::Free space before cleanup"
df -h
echo "::endgroup::"
echo "::group::Cleaned Files"
sudo rm -rfv /Users/runner/Library/Android/sdk
echo "::endgroup::"
echo "::group::Free space after cleanup"
df -h
echo "::endgroup::"
- name: Build
run: make build-ci -j$(getconf _NPROCESSORS_ONLN) V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ For information about the governance of the Node.js project, see
* [aduh95](https://github.com/aduh95) -
**Antoine du Hamel** <<[email protected]>> (he/him)
* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<[email protected]>> (he/him)
**Yagiz Nizipli** <<[email protected]>> (he/him) - [Support me](https://github.com/sponsors/anonrig)
* [apapirovski](https://github.com/apapirovski) -
**Anatoli Papirovski** <<[email protected]>> (he/him)
* [atlowChemi](https://github.com/atlowChemi) -
Expand Down
12 changes: 6 additions & 6 deletions benchmark/vm/compile-script-in-isolate-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
const common = require('../common.js');
const fs = require('fs');
const vm = require('vm');
const fixtures = require('../../test/common/fixtures.js');
const scriptPath = fixtures.path('snapshot', 'typescript.js');
const path = require('path');

const bench = common.createBenchmark(main, {
type: ['with-dynamic-import-callback', 'without-dynamic-import-callback'],
n: [100],
filename: ['test/fixtures/snapshot/typescript.js', 'test/fixtures/syntax/good_syntax.js'],
n: [1000],
});

const scriptSource = fs.readFileSync(scriptPath, 'utf8');

function main({ n, type }) {
function main({ n, type, filename }) {
const scriptPath = path.resolve(__dirname, '..', '..', filename);
const scriptSource = fs.readFileSync(scriptPath, 'utf8');
let script;
bench.start();
const options = {};
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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.13',
'v8_embedder_string': '-node.14',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 1 addition & 1 deletion deps/ncrypto/ncrypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ DataPointer DHPointer::computeSecret(const BignumPointer& peer) const {

// The size of the computed key can be smaller than the size of the DH key.
// We want to make sure that the key is correctly padded.
if (size < dp.size()) {
if (static_cast<size_t>(size) < dp.size()) {
const size_t padding = dp.size() - size;
uint8_t* data = static_cast<uint8_t*>(dp.get());
memmove(data + padding, data, size);
Expand Down
4 changes: 4 additions & 0 deletions deps/nghttp2/lib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@
LIBNGTCP2_CRYPTO_WOLFSSL_LIBS = @LIBNGTCP2_CRYPTO_WOLFSSL_LIBS@
LIBNGTCP2_LIBS = @LIBNGTCP2_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
Expand Down Expand Up @@ -414,6 +416,8 @@ TESTLDADD = @TESTLDADD@
VERSION = @VERSION@
WARNCFLAGS = @WARNCFLAGS@
WARNCXXFLAGS = @WARNCXXFLAGS@
WOLFSSL_CFLAGS = @WOLFSSL_CFLAGS@
WOLFSSL_LIBS = @WOLFSSL_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
Expand Down
4 changes: 4 additions & 0 deletions deps/nghttp2/lib/includes/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@
LIBNGTCP2_CRYPTO_WOLFSSL_LIBS = @LIBNGTCP2_CRYPTO_WOLFSSL_LIBS@
LIBNGTCP2_LIBS = @LIBNGTCP2_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
Expand Down Expand Up @@ -319,6 +321,8 @@ TESTLDADD = @TESTLDADD@
VERSION = @VERSION@
WARNCFLAGS = @WARNCFLAGS@
WARNCXXFLAGS = @WARNCXXFLAGS@
WOLFSSL_CFLAGS = @WOLFSSL_CFLAGS@
WOLFSSL_LIBS = @WOLFSSL_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
Expand Down
4 changes: 4 additions & 0 deletions deps/nghttp2/lib/includes/nghttp2/nghttp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ extern "C" {
# endif /* !BUILDING_NGHTTP2 */
#endif /* !defined(WIN32) */

#ifdef BUILDING_NGHTTP2
# undef NGHTTP2_NO_SSIZE_T
#endif /* BUILDING_NGHTTP2 */

/**
* @typedef
*
Expand Down
4 changes: 2 additions & 2 deletions deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
* @macro
* Version number of the nghttp2 library release
*/
#define NGHTTP2_VERSION "1.62.1"
#define NGHTTP2_VERSION "1.63.0"

/**
* @macro
* Numerical representation of the version number of the nghttp2 library
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
#define NGHTTP2_VERSION_NUM 0x013e01
#define NGHTTP2_VERSION_NUM 0x013f00

#endif /* NGHTTP2VER_H */
2 changes: 1 addition & 1 deletion deps/nghttp2/lib/nghttp2_extpri.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ void nghttp2_extpri_from_uint8(nghttp2_extpri *extpri, uint8_t u8extpri);
* nghttp2_extpri_uint8_inc extracts inc from |PRI| which is supposed to
* be constructed by nghttp2_extpri_to_uint8.
*/
#define nghttp2_extpri_uint8_inc(PRI) (((PRI)&NGHTTP2_EXTPRI_INC_MASK) != 0)
#define nghttp2_extpri_uint8_inc(PRI) (((PRI) & NGHTTP2_EXTPRI_INC_MASK) != 0)

#endif /* NGHTTP2_EXTPRI_H */
9 changes: 5 additions & 4 deletions deps/nghttp2/lib/nghttp2_hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
/* Make scalar initialization form of nghttp2_hd_entry */
#define MAKE_STATIC_ENT(N, V, T, H) \
{ \
{NULL, NULL, (uint8_t *)(N), sizeof((N)) - 1, -1}, \
{NULL, NULL, (uint8_t *)(V), sizeof((V)) - 1, -1}, \
{(uint8_t *)(N), (uint8_t *)(V), sizeof((N)) - 1, sizeof((V)) - 1, 0}, \
T, H \
{NULL, NULL, (uint8_t *)(N), sizeof((N)) - 1, -1}, \
{NULL, NULL, (uint8_t *)(V), sizeof((V)) - 1, -1}, \
{(uint8_t *)(N), (uint8_t *)(V), sizeof((N)) - 1, sizeof((V)) - 1, 0}, \
T, \
H, \
}

/* Generated by mkstatictbl.py */
Expand Down
2 changes: 1 addition & 1 deletion deps/nghttp2/lib/nghttp2_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ nghttp2_min_def(size, size_t);
#define lstreq(A, B, N) ((sizeof((A)) - 1) == (N) && memcmp((A), (B), (N)) == 0)

#define nghttp2_struct_of(ptr, type, member) \
((type *)(void *)((char *)(ptr)-offsetof(type, member)))
((type *)(void *)((char *)(ptr) - offsetof(type, member)))

/*
* Copies 2 byte unsigned integer |n| in host byte order to |buf| in
Expand Down
2 changes: 1 addition & 1 deletion deps/nghttp2/lib/nghttp2_submit.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <nghttp2/nghttp2.h>

typedef struct nghttp2_data_provider_wrap nghttp2_data_provider_wrap;
#include "nghttp2_outbound_item.h"

int nghttp2_submit_data_shared(nghttp2_session *session, uint8_t flags,
int32_t stream_id,
Expand Down
7 changes: 7 additions & 0 deletions deps/v8/include/v8-isolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <stdint.h>

#include <memory>
#include <string>
#include <utility>

#include "cppgc/common.h"
Expand Down Expand Up @@ -1717,6 +1718,12 @@ class V8_EXPORT Isolate {
*/
void LocaleConfigurationChangeNotification();

/**
* Returns the default locale in a string if Intl support is enabled.
* Otherwise returns an empty string.
*/
std::string GetDefaultLocale();

Isolate() = delete;
~Isolate() = delete;
Isolate(const Isolate&) = delete;
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 12
#define V8_MINOR_VERSION 8
#define V8_BUILD_NUMBER 374
#define V8_PATCH_LEVEL 13
#define V8_PATCH_LEVEL 22

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
11 changes: 11 additions & 0 deletions deps/v8/src/api/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10768,6 +10768,17 @@ void v8::Isolate::LocaleConfigurationChangeNotification() {
#endif // V8_INTL_SUPPORT
}

std::string Isolate::GetDefaultLocale() {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this);
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate);

#ifdef V8_INTL_SUPPORT
return i_isolate->DefaultLocale();
#else
return std::string();
#endif
}

#if defined(V8_OS_WIN) && defined(V8_ENABLE_ETW_STACK_WALKING)
void Isolate::SetFilterETWSessionByURLCallback(
FilterETWSessionByURLCallback callback) {
Expand Down
22 changes: 8 additions & 14 deletions deps/v8/src/ast/scopes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2607,8 +2607,7 @@ void ModuleScope::AllocateModuleVariables() {
}
}

// Needs to be kept in sync with ScopeInfo::UniqueIdInScript and
// SharedFunctionInfo::UniqueIdInScript.
// Needs to be kept in sync with ScopeInfo::UniqueIdInScript.
int Scope::UniqueIdInScript() const {
// Script scopes start "before" the script to avoid clashing with a scope that
// starts on character 0.
Expand Down Expand Up @@ -2801,25 +2800,20 @@ void DeclarationScope::AllocateScopeInfos(ParseInfo* info,
Tagged<ScopeInfo> outer = sfi->HasOuterScopeInfo()
? sfi->GetOuterScopeInfo()
: Tagged<ScopeInfo>();
// Look at all inner functions whether they have scope infos that we should
// reuse. Also look at the compiled function itself, and reuse its function
// scope info if it exists.
for (int i = info->literal()->function_literal_id();
// Look at all the existing inner functions (they are numbered id+1 until
// max_id+1) to reattach their outer scope infos to corresponding scopes.
for (int i = info->literal()->function_literal_id() + 1;
i < info->max_info_id() + 1; ++i) {
Tagged<MaybeObject> maybe_info = infos->get(i);
if (maybe_info.IsWeak()) {
Tagged<Object> info = maybe_info.GetHeapObjectAssumeWeak();
Tagged<ScopeInfo> scope_info;
if (Is<SharedFunctionInfo>(info)) {
Tagged<SharedFunctionInfo> sfi = Cast<SharedFunctionInfo>(info);
if (!sfi->scope_info()->IsEmpty() &&
sfi->scope_info()->HasContext()) {
scope_info = sfi->scope_info();
} else if (sfi->HasOuterScopeInfo()) {
scope_info = sfi->GetOuterScopeInfo();
} else {
continue;
}
// Reuse outer scope infos. Don't look at sfi->scope_info() because
// that might be empty if the sfi isn't compiled yet.
if (!sfi->HasOuterScopeInfo()) continue;
scope_info = sfi->GetOuterScopeInfo();
} else {
scope_info = Cast<ScopeInfo>(info);
}
Expand Down
Loading

0 comments on commit 3261b06

Please sign in to comment.