Skip to content

Commit 558e658

Browse files
sygaduh95
authored andcommitted
deps: V8: backport ae5a4db8ad86
Original commit message: [import-attributes] Deprecate 'assert' for removal in 12.6 See https://groups.google.com/a/chromium.org/g/blink-dev/c/ZHvzLaJZRvo/m/FgNDBjrtBQAJ Bug: v8:10958 Change-Id: I4d21c9f7aad1024b198b4a1cdfb4792a011da464 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5055681 Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Auto-Submit: Shu-yu Guo <syg@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#92044} Refs: v8/v8@ae5a4db Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #55961 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent f89f4ff commit 558e658

8 files changed

+31
-23
lines changed

common.gypi

+1-1
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.23',
39+
'v8_embedder_string': '-node.24',
4040

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

deps/v8/src/common/message-template.h

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ namespace internal {
113113
T(IllegalInvocation, "Illegal invocation") \
114114
T(ImmutablePrototypeSet, \
115115
"Immutable prototype object '%' cannot have their prototype set") \
116+
T(ImportAssertDeprecated, \
117+
"'assert' is deprecated in import statements and support will be removed " \
118+
"in %; use 'with' instead") \
116119
T(ImportAssertionDuplicateKey, "Import assertion has duplicate key '%'") \
117120
T(ImportCallNotNewExpression, "Cannot use new with import") \
118121
T(ImportOutsideModule, "Cannot use import statement outside a module") \

deps/v8/src/parsing/parser.cc

+3
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,9 @@ ImportAssertions* Parser::ParseImportAssertClause() {
13651365
!scanner()->HasLineTerminatorBeforeNext() &&
13661366
CheckContextualKeyword(ast_value_factory()->assert_string())) {
13671367
// 'assert' keyword consumed
1368+
info_->pending_error_handler()->ReportWarningAt(
1369+
position(), end_position(), MessageTemplate::kImportAssertDeprecated,
1370+
"a future version");
13681371
} else {
13691372
return import_assertions;
13701373
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
*%(basename)s:9: 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
12
undefined:0: Error: Invalid module type was asserted
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
*%(basename)s:9: 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
12
undefined:1: SyntaxError: Unexpected token '/', "// Copyrig"... is not valid JSON
23
// Copyright 2021 the V8 project authors. All rights reserved.
34
^
4-
SyntaxError: Unexpected token '/', "// Copyrig"... is not valid JSON
5+
SyntaxError: Unexpected token '/', "// Copyrig"... is not valid JSON

deps/v8/test/unittests/interpreter/bytecode_expectations/PrivateAccessorAccess.golden

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ bytecodes: [
8383
/* 48 E> */ B(DefineKeyedOwnProperty), R(this), R(0), U8(0), U8(0),
8484
/* 53 S> */ B(LdaImmutableCurrentContextSlot), U8(3),
8585
/* 58 E> */ B(GetKeyedProperty), R(this), U8(2),
86-
B(Wide), B(LdaSmi), I16(311),
86+
B(Wide), B(LdaSmi), I16(312),
8787
B(Star2),
8888
B(LdaConstant), U8(0),
8989
B(Star3),
@@ -115,7 +115,7 @@ bytecodes: [
115115
/* 41 E> */ B(DefineKeyedOwnProperty), R(this), R(0), U8(0), U8(0),
116116
/* 46 S> */ B(LdaImmutableCurrentContextSlot), U8(3),
117117
/* 51 E> */ B(GetKeyedProperty), R(this), U8(2),
118-
B(Wide), B(LdaSmi), I16(310),
118+
B(Wide), B(LdaSmi), I16(311),
119119
B(Star2),
120120
B(LdaConstant), U8(0),
121121
B(Star3),
@@ -149,7 +149,7 @@ bytecodes: [
149149
B(Star2),
150150
B(LdaImmutableCurrentContextSlot), U8(3),
151151
/* 58 E> */ B(GetKeyedProperty), R(this), U8(2),
152-
B(Wide), B(LdaSmi), I16(311),
152+
B(Wide), B(LdaSmi), I16(312),
153153
B(Star3),
154154
B(LdaConstant), U8(0),
155155
B(Star4),
@@ -181,7 +181,7 @@ bytecodes: [
181181
/* 41 E> */ B(DefineKeyedOwnProperty), R(this), R(0), U8(0), U8(0),
182182
/* 46 S> */ B(LdaImmutableCurrentContextSlot), U8(3),
183183
/* 51 E> */ B(GetKeyedProperty), R(this), U8(2),
184-
B(Wide), B(LdaSmi), I16(310),
184+
B(Wide), B(LdaSmi), I16(311),
185185
B(Star2),
186186
B(LdaConstant), U8(0),
187187
B(Star3),

deps/v8/test/unittests/interpreter/bytecode_expectations/PrivateMethodAccess.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ bytecodes: [
5858
B(Star2),
5959
B(LdaImmutableCurrentContextSlot), U8(3),
6060
/* 54 E> */ B(GetKeyedProperty), R(this), U8(2),
61-
B(Wide), B(LdaSmi), I16(309),
61+
B(Wide), B(LdaSmi), I16(310),
6262
B(Star3),
6363
B(LdaConstant), U8(0),
6464
B(Star4),
@@ -91,7 +91,7 @@ bytecodes: [
9191
/* 44 E> */ B(DefineKeyedOwnProperty), R(this), R(0), U8(0), U8(0),
9292
/* 49 S> */ B(LdaImmutableCurrentContextSlot), U8(3),
9393
/* 54 E> */ B(GetKeyedProperty), R(this), U8(2),
94-
B(Wide), B(LdaSmi), I16(309),
94+
B(Wide), B(LdaSmi), I16(311),
9595
B(Star2),
9696
B(LdaConstant), U8(0),
9797
B(Star3),

deps/v8/test/unittests/interpreter/bytecode_expectations/StaticPrivateMethodAccess.golden

+15-15
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bytecodes: [
2424
B(TestReferenceEqual), R(this),
2525
B(Mov), R(this), R(1),
2626
B(JumpIfTrue), U8(16),
27-
B(Wide), B(LdaSmi), I16(303),
27+
B(Wide), B(LdaSmi), I16(304),
2828
B(Star2),
2929
B(LdaConstant), U8(0),
3030
B(Star3),
@@ -61,13 +61,13 @@ bytecodes: [
6161
B(TestReferenceEqual), R(this),
6262
B(Mov), R(this), R(0),
6363
B(JumpIfTrue), U8(16),
64-
B(Wide), B(LdaSmi), I16(303),
64+
B(Wide), B(LdaSmi), I16(304),
6565
B(Star2),
6666
B(LdaConstant), U8(0),
6767
B(Star3),
6868
/* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2),
6969
B(Throw),
70-
B(Wide), B(LdaSmi), I16(309),
70+
B(Wide), B(LdaSmi), I16(310),
7171
B(Star2),
7272
B(LdaConstant), U8(1),
7373
B(Star3),
@@ -99,13 +99,13 @@ bytecodes: [
9999
B(TestReferenceEqual), R(this),
100100
B(Mov), R(this), R(0),
101101
B(JumpIfTrue), U8(16),
102-
B(Wide), B(LdaSmi), I16(303),
102+
B(Wide), B(LdaSmi), I16(304),
103103
B(Star1),
104104
B(LdaConstant), U8(0),
105105
B(Star2),
106106
/* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
107107
B(Throw),
108-
B(Wide), B(LdaSmi), I16(309),
108+
B(Wide), B(LdaSmi), I16(310),
109109
B(Star1),
110110
B(LdaConstant), U8(1),
111111
B(Star2),
@@ -145,7 +145,7 @@ bytecodes: [
145145
B(TestReferenceEqual), R(this),
146146
B(Mov), R(this), R(0),
147147
B(JumpIfTrue), U8(16),
148-
B(Wide), B(LdaSmi), I16(303),
148+
B(Wide), B(LdaSmi), I16(304),
149149
B(Star2),
150150
B(LdaConstant), U8(0),
151151
B(Star3),
@@ -167,7 +167,7 @@ bytecodes: [
167167
B(TestReferenceEqual), R(this),
168168
B(Mov), R(this), R(0),
169169
B(JumpIfTrue), U8(16),
170-
B(Wide), B(LdaSmi), I16(303),
170+
B(Wide), B(LdaSmi), I16(304),
171171
B(Star3),
172172
B(LdaConstant), U8(0),
173173
B(Star4),
@@ -182,7 +182,7 @@ bytecodes: [
182182
B(TestReferenceEqual), R(this),
183183
B(Mov), R(this), R(0),
184184
B(JumpIfTrue), U8(16),
185-
B(Wide), B(LdaSmi), I16(303),
185+
B(Wide), B(LdaSmi), I16(304),
186186
B(Star2),
187187
B(LdaConstant), U8(0),
188188
B(Star3),
@@ -216,13 +216,13 @@ bytecodes: [
216216
B(TestReferenceEqual), R(this),
217217
B(Mov), R(this), R(0),
218218
B(JumpIfTrue), U8(16),
219-
B(Wide), B(LdaSmi), I16(303),
219+
B(Wide), B(LdaSmi), I16(304),
220220
B(Star1),
221221
B(LdaConstant), U8(0),
222222
B(Star2),
223223
/* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
224224
B(Throw),
225-
B(Wide), B(LdaSmi), I16(311),
225+
B(Wide), B(LdaSmi), I16(312),
226226
B(Star1),
227227
B(LdaConstant), U8(1),
228228
B(Star2),
@@ -253,13 +253,13 @@ bytecodes: [
253253
B(TestReferenceEqual), R(this),
254254
B(Mov), R(this), R(0),
255255
B(JumpIfTrue), U8(16),
256-
B(Wide), B(LdaSmi), I16(303),
256+
B(Wide), B(LdaSmi), I16(304),
257257
B(Star1),
258258
B(LdaConstant), U8(0),
259259
B(Star2),
260260
/* 58 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
261261
B(Throw),
262-
B(Wide), B(LdaSmi), I16(310),
262+
B(Wide), B(LdaSmi), I16(311),
263263
B(Star1),
264264
B(LdaConstant), U8(1),
265265
B(Star2),
@@ -292,13 +292,13 @@ bytecodes: [
292292
B(TestReferenceEqual), R(this),
293293
B(Mov), R(this), R(0),
294294
B(JumpIfTrue), U8(16),
295-
B(Wide), B(LdaSmi), I16(303),
295+
B(Wide), B(LdaSmi), I16(304),
296296
B(Star2),
297297
B(LdaConstant), U8(0),
298298
B(Star3),
299299
/* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2),
300300
B(Throw),
301-
B(Wide), B(LdaSmi), I16(311),
301+
B(Wide), B(LdaSmi), I16(312),
302302
B(Star2),
303303
B(LdaConstant), U8(1),
304304
B(Star3),
@@ -327,7 +327,7 @@ bytecode array length: 19
327327
bytecodes: [
328328
/* 46 S> */ B(LdaImmutableCurrentContextSlot), U8(3),
329329
/* 51 E> */ B(GetKeyedProperty), R(this), U8(0),
330-
B(Wide), B(LdaSmi), I16(310),
330+
B(Wide), B(LdaSmi), I16(311),
331331
B(Star1),
332332
B(LdaConstant), U8(0),
333333
B(Star2),

0 commit comments

Comments
 (0)