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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: Created 4 years, 2 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/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index fe073bdea602aa8b26f95283761d5b7324a9ef93..e60ad97874947bfc0e5a1c65bdc2e46693066019 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -1558,6 +1558,9 @@ void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) {
EmitClassDefineProperties(lit);
DropOperands(1);
+ // ES6 section 14.5.16 class expression evaluation, step 5
+ EmitClassDefineNameProperty(lit);
+
// Set the constructor to have fast properties.
CallRuntimeWithOperands(Runtime::kToFastProperties);

Powered by Google App Engine
This is Rietveld 408576698