| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index 1bcbdfe59999528f1693f2395f0edec2906ea7b4..ec0484f2c101fec3ad0c844570f005b54f4570ad 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -2567,6 +2567,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit,
|
|
|
| // constructor
|
| __ CallRuntime(Runtime::kToFastProperties, 1);
|
| +
|
| + if (is_strong(language_mode())) {
|
| + __ movp(scratch,
|
| + FieldOperand(rax, JSFunction::kPrototypeOrInitialMapOffset));
|
| + __ Push(rax);
|
| + __ 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);
|
| + }
|
| }
|
|
|
|
|
|
|