Timothy Flynn
27737f613c
LibTimeZone+LibJS: Update to TZDB version 2022e
...
https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html
This version changes America/Chicago's transtion from LMT to CST from
1883 Nov 18 12:09:24 to 1883 Nov 18 18:00.
2022-10-18 16:01:44 +02:00
leeight
0d96468e9b
LibJS: Implement RegExp legacy static properties
...
RegExp legacy static properties Spec url is https://github.com/tc39/proposal-regexp-legacy-features
2022-10-17 17:08:33 +02:00
Linus Groh
4567ded8e4
LibJS: Reject relativeTo string such as "2022-08-18T17:01Z"
...
This is a normative change in the Temporal spec.
See: 2dc20bf
2022-10-17 12:56:05 +02:00
Luke Wilde
35c9e324b4
LibJS: Add fast path TimeZone conversion to PlainDate#toZonedDateTime
...
This is a normative chane in the Temporal spec.
See: fcab1af
2022-10-16 13:40:21 +02:00
Luke Wilde
707f12f927
LibJS: Remove extra property check from Instant#toZonedDateTimeISO
...
This is a normative change in the Temporal spec.
See: 7dfbd80
2022-10-16 13:40:21 +02:00
Luke Wilde
f7bb79d6d1
LibJS: Fast-path ToTemporalTimeZone when the argument is a TimeZone
...
This is a normative change in the Temporal spec.
See: 54cea53
2022-10-16 13:40:21 +02:00
Luke Wilde
8c3512d6ce
LibJS: Fast-path ToTemporalCalendar when the argument is a Calendar
...
This is a normative change in the Temporal spec.
See: 2a43b39
2022-10-16 13:40:21 +02:00
Luke Wilde
d5d1146cc3
LibJS/Temporal: Fix inconsistency in order of observable operations
...
This is a normative change in the Temporal spec.
See: a3a8237
2022-10-14 18:55:12 +02:00
davidot
1b0ca52c54
LibJS: Disallow one day long time zone offsets
...
This is a normative change in the Temporal spec.
See: 9cc8b29b
2022-10-14 11:23:50 +02:00
Timothy Flynn
7fc03e8967
LibJS: Use Unicode normalization within String.prototype.normalize
2022-10-06 22:14:44 +01:00
Timothy Flynn
82e730eba1
LibJS: Change default time display options to "always" for digital style
...
This is a normative change in the Intl.DurationFormat proposal. See:
d28076b
2022-09-22 14:39:24 +01:00
davidot
446a10a1ac
LibJS: Implement normative change in String.prototype.substr
...
And add spec comments while we're in the neighborhood.
2022-09-21 16:59:58 +01:00
Timothy Flynn
60a6bae53d
LibJS: Change digital default style from "narrow" to "short"
...
This is a normative change in the Intl.DurationFormat proposal. See:
4c24876
2022-09-21 16:09:38 +01:00
Timothy Flynn
887dac0929
LibJS: Handle NumberFormat's [[UseGrouping]] option for "true" / "false"
...
This is a normative change to the Intl NumberFormat V3 spec. See:
4751da5
2022-09-18 09:45:40 -04:00
davidot
03c468fb7d
LibJS: Parse date strings like "9/17/2022"
2022-09-17 18:53:14 +02:00
Brian Gianforcaro
d0a1775369
Everywhere: Fix a variety of typos
...
Spelling fixes found by `codespell`.
2022-09-14 04:46:49 +00:00
davidot
9f661d20f7
LibJS: Allow anonymous functions as default exports
...
This requires a special case with names as the default function is
supposed to have a unique name ("*default*" in our case) but when
checked should have name "default".
2022-09-02 02:07:37 +01:00
davidot
0fc67ffd62
LibJS: Make indirect bindings of module behave like normal bindings
...
Before this we attempted to hack around this by only overriding
has_binding. However this did not cover all cases, for example when
assigning to variables before their declaration it didn't throw.
By using the new find_binding_and_index virtual method we can just
pretend the indirect bindings are real.
Since indirect binding do come from a normal environment we need to
ensure you cannot modify the binding and that properties like mutable
are false as expected by the spec for such an indirect binding.
2022-09-02 02:07:37 +01:00
davidot
faf1430ce4
LibJS: Allow exporting any imported bindings
2022-09-02 02:07:37 +01:00
davidot
462c6df24b
LibJS: Only check for duplicate exports if they have a name
...
Together with removing an incorrect VERIFY this allows multiple star
imports in a single module.
2022-09-02 02:07:37 +01:00
davidot
3b56043612
LibJS: Put exports before symbols in keys of module namespace object
2022-09-02 02:07:37 +01:00
davidot
fb61e9274a
LibJS: Call resolve instead of reject in AsyncFromSyncIteratorPrototype
2022-09-02 02:07:37 +01:00
davidot
3b1c3e574f
LibJS: Handle empty named export
...
This is an export which looks like `export {} from "module"`, and
although it doesn't have any real export entries it should still add
"module" to the required modules to load.
2022-09-02 02:07:37 +01:00
davidot
f75c51b097
LibJS: Allow full ModuleExportName in namespace
...
This means we should accept a string after 'export * as '.
2022-09-02 02:07:37 +01:00
Timothy Flynn
c477425b9b
LibJS: Create DurationFormat's ListFormat object with type and style
...
This is a normative change in the Intl.DurationFormat spec. See:
1304e4b
2022-08-30 14:26:11 -04:00
Timothy Flynn
127b28c940
LibJS: Use numeric style if the previous style was numeric or 2-digit
...
This is a normative change in the Intl.DurationFormat proposal. See:
3a46ee3
2022-08-30 14:26:11 -04:00
Timothy Flynn
d57b92da09
LibJS: Default to "short" for DurationFormat's style option
...
This is a normative change in the Intl.DurationFormat proposal. See:
b289494
2022-08-30 14:26:11 -04:00
Timothy Flynn
765d016670
LibJS: Default to 0 for DurationFormat's fractionalDigits option
...
This is a normative change in the Intl.DurationFormat proposal. See:
ac7e184
2022-08-30 14:26:11 -04:00
Slappy826
f4b3bb519f
LibJS: Handle non-decimal integer literals in Value::to_number
...
Implements support for parsing binary and octal literals, and fixes
instances where a hex literal is parsed in ways the spec doesn't
allow.
2022-08-30 01:00:48 +01:00
Luke Wilde
9643a5c63f
LibJS: Accept and ignore calendar annotation in Instant strings
...
This is a normative change in the Temporal spec.
See: 3cd9669
2022-08-25 23:07:08 +01:00
Luke Wilde
54bb6bf2c0
LibJS: Avoid calling ToString on calendar when calendarName is "never"
...
This is a normative change in the Temporal spec.
See:
- 6122f4e
- cf586bc
2022-08-25 21:11:23 +01:00
Timothy Flynn
6309b8773d
LibJS: Guard IntegerIndexedElementSet with receiver check
...
This is a normative change in the ECMA-262 spec. See:
3620f11
2022-08-25 19:50:04 +01:00
Timothy Flynn
a803d9226f
LibJS: Always access RegExp flags by its "flags" property
...
This is a normative change in the ECMA-262 spec. See:
35b7eb2
Note there is a bit of weirdness between the mainline spec and the set
notation proposal as the latter has not been updated with this change.
For now, this implements what the spec PR and other prototypes indicate
how the proposal will behave.
2022-08-25 16:39:45 +01:00
davidot
fce2b33758
LibJS: Allow BigInts as destructuring property names
...
These are simply treated as their numerical value which means that above
2^32 - 1 they are strings.
2022-08-24 23:27:17 +01:00
davidot
e663504df1
LibJS: Fix that leftshift for BigInts did not round down
...
For negative number this previously rounded towards zero instead of the
intended always rounding down.
2022-08-24 23:27:17 +01:00
davidot
ae349ec6a8
LibJS: Use a synthetic constructor if class with parent doesn't have one
...
We already did this but it called the @@iterator method of
%Array.prototype% visible to the user for example by overriding that
method. This should not be visible so we use a special version of
SuperCall now.
2022-08-20 23:53:55 +01:00
davidot
b79f03182d
LibJS: Add special cases for Math.cosh and add spec comments
...
Although this already works in most cases in non-kvm serenity cases the
cosh and other math function tend to return incorrect values for
Infinity. This makes sure that whatever the underlying cosh function
returns Math.cosh conforms to the spec.
2022-08-20 23:53:55 +01:00
davidot
3a8dd3e78d
LibJS: Implement tagged literals evaluation like the spec
...
We cache on the AST node side as this is easier to track a position, we
just have to take care to wrap the values in a handle to make sure they
are not garbage collected.
2022-08-17 23:56:24 +01:00
davidot
e5adc51e27
LibJS: Allow invalid string in tagged template literals
...
Since tagged template literals can inspect the raw string it is not a
syntax error to have invalid escapes. However the cooked value should be
`undefined`.
We accomplish this by tracking whether parse_string_literal
fails and then using a NullLiteral (since UndefinedLiteral is not a
thing) and finally converting null in tagged template execution to
undefined.
2022-08-17 23:56:24 +01:00
davidot
0f9434a02c
LibJS: Make StringToNumber case sensitive when falling back to strtod
...
We use strtod to convert a string to number after checking whether the
string is [+-]Infinity, however strtod also checks for either 'inf' or
'infinity' in a case-insensitive.
There are still valid cases for strtod to return infinity like 10e100000
so we just check if the "number" contains 'i' or 'I' in which case
the strtod infinity is not valid.
2022-08-17 23:56:24 +01:00
davidot
9d05ca7b20
LibJS: Don't assume a this argument for function.prototype.bind
...
Assuming we had at least one argument meant that the ...arg count would
underflow causing the bound function to have length 0 instead of the
given length when binding with no arguments.
2022-08-17 23:56:24 +01:00
davidot
da8715a07c
LibJS: Add extreme value tests for cos and sin
...
These sometimes produce different NaN patterns which can mess up the
value encoding.
2022-08-15 17:11:25 +02:00
Linus Groh
849495915b
LibJS: Make Function.prototype a callable function object
...
20.2.3 Properties of the Function Prototype Object
https://tc39.es/ecma262/#sec-properties-of-the-function-prototype-object
The Function prototype object:
- is itself a built-in function object.
2022-08-14 00:44:27 +01:00
davidot
301bba8c19
LibJS: Only coerce value once in BigInt constructor
...
See https://github.com/tc39/ecma262/pull/2812 .
2022-08-03 20:59:59 +01:00
Linus Groh
fed1498824
LibJS: Implement & use the {Ordinary,PrepareFor}WrappedFunctionCall AOs
...
This is a normative change in the ShadowRealm spec.
See: 5a3aae8
2022-07-31 14:39:06 +02:00
Linus Groh
6850f25840
LibJS: Support IANA legacy names in the Temporal ISO 8601 grammar
...
This is a normative change in the Temporal spec.
See: 2419680
2022-07-30 10:50:50 +01:00
Timothy Flynn
60f3880650
LibJS: Remove %TypedArray%.prototype.toSpliced
...
This was removed from the change-array-by-copy proposal. See:
4c194d9
2022-07-27 17:35:50 +01:00
Timothy Flynn
417a385db1
LibJS: Allow out-of-order plural ranges to be formatted
...
This is a normative change to the Intl NumberFormat V3 spec:
0c3d849
2022-07-26 10:46:08 -07:00
Timothy Flynn
fd7d97fba5
LibJS: Allow out-of-order number ranges to be formatted
...
This is a normative change to the Intl NumberFormat V3 spec:
0c3d849
2022-07-26 10:46:08 -07:00
Timothy Flynn
415742ab98
LibJS: Allow out-of-order date ranges to be formatted
...
This is a normative change to the Intl spec:
769df4b
2022-07-26 10:46:08 -07:00