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

Unified Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm64/full-codegen-arm64.cc
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
index 7b716402cbe3f19ddd4950ce7f5a45d6f8168d69..5381b01fed0e0e2a688334905424e9482e905d9c 100644
--- a/src/full-codegen/arm64/full-codegen-arm64.cc
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc
@@ -1638,7 +1638,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (property->emit_store()) {
__ Mov(x0, Smi::FromInt(NONE));
__ Push(x0);
- __ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
+ __ Push(Smi::FromInt(property->NeedsSetFunctionName()));
+ __ CallRuntime(Runtime::kDefineDataPropertyInLiteral);
} else {
__ Drop(3);
}
@@ -2104,7 +2105,10 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
- __ CallRuntime(Runtime::kDefineClassMethod);
+ __ Mov(x0, Smi::FromInt(DONT_ENUM));
+ __ Push(x0);
+ __ Push(Smi::FromInt(property->NeedsSetFunctionName()));
+ __ CallRuntime(Runtime::kDefineDataPropertyInLiteral);
break;
case ObjectLiteral::Property::GETTER:

Powered by Google App Engine
This is Rietveld 408576698