Commit 4679fdd2 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[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/1357055Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57991}
parent 2394b268
......@@ -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);
......
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