| Index: src/full-codegen/x87/full-codegen-x87.cc
|
| diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
|
| index 40b78366bb5f22a6e208fe8c601f8e47d23ac545..27b05d3998879b46fbc94625bd253d31d4ae4951 100644
|
| --- a/src/full-codegen/x87/full-codegen-x87.cc
|
| +++ b/src/full-codegen/x87/full-codegen-x87.cc
|
| @@ -2474,24 +2474,12 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit,
|
| }
|
| }
|
|
|
| - // prototype
|
| - __ CallRuntime(Runtime::kToFastProperties, 1);
|
| -
|
| - // constructor
|
| - __ CallRuntime(Runtime::kToFastProperties, 1);
|
| -
|
| - if (is_strong(language_mode())) {
|
| - __ mov(scratch,
|
| - FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset));
|
| - __ push(eax);
|
| - __ 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);
|
| }
|
|
|
|
|
|
|