diff --git a/common.gypi b/common.gypi index 3c906e809d317d..162faabcefc3bc 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,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.16', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 6478aae4da7c04..ef65881ed91063 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 13 #define V8_MINOR_VERSION 6 #define V8_BUILD_NUMBER 233 -#define V8_PATCH_LEVEL 8 +#define V8_PATCH_LEVEL 10 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 8bc7b6c49b49ef..21d290d8b1f2d1 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -1050,7 +1050,7 @@ 'v8_mac64_asan_rel': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'v8testing', 'shards': 8}, @@ -1059,7 +1059,7 @@ 'v8_mac64_dbg': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'mozilla'}, @@ -1074,7 +1074,7 @@ 'v8_mac_arm64_gc_stress_dbg': { 'swarming_dimensions' : { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'd8testing', 'test_args': ['--gc-stress'], 'shards': 3}, @@ -1083,7 +1083,7 @@ 'v8_mac64_noopt_dbg': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'v8testing', 'shards': 6}, @@ -1092,7 +1092,7 @@ 'v8_mac64_rel': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'mozilla'}, @@ -1107,7 +1107,7 @@ 'v8_mac_arm64_rel': { 'swarming_dimensions' : { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', 'pool': 'chromium.tests', }, 'tests': [ @@ -1128,7 +1128,7 @@ 'v8_mac_arm64_dbg': { 'swarming_dimensions' : { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', 'pool': 'chromium.tests', }, 'tests': [ @@ -1149,7 +1149,7 @@ 'v8_mac_arm64_full_dbg': { 'swarming_dimensions' : { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', 'pool': 'chromium.tests', }, 'tests': [ @@ -1170,7 +1170,7 @@ 'v8_mac_arm64_no_pointer_compression_dbg': { 'swarming_dimensions' : { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', 'pool': 'chromium.tests', }, 'tests': [ @@ -2026,7 +2026,7 @@ 'V8 Mac64': { 'swarming_dimensions': { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'mozilla'}, @@ -2041,7 +2041,7 @@ 'V8 Mac64 - debug': { 'swarming_dimensions': { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'mozilla'}, @@ -2056,7 +2056,7 @@ 'V8 Mac64 ASAN': { 'swarming_dimensions': { 'cpu': 'x86-64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'v8testing', 'shards': 10}, @@ -2065,7 +2065,7 @@ 'V8 Mac - arm64 - gc stress': { 'swarming_dimensions': { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', }, 'tests': [ {'name': 'd8testing', 'test_args': ['--gc-stress'], 'shards': 3}, @@ -2073,7 +2073,7 @@ }, 'V8 Mac - arm64': { 'swarming_dimensions' : { - 'os': 'Mac-14', + 'os': 'Mac-15', 'cpu': 'arm64', 'pool': 'chromium.tests', }, @@ -2095,7 +2095,7 @@ }, 'V8 Mac - arm64 - release': { 'swarming_dimensions' : { - 'os': 'Mac-14', + 'os': 'Mac-15', 'cpu': 'arm64', 'pool': 'chromium.tests', }, @@ -2117,7 +2117,7 @@ }, 'V8 Mac - arm64 - debug': { 'swarming_dimensions' : { - 'os': 'Mac-14', + 'os': 'Mac-15', 'cpu': 'arm64', 'pool': 'chromium.tests', }, @@ -2140,7 +2140,7 @@ 'V8 Mac - arm64 - no pointer compression debug': { 'swarming_dimensions' : { 'cpu': 'arm64', - 'os': 'Mac-14', + 'os': 'Mac-15', 'pool': 'chromium.tests', }, 'tests': [ diff --git a/deps/v8/src/flags/flag-definitions.h b/deps/v8/src/flags/flag-definitions.h index dd713090c67458..68affded4e1342 100644 --- a/deps/v8/src/flags/flag-definitions.h +++ b/deps/v8/src/flags/flag-definitions.h @@ -294,10 +294,7 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") // Features that are complete (but still behind the --harmony flag). #define HARMONY_STAGED_BASE(V) -#define JAVASCRIPT_STAGED_FEATURES_BASE(V) \ - V(js_explicit_resource_management, "explicit resource management") \ - V(js_float16array, \ - "Float16Array, Math.f16round, DataView.getFloat16, DataView.setFloat16") +#define JAVASCRIPT_STAGED_FEATURES_BASE(V) #ifdef V8_INTL_SUPPORT #define HARMONY_STAGED(V) \ @@ -311,7 +308,7 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") #endif // Features that are shipping (turned on by default, but internal flag remains). -#define HARMONY_SHIPPING_BASE(V) \ +#define HARMONY_SHIPPING_BASE(V) \ V(harmony_import_attributes, "harmony import attributes") #define JAVASCRIPT_SHIPPING_FEATURES_BASE(V) \ @@ -320,7 +317,10 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") V(js_promise_try, "Promise.try") \ V(js_atomics_pause, "Atomics.pause") \ V(js_error_iserror, "Error.isError") \ - V(js_regexp_escape, "RegExp.escape") + V(js_regexp_escape, "RegExp.escape") \ + V(js_explicit_resource_management, "explicit resource management") \ + V(js_float16array, \ + "Float16Array, Math.f16round, DataView.getFloat16, DataView.setFloat16") #ifdef V8_INTL_SUPPORT #define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V) diff --git a/deps/v8/src/init/bootstrapper.cc b/deps/v8/src/init/bootstrapper.cc index 0df675047737b3..0249e150cf5547 100644 --- a/deps/v8/src/init/bootstrapper.cc +++ b/deps/v8/src/init/bootstrapper.cc @@ -5211,6 +5211,11 @@ DirectHandle Genesis::InstallTypedArray( GetCorrespondingRabGsabElementsKind(elements_kind), 0); rab_gsab_initial_map->SetConstructor(*result); + if (rab_gsab_initial_map_index == Context::RAB_GSAB_FLOAT16_ARRAY_MAP_INDEX && + v8_flags.js_float16array) { + LOG(isolate(), MapDetails(*rab_gsab_initial_map)); + } + native_context()->set(rab_gsab_initial_map_index, *rab_gsab_initial_map, UPDATE_WRITE_BARRIER, kReleaseStore); Map::SetPrototype(isolate(), rab_gsab_initial_map, prototype); diff --git a/deps/v8/src/parsing/parser-base.h b/deps/v8/src/parsing/parser-base.h index 5d3ca843c48ca0..e9d0cc5a18a57b 100644 --- a/deps/v8/src/parsing/parser-base.h +++ b/deps/v8/src/parsing/parser-base.h @@ -1165,16 +1165,18 @@ class ParserBase { } bool is_using_allowed() const { // UsingDeclaration and AwaitUsingDeclaration are Syntax Errors if the goal - // symbol is Script. UsingDeclaration and AwaitUsingDeclaration are not - // contained, either directly or indirectly, within a Block, CaseBlock, - // ForStatement, ForInOfStatement, FunctionBody, GeneratorBody, + // symbol is Script. UsingDeclaration and AwaitUsingDeclaration are Syntax + // Errors if they are not contained, either directly or indirectly, within a + // Block, ForStatement, ForInOfStatement, FunctionBody, GeneratorBody, // AsyncGeneratorBody, AsyncFunctionBody, ClassStaticBlockBody, or - // ClassBody. Unless the current scope's ScopeType is ScriptScope, the + // ClassBody. They are disallowed in 'bare' switch cases. + // Unless the current scope's ScopeType is ScriptScope, the // current position is directly or indirectly within one of the productions // listed above since they open a new scope. - return ((scope()->scope_type() != SCRIPT_SCOPE && - scope()->scope_type() != EVAL_SCOPE) || - scope()->scope_type() == REPL_MODE_SCOPE); + return (((scope()->scope_type() != SCRIPT_SCOPE && + scope()->scope_type() != EVAL_SCOPE) || + scope()->scope_type() == REPL_MODE_SCOPE) && + !scope()->is_nonlinear()); } bool IsNextUsingKeyword(Token::Value token_after_using, bool is_await_using) { // using and await using declarations in for-of statements must be followed diff --git a/deps/v8/test/mjsunit/es6/iterator-prototype.js b/deps/v8/test/mjsunit/es6/iterator-prototype.js index 68cbafe3dab761..1bb60c6e366954 100644 --- a/deps/v8/test/mjsunit/es6/iterator-prototype.js +++ b/deps/v8/test/mjsunit/es6/iterator-prototype.js @@ -9,7 +9,7 @@ var iteratorPrototype = arrayIteratorPrototype.__proto__; assertSame(Object.prototype, Object.getPrototypeOf(iteratorPrototype)); assertTrue(Object.isExtensible(iteratorPrototype)); assertSame(12, Object.getOwnPropertyNames(iteratorPrototype).length); -assertSame(2, Object.getOwnPropertySymbols(iteratorPrototype).length); +assertSame(3, Object.getOwnPropertySymbols(iteratorPrototype).length); assertSame(Symbol.iterator, Object.getOwnPropertySymbols(iteratorPrototype)[0]); diff --git a/deps/v8/test/test262/test262.status b/deps/v8/test/test262/test262.status index 43cc46a99ffb47..f9c2b3813d0730 100644 --- a/deps/v8/test/test262/test262.status +++ b/deps/v8/test/test262/test262.status @@ -1277,6 +1277,10 @@ # May OOM fatally 'staging/sm/regress/regress-610026': [SKIP], + # https://github.com/rbuckton/ecma262/pull/14 + 'staging/explicit-resource-management/await-using-in-switch-case-block': [SKIP], + 'staging/explicit-resource-management/call-dispose-methods': [SKIP], + ############################ SLOW TESTS ############################# 'annexB/built-ins/RegExp/RegExp-leading-escape-BMP': [PASS, SLOW], @@ -2496,7 +2500,6 @@ 'staging/sm/Temporal/PlainMonthDay/from-coptic': [FAIL], 'staging/sm/Temporal/PlainMonthDay/from-gregory': [FAIL], 'staging/sm/Temporal/PlainMonthDay/result-not-after-1972-dec-31': [FAIL], - 'staging/sm/Math/f16round': [FAIL], 'staging/sm/RegExp/unicode-ignoreCase': [FAIL], 'staging/sm/String/string-code-point-upper-lower-mapping': [FAIL], 'staging/sm/String/string-upper-lower-mapping': [FAIL], @@ -2507,13 +2510,10 @@ 'staging/sm/TypedArray/prototype-constructor-identity': [FAIL], 'staging/sm/TypedArray/set-detached-bigint': [FAIL], 'staging/sm/TypedArray/seal-and-freeze': [FAIL], - 'staging/sm/TypedArray/sort-negative-nan': [FAIL], - 'staging/sm/TypedArray/sort_small': [FAIL], 'staging/sm/TypedArray/test-integrity-level': [FAIL], 'staging/sm/TypedArray/test-integrity-level-detached': [FAIL], 'staging/sm/TypedArray/toReversed-detached': [FAIL], 'staging/sm/TypedArray/toSorted-detached': [FAIL], - 'staging/sm/TypedArray/toString': [FAIL], 'staging/sm/TypedArray/with': [FAIL], 'staging/sm/TypedArray/with-detached': [FAIL], }], diff --git a/deps/v8/test/unittests/parser/decls-unittest.cc b/deps/v8/test/unittests/parser/decls-unittest.cc index 86ffdc35029d4c..f1f8cad98a4f2d 100644 --- a/deps/v8/test/unittests/parser/decls-unittest.cc +++ b/deps/v8/test/unittests/parser/decls-unittest.cc @@ -1082,6 +1082,24 @@ TEST_F(DeclsTest, TestUsing) { EXPECT_ERROR); context.Check("{var using; \n using = 42;}", EXPECT_RESULT, Number::New(isolate(), 42)); + context.Check( + "let label = \"1\"; \n switch (label) { \n case 1: \n let y = 2; \n" + "using x = { \n " + " value: 1, \n " + " [Symbol.dispose]() { \n " + " return 42; \n " + " } \n " + " }; }", + EXPECT_ERROR); + context.Check( + "let label = \"1\"; \n switch (label) { \n case 1: {\n let y = 2; \n" + "using x = { \n " + " value: 1, \n " + " [Symbol.dispose]() { \n " + " return 42; \n " + " } \n " + " }; } }", + EXPECT_RESULT, Undefined(isolate())); } } @@ -1144,6 +1162,17 @@ TEST_F(DeclsTest, TestAwaitUsing) { " } } \n " " f(); ", EXPECT_ERROR); + context.Check( + "async function f() {let label = \"1\"; \n switch (label){ \n case 1: " + "\n let y = 2;" + "\n await using x = { \n " + " value: 1, \n " + " [Symbol.asyncDispose]() { \n " + " classStaticBlockBodyValues.push(42); \n " + " } \n " + " }; \n }" + "} \n f();", + EXPECT_ERROR); } } diff --git a/src/node.cc b/src/node.cc index ddde8d4b2a24ba..1941404f6fa528 100644 --- a/src/node.cc +++ b/src/node.cc @@ -845,11 +845,6 @@ static ExitCode InitializeNodeWithArgsInternal( // is security relevant, for Node it's less important. V8::SetFlagsFromString("--no-freeze-flags-after-init"); - // These features are completed and enabled by default in Chrome, but not - // in V8. - V8::SetFlagsFromString("--js-explicit-resource-management"); - V8::SetFlagsFromString("--js-float16array"); - #if defined(NODE_V8_OPTIONS) // Should come before the call to V8::SetFlagsFromCommandLine() // so the user can disable a flag --foo at run-time by passing