archives

« Bugzilla Issues Index

#1416 — ClassDefinitionEvaluation: unused variables and undefined behaviour if ConstructorMethod not present


A couple of issues in ClassDefinitionEvaluation:
- "strict" variable in step 8 not used
- "constructorParent" variable not used (but should be as [[Prototype]] for constructor)
- if ClassHeritage{opt} is not present and ConstructorMethod is empty, Property Definition Evaluation is applied to the empty object
- if ConstructorMethod is not empty, Property Definition Evaluation is applied twice for the constructor, because PrototypeMethodDefinitions also includes the ConstructorMethod (step 9 and step 14)


Also step 2a is not properly defined, since there is currently no Runtime Semantics entry for ClassHeritage.

And after step 5c, InitializeBinding() needs to be called to initialise the new binding.


fixed in rev15 editor's draft.

I know about the strict variable. It is sort of a marker for me to make sure at some point that we are correctly determining the strictness of code in class bodies.

ClassHeritage qualifies for the production chaining rule because it only has a since non-terminal on its RHS. I know this is sometimes confusing but it sure eliminates a lot of otherwise uninteresting chaining semantic rules.

Fixed all the other items.


resolved in rev 15, May 14, 2013 draft