archives

« Bugzilla Issues Index

#4474 — 12.2.5.2 ArrayAccumulation, 12.2.5.3 Evaluation: Inconsistent use of ToUint32


12.2.5.2 Runtime Semantics: ArrayAccumulation
12.2.5.3 Runtime Semantics: Evaluation

ToUint32 is used in

- 12.2.5.2, ElementList : Elision opt AssignmentExpression
- 12.2.5.2, ElementList : ElementList , Elisionopt AssignmentExpression
- 12.2.5.3, ArrayLiteral : [ ElementList , Elisionopt ]


ToUint32 is not used in

- 12.2.5.2, SpreadElement : ... AssignmentExpression
- 12.2.5.3, ArrayLiteral : [ Elisionopt ]
- 12.2.5.3, ArrayLiteral : [ ElementList ]


ToUint32 should either be used always or not at all.


Side note: The note in 12.2.5.3, "ArrayLiteral : [ Elisionopt ]", step 4 is actually incorrect if ElisionWidth exceeds 2^32-1.


Fixed in ES2016 Draft (8e82cfb).