Timothy Flynn
33698b9615
LibJS+js: Parse new constructor options from Intl.NumberFormat V3
...
This contains minimal changes to parse newly added and modified options
from the Intl.NumberFormat V3 proposal, while maintaining main spec
behavior in Intl.NumberFormat.prototype.format. The parsed options are
reflected only in Intl.NumberFormat.prototype.resolvedOptions and the js
REPL.
2022-07-13 19:22:26 +01:00
Linus Groh
71a519831d
LibJS: Update to the latest ECMA-402 GetOption and move it into ECMA-262
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/4e79b69
2022-06-15 17:49:20 +01:00
Timothy Flynn
1a76839e8d
LibJS: Use consistent ASCII case-transformation and string language
...
Also update the incorrect spec link for IsWellFormedCurrencyCode.
These are editorial changes in the Intl spec. See:
https://github.com/tc39/ecma402/commit/6939b44
https://github.com/tc39/ecma402/commit/3a775eb
https://github.com/tc39/ecma402/commit/97a7940
https://github.com/tc39/ecma402/commit/129c790
https://github.com/tc39/ecma402/commit/42ec908
https://github.com/tc39/ecma402/commit/ea25c36
2022-03-30 14:24:32 +01:00
Timothy Flynn
812d3a7ef8
LibJS: Reorganize spec steps for Intl.NumberFormat
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/110cb1f
2022-03-15 17:30:58 +01:00
Timothy Flynn
6efbafa6e0
Everywhere: Update copyrights with my new serenityos.org e-mail :^)
2022-01-31 18:23:22 +00:00
Linus Groh
66770de264
LibJS: Convert Intl.NumberFormat functions to ThrowCompletionOr
2021-10-22 23:20:18 +01:00
Linus Groh
5832de62fe
LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr
...
Both at the same time because many of them call construct() in call()
and I'm not keen on adding a bunch of temporary plumbing to turn
exceptions into throw completions.
Also changes the return value of construct() to Object* instead of Value
as it always needs to return an object; allowing an arbitrary Value is a
massive foot gun.
2021-10-21 09:02:23 +01:00
Idan Horowitz
40eb3a39d4
LibJS: Rename define_native_function => define_old_native_function
...
This method will eventually be removed once all native functions are
converted to ThrowCompletionOr
2021-10-20 12:27:19 +01:00
Idan Horowitz
20163c0584
LibJS: Add ThrowCompletionOr versions of the JS native function macros
...
The old versions were renamed to JS_DECLARE_OLD_NATIVE_FUNCTION and
JS_DEFINE_OLD_NATIVE_FUNCTION, and will be eventually removed once all
native functions were converted to the new format.
2021-10-20 12:27:19 +01:00
Linus Groh
ffee3890a7
LibJS: Remove a bunch of forgotten exception checks after TRY_OR_DISCARD
...
Not quite sure how that happened :^)
2021-10-18 21:24:30 +01:00
Idan Horowitz
768009e005
LibJS: Convert NumberFormat AOs to ThrowCompletionOr
2021-09-18 22:59:15 +03:00
Idan Horowitz
d0e5fc4576
LibJS: Convert supported_locales() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
3758e65293
LibJS: Convert canonicalize_locale_list() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
5a4c90fcb1
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Timothy Flynn
94a5a0437c
LibJS: Move Intl.NumberFormat's AOs to its object file
2021-09-12 12:57:17 +01:00
Timothy Flynn
ae7b5280c2
LibJS: Make "options" objects const references in NumberFormat's AOs
2021-09-12 12:57:17 +01:00
Timothy Flynn
4411e16798
LibJS: Change GetOption AO to accept the options as a concrete Object
...
This was being verified at runtime anyways, so let the compiler ensure
it. This also matches the GetOption AO in Temporal now.
2021-09-12 12:57:17 +01:00
Timothy Flynn
071e193d92
LibJS: Implement Intl.NumberFormat.supportedLocalesOf
2021-09-11 11:05:50 +01:00
Timothy Flynn
e42ba7f748
LibJS: Implement the Intl.NumberFormat constructor
2021-09-11 11:05:50 +01:00
Timothy Flynn
07f12b108b
LibJS: Implement a nearly empty Intl.NumberFormat object
...
This adds plumbing for the Intl.NumberFormat object, constructor, and
prototype.
2021-09-11 11:05:50 +01:00