Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 476bd05e7395afa602c8b0e5b179ec7b0443b0b8..5c34ba744d10d34329d79fd3fd0871e4172d75d7 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -2658,6 +2658,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit, |
// constructor |
__ CallRuntime(Runtime::kToFastProperties, 1); |
+ |
+ if (is_strong(language_mode())) { |
+ __ ldr(scratch, |
+ FieldMemOperand(r0, JSFunction::kPrototypeOrInitialMapOffset)); |
+ __ push(r0); |
+ __ 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); |
+ } |
} |