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

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: Merge to trunk, disable bytecode generator class test Created 4 years, 10 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 0a781c5ea01c0e02efc5b1426d62283d1e5ec263..27f9dea1f63acec4ab0eeb36bd2df0fbab7307c8 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -5706,8 +5706,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]]
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698