Skip to content

Commit

Permalink
deps: V8: cherry-pick ea996ad04a68
Browse files Browse the repository at this point in the history
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 <[email protected]>
    Commit-Queue: Joyee Cheung <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#90318}

Refs: v8/v8@ea996ad
  • Loading branch information
nicolo-ribaudo committed Dec 12, 2023
1 parent 909963e commit 5389c3a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions deps/v8/src/parsing/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1378,16 +1378,8 @@ ImportAssertions* Parser::ParseImportAssertClause() {
Expect(Token::LBRACE);

while (peek() != Token::RBRACE) {
const AstRawString* attribute_key = nullptr;
if (Check(Token::STRING) || Check(Token::SMI)) {
attribute_key = GetSymbol();
} else if (Check(Token::NUMBER)) {
attribute_key = GetNumberAsSymbol();
} else if (Check(Token::BIGINT)) {
attribute_key = GetBigIntAsSymbol();
} else {
attribute_key = ParsePropertyName();
}
const AstRawString* attribute_key =
Check(Token::STRING) ? GetSymbol() : ParsePropertyName();

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

Expand Down

0 comments on commit 5389c3a

Please sign in to comment.