diff --git a/AUTHORS b/AUTHORS index 2b3944454e..819d147096 100644 --- a/AUTHORS +++ b/AUTHORS @@ -68,6 +68,7 @@ Bert Belder Burcu Dogan Caitlin Potter Craig Schlenter +Chengzhong Wu Choongwoo Han Chris Nardi Christopher A. Taylor diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h index 4ce201ebd4..16129a4c00 100644 --- a/src/parsing/parser-base.h +++ b/src/parsing/parser-base.h @@ -2089,6 +2089,14 @@ typename ParserBase::ExpressionT ParserBase::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; diff --git a/test/mjsunit/harmony/bigint/property-names.js b/test/mjsunit/harmony/bigint/property-names.js new file mode 100644 index 0000000000..8c1763053c --- /dev/null +++ b/test/mjsunit/harmony/bigint/property-names.js @@ -0,0 +1,7 @@ +// 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);