Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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
  • Loading branch information
nicolo-ribaudo committed Dec 12, 2023
commit 5389c3a4e22211a9e69fda10db1a3e9c90f094b0
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