Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 1da93d6f948714c91fb55d54dee166973c3b31a0..0133c5b46f0733b1c12cd311a2caf4f62520f14f 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -2495,6 +2495,16 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) { |
__ Push(Operand(rsp, 0)); // prototype |
} |
EmitPropertyKey(property, lit->GetIdForProperty(i)); |
+ |
+ // The static prototype property is read only. We handle the non computed |
+ // property name case in the parser. Since this is the only case where we |
+ // need to check for an own read only property we special case this so we do |
+ // not need to do this for every property. |
+ if (property->is_static() && property->is_computed_name()) { |
+ __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1); |
+ __ Push(rax); |
+ } |
+ |
VisitForStackValue(value); |
EmitSetHomeObjectIfNeeded(value, 2); |