| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index 2051862dfe324b4f42b8eff59daf3dd21f98713b..13351845de104a06bd8cf275beb2ea1631db2d70 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -1415,6 +1415,7 @@ void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
|
| .StoreAccumulatorInRegister(prototype);
|
|
|
| VisitClassLiteralProperties(expr, literal, prototype);
|
| + BuildClassLiteralNameProperty(expr, literal);
|
| builder()->CallRuntime(Runtime::kToFastProperties, literal);
|
| // Assign to class variable.
|
| if (expr->class_variable_proxy() != nullptr) {
|
| @@ -1513,6 +1514,18 @@ void BytecodeGenerator::VisitClassLiteralProperties(ClassLiteral* expr,
|
| }
|
| }
|
|
|
| +void BytecodeGenerator::BuildClassLiteralNameProperty(ClassLiteral* expr,
|
| + Register literal) {
|
| + if (!expr->has_name_static_property() &&
|
| + !expr->constructor()->raw_name()->IsEmpty()) {
|
| + Runtime::FunctionId runtime_id =
|
| + expr->has_static_computed_names()
|
| + ? Runtime::kInstallClassNameAccessorWithCheck
|
| + : Runtime::kInstallClassNameAccessor;
|
| + builder()->CallRuntime(runtime_id, literal);
|
| + }
|
| +}
|
| +
|
| void BytecodeGenerator::VisitNativeFunctionLiteral(
|
| NativeFunctionLiteral* expr) {
|
| size_t entry = builder()->AllocateConstantPoolEntry();
|
|
|