Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index 09e08f3428d0619ceb95fd02b14e996f7a0c4a1d..ad3c570f832fc4d136a09d63b68d35b5cc0df3e7 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -2352,6 +2352,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit, |
// 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); |
+ } |
} |