Note: There are a few cases of duplicates in user autocompletion which are being worked on.

TI: understand types of window objects

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bhackett, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
Global objects in the browser are generally windows, the types of whose properties are currently unknown to inference.  To understand the types of global variables in browser scripts (pretty critical for perf!), we need to understand the types of the windows.
(Reporter)

Comment 1

6 years ago
Keep enough type information around in XPConnect to track the types of window object properties (we still don't know anything about DOM nodes and DOM-related functions ('alert' etc.) and treat them as generic objects and functions).  Main things this does:

- Make a unique type for the initial prototypes of window objects, which were previously unknown generic objects.

- Allow JSAPI clients to splice new prototypes onto objects with singleton types.  The proto on the type object is updated in place without needing to change the type of the holding JSObject.

http://hg.mozilla.org/projects/jaegermonkey/rev/e0cb191ba873
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 2

6 years ago
Oversight where we didn't mark type objects as unknown when splicing in a prototype with unknown properties.  This hit on the GlobalScopePolluter, which this patch fixes up.

http://hg.mozilla.org/projects/jaegermonkey/rev/81926bb75b41
(Reporter)

Comment 3

6 years ago
Add a read barrier for types when getting properties from shapes with non-standard getters.  Previously we just asserted and needed these getters to add the types manually.

This is needed to handle various quickstub getters getting properties from window objects, would rather put the type management stuff behind the API rather than mess around with lots of client code (not just quickstubs) to add types in the right places.

http://hg.mozilla.org/projects/jaegermonkey/rev/9723b731e828
You need to log in before you can comment on or make changes to this bug.