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

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

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: Avoid a runtime call for anonymous classes Created 4 years, 1 month 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 0624c28288b390e1dcb93e2c3505f1b595eb1f91..b8b47a190fa3cc1ab17e608799cd0895aaa0d84a 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -1900,6 +1900,17 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
}
+void FullCodeGenerator::EmitClassDefineNameProperty(ClassLiteral* lit) {
rmcilroy 2016/11/14 13:22:18 After the change to send all TurboFan code via Ign
+ DCHECK(lit->constructor()->raw_name() != nullptr);
+
+ if (!lit->constructor()->raw_name()->IsEmpty()) {
+ PushOperand(Operand(rsp, 0)); // constructor
+ PushOperand(lit->constructor()->name());
+ CallRuntimeWithOperands(Runtime::kDefineClassNameProperty);
+ }
+}
+
+
void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(rdx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();

Powered by Google App Engine
This is Rietveld 408576698