Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/parsing/parser.cc

Issue 1626423003: Support computed properties for ES2015 Function.name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Mostly working Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 8155dcc42889c1973ae76d7466f66ba3ebcf6c1d..7eb1c208ec741f75e1271ac2ed49df42d80d2c14 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -5738,8 +5738,9 @@ void ParserTraits::SetFunctionNameFromPropertyName(
Expression* value = property->value();
if (!value->IsAnonymousFunctionDefinition()) return;
- // TODO(adamk): Support computed names.
+ // Computed name setting must happen at runtime.
if (property->is_computed_name()) return;
+
DCHECK_NOT_NULL(name);
// Ignore "__proto__" as a name when it's being used to set the [[Prototype]]

Powered by Google App Engine
This is Rietveld 408576698