Commit graph

5 commits

Author SHA1 Message Date
Linus Groh
f9705eb2f4 LibJS: Replace GlobalObject with VM in Intl AOs [Part 1/19]
Instead of passing a GlobalObject everywhere, we will simply pass a VM,
from which we can get everything we need: common names, the current
realm, symbols, arguments, the heap, and a few other things.

In some places we already don't actually need a global object and just
do it for consistency - no more `auto& vm = global_object.vm();`!

This will eventually automatically fix the "wrong realm" issue we have
in some places where we (incorrectly) use the global object from the
allocating object, e.g. in call() / construct() implementations. When
only ever a VM is passed around, this issue can't happen :^)

I've decided to split this change into a series of patches that should
keep each commit down do a somewhat manageable size.
2022-08-23 13:58:30 +01:00
Idan Horowitz
fb8c4a724e LibJS: Disallow mixed-sign durations in Intl.DurationFormat
This is a normative change in the Intl.DurationFormat spec.

See: https://github.com/tc39/proposal-intl-duration-format/commit/89ab1855
2022-07-02 18:32:35 +03:00
Idan Horowitz
b1fe6c3f68 LibJS: Implement the PartitionDurationFormatPattern abstract operation 2022-07-01 01:00:05 +03:00
Idan Horowitz
8e55eb960e LibJS: Implement the ToDurationRecord abstract operation 2022-07-01 01:00:05 +03:00
Idan Horowitz
97fe37bcc2 LibJS: Start implementing the stage 3 Intl.DurationFormat proposal 2022-07-01 01:00:05 +03:00