Skip to content

Commit 5389c3a

Browse files
deps: V8: cherry-pick ea996ad04a68
Original commit message: [import-attributes] Remove support for numeric keys During the 2023-09 TC39 meeting the proposal has been updated to remove support for bigint and float literals as import attribute keys, due to implementation difficulties in other engines and minimal added value for JS developers. GH issue: tc39/proposal-import-attributes#145 Bug: v8:13856 Change-Id: I0ede2bb10d6ca338a4b0870a1261ccbcd088c16f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4899760 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#90318} Refs: v8/v8@ea996ad
1 parent 909963e commit 5389c3a

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

deps/v8/src/parsing/parser.cc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,16 +1378,8 @@ ImportAssertions* Parser::ParseImportAssertClause() {
13781378
Expect(Token::LBRACE);
13791379

13801380
while (peek() != Token::RBRACE) {
1381-
const AstRawString* attribute_key = nullptr;
1382-
if (Check(Token::STRING) || Check(Token::SMI)) {
1383-
attribute_key = GetSymbol();
1384-
} else if (Check(Token::NUMBER)) {
1385-
attribute_key = GetNumberAsSymbol();
1386-
} else if (Check(Token::BIGINT)) {
1387-
attribute_key = GetBigIntAsSymbol();
1388-
} else {
1389-
attribute_key = ParsePropertyName();
1390-
}
1381+
const AstRawString* attribute_key =
1382+
Check(Token::STRING) ? GetSymbol() : ParsePropertyName();
13911383

13921384
Scanner::Location location = scanner()->location();
13931385

0 commit comments

Comments
 (0)