(function(){ return [1,,,] }) function () { return [1,,]; } Found with jsfunfuzz.
Created attachment 14442 [details] Add one to the elision value on "trailing elisions" The parser consumes the missing comma on trailing elisions. In the middle (i.e [1,,,3]) -case doesn't need to have the addition, since the consumed comma is also printed when the array has 'next' ptr in the element list.
Comment on attachment 14442 [details] Add one to the elision value on "trailing elisions" I'd feel better if you also included a test of the 0 and 1 cases as well. Maybe 2, just for kicks. [1] [1,] [1,,]
Comment on attachment 14442 [details] Add one to the elision value on "trailing elisions" r=me
Landed in r21393.
This breaks a JSCore test by changing [1,,].length from 2 to 3. I'm going to roll out the change now so that the failure can be addressed.
Rolled out in r21399.
Created attachment 14542 [details] Print extra comma if array expression has element list and elisions contains few additional tests
Comment on attachment 14542 [details] Print extra comma if array expression has element list and elisions r=me
Landed in r21473.