Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index ec362afba465c81b09f16ce8313158cf4b5d417a..3d2c9dd1fb6bf74b228b210ace840f31018fc8b3 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -2643,6 +2643,16 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit, |
// constructor |
__ CallRuntime(Runtime::kToFastProperties, 1); |
+ |
+ if (is_strong(language_mode())) { |
+ __ lw(scratch, |
+ FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset)); |
+ __ Push(v0, scratch); |
+ __ CallRuntime(Runtime::kObjectFreeze, 1); |
+ // TODO(conradw): It would be more efficient to define the properties with |
+ // the right attributes the first time round. |
+ __ CallRuntime(Runtime::kObjectFreeze, 1); |
+ } |
} |