Closed Bug 639263 Opened 10 years ago Closed 10 years ago
TI: Compute types for singleton and JSON objects
JSObjects which were determined to be constant singletons by the parser or were produced by the JSON parser currently have no type information (type objects have unknown properties). This should get fixed; we should use the same type object for singleton/JSON arrays which appear to contain the same type as their element and for singleton/JSON objects with the same shape. The main issue is getting this type information in a way that doesn't hurt parser perf much.
Picks types for singleton/JSON arrays and objects by waiting for them to be constructed and then changing out the type (and in the latter case, the shape) based on the element type of arrays and final shape of objects. The overhead this adds varies. For large singleton initializers, checking/adding type information adds 3% overhead for a big array of integers, and <2% for a big array of homogenous 4-property structures. The JSON parser is faster, so will have proportionally more overhead. Still needs cleanup and GC handling.
Assignee: general → bhackett1024
Attachment #518300 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: fixed → fixed-in-jaegermonkey
You need to log in before you can comment on or make changes to this bug.