[parser] Don't push string literals directly to the FunctionNameInferrer

If they are part of a keyed store they are pushed later using
impl()->PushPropertyName.

Change-Id: I9c104d15722dd59556c04fe3d4b0018c37d0f553
Reviewed-on: https://chromium-review.googlesource.com/c/1357055
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57991}
This commit is contained in:
Toon Verwaest 2018-12-03 10:41:56 +01:00 committed by Commit Bot
parent 2394b2683b
commit 4679fdd221

View File

@ -329,9 +329,7 @@ Expression* Parser::ExpressionFromLiteral(Token::Value token, int pos) {
return factory()->NewBigIntLiteral(
AstBigInt(scanner()->CurrentLiteralAsCString(zone())), pos);
case Token::STRING: {
const AstRawString* symbol = GetSymbol();
fni_.PushLiteralName(symbol);
return factory()->NewStringLiteral(symbol, pos);
return factory()->NewStringLiteral(GetSymbol(), pos);
}
default:
DCHECK(false);