Linus Groh
b751f80166
LibJS: Change internal slots of Duration to store mathematical values
...
This is a normative change in the Temporal spec.
See: 1f3fba8
2022-05-08 01:01:32 +02:00
Linus Groh
cc8f5151d7
LibJS: Refactor Temporal since/until to common AOs
...
This is an editorial change in the Temporal spec.
See: 85a9f57
2022-05-08 00:07:58 +02:00
Linus Groh
fc6cf3cb9d
LibJS: Remove ToISODayOfWeek
...
This is an editorial change in the Temporal spec.
See: 3eab7e4
2022-05-08 00:07:58 +02:00
Linus Groh
cabcdd838b
LibJS: Remove ToISODayOfYear
...
This is an editorial change in the Temporal spec.
See: 6117d90
2022-05-08 00:07:58 +02:00
Linus Groh
a216c0b6df
LibJS: Remove IsISOLeapYear
...
This is an editorial change in the Temporal spec.
See: a36bdd4
2022-05-08 00:07:58 +02:00
Linus Groh
6d0d7c8fd0
LibJS: Remove ISODaysInYear
...
This is an editorial change in the Temporal spec.
See: f62e737
2022-05-08 00:07:58 +02:00
Linus Groh
ade7946217
LibJS: Simplify DifferenceISODate
...
This is an editorial change in the Temporal spec.
See: 76452d2
2022-05-08 00:07:58 +02:00
Linus Groh
6a2b73a4a9
LibJS: Simplify DaysUntil
...
This is an editorial change in the Temporal spec.
See: b2254b4
2022-05-08 00:07:58 +02:00
Linus Groh
de0ea331cd
LibJS: Simplify BalanceISODate
...
This is an editorial change in the Temporal spec.
See: 9544573
2022-05-08 00:07:58 +02:00
Linus Groh
938e68d003
LibJS: Remove type assertion comment from IsValidISODate
...
This is an editorial change in the Temporal spec.
See: ddb5652
2022-05-08 00:07:58 +02:00
Linus Groh
15fe6297bc
LibJS: Use "Completion" to emphasize completion record
...
This is an editorial change in the Temporal spec.
See: 31d9fc5
2022-05-08 00:07:58 +02:00
Linus Groh
f64b69955e
LibJS: Fix numeric type in Date.prototype.toTemporalInstant()
...
This is an editorial change in the Temporal spec.
See: 435a111
2022-05-08 00:07:58 +02:00
Linus Groh
c6f7214a60
LibJS: Replace magic nanosecond numbers with constants
...
This is an editorial change in the Temporal spec.
See: 3fdbfda
2022-05-08 00:07:58 +02:00
Linus Groh
3729a910f6
LibJS: Refactor Temporal add/subtract to common AOs
...
This is an editorial change in the Temporal spec.
See:
- 2f96efc
- fbff635
2022-05-08 00:07:58 +02:00
Linus Groh
f7c9bd0760
LibJS: Convert remaining Date AOs using JS::Value as in/output to double
...
There was an awful lot of JS::Value <-> double conversion going on, even
through these AOs only work with number values anyway.
They don't need a global object either as they won't allocate or throw,
that was simply to pass it to infallible calls of ToIntegerOrInfinity.
2022-05-06 22:32:47 +02:00
Linus Groh
b9b3d01bea
LibJS: Add variant of to_integer_or_infinity() for plain doubles
...
In many cases we already know a certain value is a number, or don't have
JS values at all and would need to wrap doubles in a value. To optimize
these cases and avoid having to pass a global object into functions that
won't ever allocate or throw, add a standalone implementation of this
function that takes and returns doubles directly.
2022-05-06 22:32:47 +02:00
Linus Groh
875e59b740
LibJS: Remove unused LibCore/DateTime.h header from Date.cpp
...
We use a double for [[DateValue]] and the spec's own AOs for any
calculations now.
2022-05-06 22:32:47 +02:00
Linus Groh
4dd9102f5e
LibJS: Move Hours/Minutes/Seconds/ms constants out of the Date class
...
They can remain in this header, but will be used outside the Date
context in Temporal.
2022-05-06 22:32:47 +02:00
Linus Groh
53619176f5
LibJS: Set "prototype" property of async generator functions
2022-05-05 22:40:57 +02:00
Linus Groh
09e263dd9c
LibJS: Fix "prototype" property of generator functions, again
...
The change in 3ec0183
wasn't actually correct, the spec tells us to set
the "prototype" property of the function (created with a prototype of
%GeneratorFunction.prototype% itself) to a newly created object:
OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%)
2022-05-05 22:40:57 +02:00
Linus Groh
dd547c3374
LibJS: Add getters for %{Async,}GeneratorFunction.prototype.prototype%
...
These exist as {Async,}GeneratorPrototype of course, but the spec
doesn't always refer to them by the direct name.
2022-05-05 22:40:57 +02:00
Linus Groh
0c65624a32
LibJS: Add AsyncGenerator / AsyncGeneratorPrototype
...
Not implementing any prototype functions yet, but stubbing out async
generator infrastructure will allow us to make some progress in that
direction.
2022-05-05 22:40:57 +02:00
Linus Groh
2c68ec9097
LibJS: Use Object* for 'manual' GlobalObject::foo_prototype() getters
...
Not doing so only leads to problems down the line, e.g. not being able
to pass them as function pointers to ordinary_create_from_constructor().
2022-05-05 22:40:57 +02:00
Linus Groh
2fc9481bb6
LibJS: Correct SetMutableBinding fallibility bug in spec comment
...
This is an editorial change in the ECMA-262 spec.
See: 656f0cf
2022-05-05 09:28:08 +02:00
Linus Groh
50d0f879f7
LibJS: Remove bogus FIXME in ArgumentsObject::internal_get()
...
Not sure what happened here, but the comment does not match the spec,
and so the FIXME I added is not actually an issue.
2022-05-03 22:51:36 +02:00
Linus Groh
f3768705a9
LibJS: Use consistent phrasing for string length
...
This is an editorial change in the ECMA-262 spec.
See: 33ea99e
2022-05-03 22:49:31 +02:00
Linus Groh
8b035b80d3
LibJS: Update order of steps in CanonicalNumericIndexString
...
This is an editorial change in the ECMA-262 spec.
See: be5db32
2022-05-03 22:49:31 +02:00
Linus Groh
367e7b4fe5
LibJS: Reflect Array.prototype.toLocaleString comment in %TypedArray%
...
This is an editorial change in the ECMA-262 spec.
See: 2a9ed48
2022-05-03 22:49:31 +02:00
Linus Groh
b9bbf45a81
LibJS: Add assertion (comment) to MakeMatchIndicesIndexPairArray
...
This is an editorial change in the ECMA-262 spec.
See: caa6e3f
2022-05-03 22:49:31 +02:00
Linus Groh
ede932287f
LibJS: Update spec comments to avoid = comparisons with signed zero
...
This is an editorial change in the ECMA-262 spec.
See: b7348e5
2022-05-03 22:49:31 +02:00
Linus Groh
257375f54c
LibJS: Update comments for Annex B changes to IsLooselyEqual
...
This is an editorial change in the ECMA-262 spec.
See: da3d674
2022-05-03 22:49:31 +02:00
Linus Groh
17fb40bc42
LibJS: Fix type confusion in msFromTime
...
This is an editorial change in the ECMA-262 spec.
See: 8e572b6
2022-05-03 22:49:31 +02:00
Linus Groh
03e13715ac
LibJS: Update two comments saying "completion value"
...
This is an editorial change in the ECMA-262 spec.
See: 7913cea
2022-05-03 22:49:31 +02:00
Linus Groh
438e3ceb4a
LibJS: Use CreateDataPropertyOrThrow in MakeMatchIndicesIndexPairArray
...
This was part of a normative change in the ECMA-262 spec, but didn't get
updated when we implemented that.
See: 0209d85
2022-05-03 22:49:31 +02:00
Linus Groh
9f3f3b0864
LibJS: Remove implicit wrapping/unwrapping of completion records
...
This is an editorial change in the ECMA-262 spec, with similar changes
in some proposals.
See:
- 7575f74
- df899eb
- 9eb5a12
- c81f527
2022-05-03 01:09:29 +02:00
Linus Groh
8cbd25f553
LibJS: Simplify Is{Accessor,Data,Generic}Descriptor AOs
...
This is an editorial change in the ECMA-262 spec.
See: 1c7ae4b
2022-05-01 22:47:38 +02:00
Linus Groh
07ac8b7021
LibJS: Change "Record {}" to "Iterator Record {}" in comments
...
This is an editorial change in the ECMA-262 spec.
See: 85d910c
2022-05-01 22:47:38 +02:00
Linus Groh
c9bdd59e20
LibJS: Change "Completion {}" to "Completion Record {}" in comments
...
This is an editorial change in the ECMA-262 spec.
See: 15a7d8a
2022-05-01 22:47:38 +02:00
Linus Groh
719137418d
LibJS: Change "as [the] argument[s]" to "with arguments" in comments
...
This is an editorial change in the ECMA-262 spec.
See: e671b96
2022-05-01 22:47:38 +02:00
Linus Groh
214d5e3e83
LibJS: Update outdated table reference in BoundFunctionCreate
2022-05-01 22:47:38 +02:00
Linus Groh
acda12597a
LibJS: Rename scope to environment
...
This is an editorial change in the ECMA-262 spec.
See: 3246553
2022-05-01 22:47:38 +02:00
Linus Groh
cb66474fb5
LibJS: Update spec comments testing presence of a field
...
This is an editorial change in the ECMA-262 spec.
See:
- 497f99a
- 0b35749
2022-05-01 22:47:38 +02:00
Linus Groh
d33fcad87f
LibJS: Update ValidateAndApplyPropertyDescriptor implementation
...
These are editorial changes in the ECMA-262 spec.
See:
- b9efa97
- 6f4ff96
- 3d18997
- b3c29fd
2022-05-01 22:47:38 +02:00
Linus Groh
85c16452f9
LibJS: Simplify Array.prototype.splice()
...
This is an editorial change in the ECMA-262 spec.
See: 193211a
2022-05-01 22:47:38 +02:00
Linus Groh
5a26a547db
LibJS: Update a couple of outdated spec comments
...
These are editorial changes in the ECMA-262 spec.
See:
- e080a7f
- c5a9094
- 5091520
- 1c6564b
- e06c80c
2022-05-01 22:47:38 +02:00
Linus Groh
ce659e5eeb
LibJS: Remove assertions that are now part of structured headers
...
This is an editorial change in the ECMA-262 spec.
See: 4fde514
2022-05-01 22:13:21 +02:00
Linus Groh
86e3840202
LibJS: Add missing comment in OrdinaryToPrimitive
2022-05-01 22:13:21 +02:00
Idan Horowitz
1a8b5ef80a
LibJS: Stop fetching GlobalObject from target's realm in ArrayBuffer
...
A function object's realm is not necessarily non-null (like when called
via the Reflect API), so we can't blindly dereference it. Instead use
the object's own GlobalObject.
2022-04-30 21:55:39 +02:00
Idan Horowitz
9098257668
LibJS: Reject -00000 as extended year in Date parsing
2022-04-30 21:36:27 +02:00
Idan Horowitz
0399239e3f
LibJS: Do not negate zero into negative zero in ToIntegerOrInfinity
...
When the input value was in the range of [-1, 0] we would incorrectly
negate the resulting integer, resulting in -0 instead of the expected 0
2022-04-30 21:35:16 +02:00