Summary: | Decompiler omits trailing comma in array literal | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jesse Ruderman <jruderman> | ||||||
Component: | JavaScriptCore | Assignee: | Kimmo Kinnunen <kkinnunen> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | mrowe | ||||||
Priority: | P2 | Keywords: | HasReduction | ||||||
Version: | 523.x (Safari 3) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 13638 | ||||||||
Attachments: |
|
Description
Jesse Ruderman
2007-05-08 00:49:10 PDT
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
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. 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
|