| 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 40af62cf1953f2b95a2b129b24c3a722eef8b3ea..a24d7fba7f2dccb3f4dddf7ca3b0ec5acb1b1339 100644
|
| --- a/src/full-codegen/arm64/full-codegen-arm64.cc
|
| +++ b/src/full-codegen/arm64/full-codegen-arm64.cc
|
| @@ -2268,24 +2268,12 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit,
|
| }
|
| }
|
|
|
| - // prototype
|
| - __ CallRuntime(Runtime::kToFastProperties, 1);
|
| -
|
| - // constructor
|
| - __ CallRuntime(Runtime::kToFastProperties, 1);
|
| -
|
| - if (is_strong(language_mode())) {
|
| - __ Ldr(scratch,
|
| - FieldMemOperand(x0, JSFunction::kPrototypeOrInitialMapOffset));
|
| - __ push(x0);
|
| - __ Push(scratch);
|
| - // TODO(conradw): It would be more efficient to define the properties with
|
| - // the right attributes the first time round.
|
| - // Freeze the prototype.
|
| - __ CallRuntime(Runtime::kObjectFreeze, 1);
|
| - // Freeze the constructor.
|
| - __ CallRuntime(Runtime::kObjectFreeze, 1);
|
| - }
|
| + // Set both the prototype and constructor to have fast properties, and also
|
| + // freeze them in strong mode.
|
| + __ CallRuntime(is_strong(language_mode())
|
| + ? Runtime::kFinalizeClassDefinitionStrong
|
| + : Runtime::kFinalizeClassDefinition,
|
| + 2);
|
| }
|
|
|
|
|
|
|