Closed Bug 639263 Opened 14 years ago Closed 14 years ago

TI: Compute types for singleton and JSON objects

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

(Whiteboard: fixed-in-jaegermonkey)

Attachments

(1 file, 1 obsolete file)

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.
Attached patch WIP (obsolete) (deleted) — Splinter Review
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
Attached patch patch (deleted) — Splinter Review
Attachment #518300 - Attachment is obsolete: true
Whiteboard: fixed
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed → fixed-in-jaegermonkey
Blocks: 640897
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: