Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index 68a0dc0bdee861b76a0e9e910a0d7c6dfdceae5f..323b5b9f9766d4fc81144621924e8b86553a161f 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -2577,23 +2577,12 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit, |
} |
} |
- // prototype |
- __ CallRuntime(Runtime::kToFastProperties, 1); |
- |
- // 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); |
- } |
+ // Set both the prototype and constructor to have fast properties, and also |
+ // freeze them in strong mode. |
+ __ CallRuntime(is_strong(language_mode()) |
+ ? Runtime::kFinalizeClassDefinitionStrong |
+ : Runtime::kFinalizeClassDefinition, |
+ 2); |
} |