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

Unified Diff: src/full-codegen/x64/full-codegen-x64.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/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index 32538a86091313c57c511ada623e5cebcac7af33..d9cd2936a1a5afaf8694a4e9b6a309d95e548c2b 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -1591,7 +1591,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::COMPUTED:
if (property->emit_store()) {
__ Push(Smi::FromInt(NONE));
- __ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
+ __ Push(Smi::FromInt(property->NeedsSetFunctionName()));
+ __ CallRuntime(Runtime::kDefineDataPropertyInLiteral);
} else {
__ Drop(3);
}
@@ -2279,7 +2280,9 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
- __ CallRuntime(Runtime::kDefineClassMethod);
+ __ Push(Smi::FromInt(DONT_ENUM));
+ __ Push(Smi::FromInt(property->NeedsSetFunctionName()));
+ __ CallRuntime(Runtime::kDefineDataPropertyInLiteral);
break;
case ObjectLiteral::Property::GETTER:

Powered by Google App Engine
This is Rietveld 408576698