Found by static analysis.
I wish we didn't have these browser-specific optimizations. Maybe after Warp we
can make bigger changes to our object/proxy model and address this.
Differential Revision: https://phabricator.services.mozilla.com/D83062
It only makes sense to use the smoothing if the nursery has been collected recently. If not it's unlikely to correlate with recent usage. This change makes us ramp up more quickly after a period of inactivity, as we did before the earlier patches in this series landed.
Differential Revision: https://phabricator.services.mozilla.com/D82970
The main purpose of this is so that that worker nurseries are minimised when workers go idle, since that uses a shrinking GC.
Testing indicates that this is sufficient to fix the memory regressions.
Differential Revision: https://phabricator.services.mozilla.com/D82969
`ValueToId` turned out to be a pitfall we want to avoid, it looks quite similar
to `ToPropertyKey`, but is subtly different to that function.
Let's rename it to `PrimitiveValueToId` and assert its input is a primitive,
that should prevent any accidental use of that function when `ToPropertyKey`
should have been used instead.
Differential Revision: https://phabricator.services.mozilla.com/D83060
These changes should result in no observable behaviour for their current usage.
intrinsic_DefineDataProperty:
- Using `ToPropertyKey` also is a better match for the inlined, three argument
form of `_DefineDataProperty`.
JS_ValueToId:
- It looks like this function is only called with String values, so changing it
to use `ToPropertyKey` won't result in any observable difference.
js::ValueToIdentifier:
- This function will throw an error when symbols are encountered anyway, so we
might as well change it to use `ToPropertyKey`.
Differential Revision: https://phabricator.services.mozilla.com/D83058
`ValueToId()` calls `ToAtom()` for objects, which isn't correct per spec,
instead `ToPropertyKey()` needs to be used here.
Differential Revision: https://phabricator.services.mozilla.com/D83052
We do not need to the JSFunction during parsing any more so don't set up the
array until instantiation. During delazification we fill this array from the
existing functions, noting that the order of functions matches between lazy
and full parse by design of lazy parsing.
Differential Revision: https://phabricator.services.mozilla.com/D83128
Handle numbering systems similar to measurement units:
- Add a central list of all supported numbering systems in a yaml file.
- Verify these numbering systems are supported by ICU.
- Also verify ICU supports no additional simple numbering systems. (ECMA-402
should support all numbering systems with simple digit mappings defined in
CLDR.)
- Generate source and test files from this list of numbering systems.
Differential Revision: https://phabricator.services.mozilla.com/D81717
We can sort the available chunks list and prepare the list of chunks to decommit when we're already runnin off-thread.
Depends on D83107
Differential Revision: https://phabricator.services.mozilla.com/D83108
It worked until now as IPC's MessageChannel was only used with background taskqueue; which use a threadpool made of a single thread only.
Differential Revision: https://phabricator.services.mozilla.com/D82499
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.
Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.
Differential Revision: https://phabricator.services.mozilla.com/D81417