Index: src/ppc/full-codegen-ppc.cc |
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc |
index e7b945bc1d27aa1d2aeda912bdb076040a3b5767..fb72f8a96a43d7d67a922f4a7889f84be44483eb 100644 |
--- a/src/ppc/full-codegen-ppc.cc |
+++ b/src/ppc/full-codegen-ppc.cc |
@@ -2666,6 +2666,18 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit, |
// constructor |
__ CallRuntime(Runtime::kToFastProperties, 1); |
+ |
+ if (is_strong(language_mode())) { |
+ __ LoadP(scratch, |
+ FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset)); |
+ __ Push(r3, 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); |
+ } |
} |