Commit 52f88e1b authored by legendecas's avatar legendecas Committed by Commit Bot

[parser] add support for BigInt literal as property names

Fixed: v8:10083
Change-Id: I50e01022b1d1219ad8b31dd71f58f5bc9c9d10bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1987845
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65719}
parent ee040079
......@@ -68,6 +68,7 @@ Bert Belder <bertbelder@gmail.com>
Burcu Dogan <burcujdogan@gmail.com>
Caitlin Potter <caitpotter88@gmail.com>
Craig Schlenter <craig.schlenter@gmail.com>
Chengzhong Wu <legendecas@gmail.com>
Choongwoo Han <cwhan.tunz@gmail.com>
Chris Nardi <hichris123@gmail.com>
Christopher A. Taylor <chris@gameclosure.com>
......
......@@ -2089,6 +2089,14 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseProperty(
is_array_index = impl()->IsArrayIndex(prop_info->name, &index);
break;
}
case Token::BIGINT: {
Consume(Token::BIGINT);
prop_info->name = impl()->GetNumberAsSymbol();
is_array_index = impl()->IsArrayIndex(prop_info->name, &index);
break;
}
case Token::LBRACK: {
prop_info->name = impl()->NullIdentifier();
prop_info->is_computed_name = true;
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var { 9007199254740991n: it } = { 9007199254740991n: 1 };
assertEquals(it, 1);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment