Remove requirement that shape determines prototype




JavaScript Engine
7 years ago
5 months ago


(Reporter: bhackett, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)




7 years ago
Currently, the shape of an object determines its prototype, although the shape has no direct link to the object's prototype (it is stored as a field of the object's type).  This disassociation leads to a good deal of extra complexity in the ObjShrink branch.  It would be good to remove this requirement, which would simplify a lot of things and possibly reduce the number of generated shapes some.  This would require removing the shape teleporting optimization, the source of a substantial amount of complexity in the code base and an unknown number of generated shapes.

Changing this would require cached lookups in ICs and the property cache to not assume a fixed prototype hierarchy but to manually load the prototype when doing prototype chain walks.  Given TI we should not need to do many prototype walks when executing code, but this needs to be measured.


7 years ago
Blocks: 703047
Yes, we need to be careful about removing that optimization. Is there another way to reduce the complexity that keeps teleporting?


4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.