Linus Groh
d1b71cba25
LibJS: Explicitly handle "auto" vs. number fractionalSecondDigits
...
This is an editorial change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/4dd6713
- https://github.com/tc39/proposal-temporal/commit/4c2476b
- https://github.com/tc39/proposal-temporal/commit/f1a839b
- https://github.com/tc39/proposal-temporal/commit/c775ebe
- https://github.com/tc39/proposal-temporal/commit/0409774
(Changes across multiple commits, that ended up being reverted.)
2022-06-15 17:49:20 +01:00
Linus Groh
cbc4cf057d
LibJS: Improve an alias name in ToSecondsStringPrecision
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/b75bd9e
2022-06-15 17:49:20 +01:00
Linus Groh
3e6561c75f
LibJS: Fold PreparePartialTemporalFields into PrepareTemporalFields
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6ed1835
2022-06-15 17:49:20 +01:00
Linus Groh
4c77575ec5
LibJS: Simplify Temporal unit AOs
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1b3d018
2022-06-10 12:39:11 +02:00
Linus Groh
3bb94dd62e
LibJS: Refactor Temporal parse AOs
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/7fe29eb
2022-06-10 12:39:11 +02:00
Linus Groh
9400b76d79
LibJS: Remove assertions replaced with structured headers
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/74fd5e8
2022-05-25 00:25:23 +01:00
Linus Groh
ae1fdf299d
LibJS: Use the rounding abstract operations from Intl.NumberFormat V3
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/75279e5
Co-Authored-By: Idan Horowitz <idan.horowitz@gmail.com>
2022-05-25 00:25:23 +01:00
Linus Groh
6d7970a23c
LibJS: Remove unnecessary CalendarDate production
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/48744ea
2022-05-16 20:33:22 +01:00
Linus Groh
03017be5bd
LibJS: Remove redundant TemporalRelativeToString production
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/f85f953
2022-05-16 20:29:32 +01:00
Linus Groh
51e01b5a80
LibJS: Remove redundant TemporalDateString production
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/41a8a5c
2022-05-16 20:28:26 +01:00
Linus Groh
33f53041e7
LibJS: Replace "enclosed by" with "contained within" in spec comments
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/cb10d3f
2022-05-16 20:17:23 +01:00
Linus Groh
27793bf76c
LibJS: Replace U+2212 MINUS SIGN with U+002D HYPHEN-MINUS
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/bbcd37b
2022-04-29 22:40:46 +02:00
Linus Groh
70593b7448
LibJS: Update for structured headers added to various Temporal AOs
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/e6a15a5
2022-04-29 22:40:46 +02:00
Linus Groh
9a3014c91a
LibJS: Drop "integral part of" language
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6ec1608
2022-04-29 22:40:46 +02:00
Linus Groh
7bf4a785c6
LibJS: Fix RoundNumberToIncrement spec number
2022-04-29 21:52:30 +02:00
Linus Groh
5397278bfc
LibJS: Update spec comments to use ToZeroPaddedDecimalString AO
...
This is an editorial change in the ECMA-262 and Temporal specs.
See:
- https://github.com/tc39/ecma262/commit/843d8b8
- https://github.com/tc39/proposal-temporal/commit/f9211d9
Note that we don't actually need to implement the AO as we already have
String::formatted() for this, and use unified format strings instead of
zero-padding in individual steps in many cases anyway.
2022-04-12 23:43:29 +01:00
Linus Groh
e109b967a1
LibJS: Make options object const in more Temporal AOs
2022-04-08 00:43:17 +01:00
Linus Groh
2844a2c448
LibJS: Handle undefined options in MergeLargestUnitOption
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/5e161a2
2022-04-08 00:43:17 +01:00
Linus Groh
151eb8606d
LibJS: Consistently call observable Temporal AOs with undefined options
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6fa5b9d
2022-04-07 12:58:39 +01:00
Linus Groh
e4fe60b972
LibJS: Update incorrect spec comment in ToRelativeTemporalObject
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/4cb192d
2022-03-29 22:56:03 +01:00
Linus Groh
2ad69d789b
LibJS: Remove the ConstrainToRange AO
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/537b3e6
2022-03-16 21:49:38 +00:00
Linus Groh
1521c5f55c
LibJS: Remove argument type assertion from ParseTemporalDurationString
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/8615b41
2022-03-16 21:49:38 +00:00
Linus Groh
54af3a5396
LibJS: Adjust grammar for DateExtendedYear to exclude -000000
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/fb3e656
We lose the custom error message, but it's not the end of the world.
2022-03-10 23:20:39 +01:00
Linus Groh
68af8649fb
LibJS: Follow rules for consuming completion records
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1c19b96
2022-03-10 23:20:39 +01:00
Linus Groh
2bae040bc9
LibJS: Remove Sign abstract operation
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/bbc1ebc
2022-03-10 23:20:39 +01:00
Linus Groh
34371b9b61
LibJS: Fix numeric type confusion in ToTemporalRoundingIncrement
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6e59366
2022-03-10 23:20:39 +01:00
Linus Groh
a496868ee5
LibJS: Create Duration Records with their own abstract operations
...
This is an editorial change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/387c405
- https://github.com/tc39/proposal-temporal/commit/b203e26
- https://github.com/tc39/proposal-temporal/commit/387c405
2022-03-10 23:20:39 +01:00
Linus Groh
bdb13a74b0
LibJS: Describe various kinds of "Duration Records"
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/983902e
We already had these defined as structs, but now they're properly
defined in the spec (opposed to the previous anonymous records), and we
don't have to make up our own names anymore :^)
Note that while we're usually not including 'record' in the name, in
this case the 'Duration Record' has a name clash with the Duration
object. Additionally, later editorial changes introduce CreateFooRecord
AOs, so let's just go with FooRecord structs here.
2022-03-10 23:20:39 +01:00
Linus Groh
bc183dbbcb
LibJS: Replace uses of MarkedValueList with MarkedVector<Value>
...
This is effectively a drop-in replacement.
2022-02-09 12:25:27 +00:00
Linus Groh
c48f695b90
LibJS: Remove '-000000' check from ParseTemporalYearMonthString
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/3be4b5d
2022-02-04 20:00:34 +00:00
Linus Groh
28ac5a1333
LibJS: Update fallibility of ParseISODateTime in spec comments
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/bc79069
2022-02-04 20:00:34 +00:00
Linus Groh
40ba12aa7d
LibJS: Consider calls of parse_iso_date_time() fallible
...
See: https://github.com/tc39/proposal-temporal/pull/2027
2022-02-02 18:55:00 +00:00
Linus Groh
19a2b32065
LibJS: Reject '-000000' as extended year
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/e60ef9e
2022-02-02 14:46:52 +00:00
Idan Horowitz
ace36681ff
LibJS+LibIMAP: Use the new Optional<U>(Optional<T>) constructor
...
These look much nicer than these repeated ternaries :^)
2022-01-23 18:53:42 +02:00
Linus Groh
0e3def1d0b
LibJS: Don't parse/re-format offset in parse_temporal_time_zone_string()
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6abe146
2022-01-23 00:22:10 +00:00
Linus Groh
6d744eb4a7
LibJS: Use consistent name for offset strings
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/17f8cdb
2022-01-23 00:22:10 +00:00
Linus Groh
b9093dd0ab
LibJS: Don't validate time zone name when parsing Instant string
...
This is normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/2a81fbc
2022-01-13 10:08:34 +01:00
Linus Groh
392f5bfebd
LibJS: Fix fraction substring range in parse_temporal_time_zone_string()
...
Two issues:
- The intended range was 9 characters starting from index 1. Since the
second argument to String::substring() is the length, 10 is
potentially reading further than the string's length (when only
providing one fraction digit), causing an assertion failure crash.
- The spec's intention to skip the decimal separator by starting at
index 1 is incorrect, no decimal separator is present in the result of
parsing TimeZoneUTCOffsetFractionalPart. I filed a spec fix for this,
see: https://github.com/tc39/proposal-temporal/pull/1999
2022-01-12 21:24:12 +01:00
Linus Groh
027e4bd439
LibJS: Fix calculation overflow in parse_temporal_time_zone_string()
...
As all variables and numeric literals in the expression have an integral
data type, it would evaluate to an int and could easily overflow as
we're multiplying seconds with 10^9.
Introduce a floating point literal into the expression to make it result
in a double.
2022-01-12 21:24:12 +01:00
Linus Groh
323e1e17cf
LibJS: Fix sign
data type in parse_temporal_time_zone_string()
...
A sign that's either the value 1 or -1 should obviously not have an
unsigned data type :^)
This would cause it to become 255 for the negative offset case, which
would then completely screw up the offset_nanoseconds calculation as it
serves as a multiplier.
2022-01-12 21:24:12 +01:00
Linus Groh
09a11fa6ea
LibJS: Implement proper Iterator records
...
Instead of using plain objects as Iterator records, causes confusion
about the object itself actually being its [[Iterator]] slot, and
requires non-standard type conversion shenanigans fpr the [[NextValue]]
and [[Done]] internal slots, implement a proper Iterator record struct
and use it throughout.
Also annotate the remaining Iterator AOs with spec comments while we're
here.
2022-01-09 22:02:43 +01:00
Linus Groh
3301b0b33d
LibJS: Remove duplicate assignment step from parse_iso_date_time()
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/eb68de2
2022-01-08 00:31:28 +01:00
Linus Groh
d42336312c
LibJS: Include time zone name in TemporalInvalidTimeZoneName error
2022-01-06 21:49:50 +01:00
Linus Groh
29e96eceeb
LibJS: Convert PropertyKey::from_value() to ThrowCompletionOr
...
Lots of MUST() - perhaps we'll eventually come up with a better API for
the common case where it can't fail.
2022-01-04 23:37:26 +00:00
Linus Groh
3ab1c52e2b
LibJS: Require 'T' prefix for ambiguous time-only strings
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/514ede3
2021-12-24 00:07:52 +01:00
Linus Groh
9271005357
LibJS: Fix typo in spec comment
2021-12-19 09:35:02 +00:00
Linus Groh
f7fe7f8c77
LibJS: Capture TimeFraction parse result instead of Fraction
...
Not much of a difference as TimeFraction just parses Fraction, but let's
do it correctly. Small mistake I did in 4b7f716
.
Thanks to YouTube user gla3dr for noticing this :^)
2021-12-19 09:29:46 +00:00
Linus Groh
4b7f716f21
LibJS: Fix ambiguity in FractionalPart grammar
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/0f11bd6
2021-12-18 22:32:39 +00:00
Linus Groh
006bea5d31
LibJS: Remove outdated comment in prepare_partial_temporal_fields()
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/bf066ea
2021-12-18 22:32:39 +00:00
Linus Groh
7270bbb255
LibJS: Remove outdated comment from parse_temporal_duration_string()
...
This is a normative change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/e7182d3
- https://github.com/tc39/proposal-temporal/commit/6dae066
2021-12-18 22:32:39 +00:00