Linus Groh
5e64156fce
LibJS: Implement Temporal.Now.plainTimeISO()
2021-07-28 21:57:30 +01:00
Linus Groh
2aa2c56891
LibJS: Update Temporal.Now spec section numbers
...
The addition of @@toStringTag shifted them all by 1.
2021-07-28 21:57:30 +01:00
Linus Groh
817be1b292
LibJS: Handle PlainTime objects in GetTemporalCalendarWithISODefault
2021-07-28 21:57:30 +01:00
Linus Groh
c2d45e5a83
LibJS: Handle PlainTime objects in ToTemporalCalendar
2021-07-28 21:57:30 +01:00
Linus Groh
d3bed13f4b
LibJS: Implement Temporal.PlainTime.prototype.nanosecond
2021-07-28 21:57:30 +01:00
Linus Groh
65b90e93ad
LibJS: Implement Temporal.PlainTime.prototype.microsecond
2021-07-28 21:57:30 +01:00
Linus Groh
8bcccf2577
LibJS: Implement Temporal.PlainTime.prototype.millisecond
2021-07-28 21:57:30 +01:00
Linus Groh
c5f03bc921
LibJS: Implement Temporal.PlainTime.prototype.second
2021-07-28 21:57:30 +01:00
Linus Groh
574f474d27
LibJS: Implement Temporal.PlainTime.prototype.minute
2021-07-28 21:57:30 +01:00
Linus Groh
524a56f7b6
LibJS: Implement Temporal.PlainTime.prototype.hour
2021-07-28 21:57:30 +01:00
Linus Groh
a8dd1b9480
LibJS: Implement Temporal.PlainTime.prototype.calendar
2021-07-28 21:57:30 +01:00
Linus Groh
ad89a205bc
LibJS: Implement Temporal.PlainTime.prototype.valueOf()
2021-07-28 21:57:30 +01:00
Linus Groh
64b44c7f30
LibJS: Implement Temporal.PlainTime.prototype[@@toStringTag]
2021-07-28 21:57:30 +01:00
Linus Groh
ae4bf8fc32
LibJS: Start implementing Temporal.PlainTime
...
This commit adds the PlainTime object itself, its constructor and
prototype (currently empty), and the CreateTemporalTime abstract
operation.
2021-07-28 21:57:30 +01:00
Linus Groh
321f2c0927
LibJS: Fix types of PlainDateTime iso_{milli,micro,nano}second params
...
999 does not fit into an u8. :^)
2021-07-28 21:57:30 +01:00
Linus Groh
2ba338869b
LibJS/Tests: Remove two leftover console.log() calls
2021-07-28 21:57:30 +01:00
Linus Groh
d84fd3ad5c
LibJS: Reflect infallibility editorial change in ToTemporalCalendar
...
See: 3437106
2021-07-28 21:57:30 +01:00
Timothy Flynn
2f8eb4f068
LibJS: Implement non-ECMA-402 String.prototype.toLocale{Lower,Upper}Case
...
In implementations without ECMA-402, these methods are to behave like
their non-locale equivalents.
2021-07-27 22:35:24 +01:00
Timothy Flynn
2dc9ae00af
LibJS: Use special case folding for String.prototype.to{Lower,Upper}Case
...
Note we still have one String.prototype.toLowerCase test262 failure due
to not yet parsing WordBreakProperty.txt.
2021-07-27 21:04:36 +01:00
Linus Groh
af3a26f4cc
LibJS: Implement Temporal.Now.plainDateTimeISO()
2021-07-27 19:51:44 +01:00
Linus Groh
0bb19fc51c
LibJS: Implement Temporal.Now.plainDateTime()
2021-07-27 19:51:44 +01:00
Linus Groh
f2a2e8e13c
LibJS: Implement Temporal.Now.plainDateISO()
2021-07-27 19:51:44 +01:00
Linus Groh
c303bbde54
LibJS: Implement Temporal.Now.plainDate()
...
...and ten required AOs we didn't have yet:
- BalanceISODate
- BalanceISODateTime
- BalanceISOYearMonth
- BalanceTime
- BuiltinTimeZoneGetPlainDateTimeFor
- GetISOPartsFromEpoch
- GetOffsetNanosecondsFor
- ParseTemporalTimeZone
- SystemDateTime
- ToTemporalTimeZone
2021-07-27 19:51:44 +01:00
Linus Groh
5512ff79f0
LibJS: Implement a bunch of time value related Date AOs
...
We don't have these yet as our Date implementation doesn't use the time
value algorithms and AOs from the spec, but Temporal will need these in
various contexts.
2021-07-27 19:51:44 +01:00
Linus Groh
ff307194f3
LibJS: Implement Temporal.Now[@@toStringTag]
2021-07-27 18:48:22 +01:00
Linus Groh
b3723a88a6
LibJS: Implement Temporal[@@toStringTag]
2021-07-27 18:48:22 +01:00
Linus Groh
c6f4ecced9
LibJS: Update Temporal spec comment that's now been corrected
...
See: 6d2350f
2021-07-26 23:39:11 +01:00
Timothy Flynn
2e3a5b884c
LibJS: Implement Unicode aware String.prototype.to{Upper,Lower}Case
2021-07-26 17:03:55 +01:00
Idan Horowitz
67b3255fe8
LibJS: Implement Temporal.PlainDate.from
2021-07-26 16:15:31 +01:00
Idan Horowitz
07485802c6
LibJS: Implement Temporal.PlainDate.compare
2021-07-26 16:15:31 +01:00
Idan Horowitz
2c6bd3a61b
LibJS: Use narrower types in Temporal PlainDate/PlainDateTime/Calendar
...
These are bounds-checked during construction of PlainDate/PlainDateTime
and as such theres no need to widen them in these internal AO calls.
2021-07-26 16:15:31 +01:00
davidot
7a56ca1250
LibJS: Implement a naive String.prototype.localeCompare
2021-07-26 15:56:15 +01:00
Linus Groh
7915994dfc
LibJS: Use more narrow types in Temporal ISODateTime struct
2021-07-25 23:44:36 +01:00
Linus Groh
96e63415b6
LibJS: Implement Temporal.TimeZone.prototype.getOffsetNanosecondsFor()
2021-07-25 23:44:36 +01:00
Linus Groh
d428787e18
LibJS: Handle PlainDateTime objects in GetTemporalCalendarWithISODefault
2021-07-25 23:44:36 +01:00
Linus Groh
c1005dbb0a
LibJS: Handle PlainDateTime objects ToTemporalCalendar
2021-07-25 23:44:36 +01:00
Linus Groh
1c1354db07
LibJS: Store the %Array.prototype.values% intrinsic on the global object
...
Also group the getter functions for all the additional intrinsics (not
generated via macros), and initialize the members.
2021-07-25 23:44:36 +01:00
Timothy Flynn
8c2b8fd001
LibJS: Remove UTF-8 RegExpExec and AdvanceStringIndex overrides
...
All interested parties are now UTF-16 capable, so these are unused.
2021-07-23 23:06:57 +01:00
Timothy Flynn
5a8f870594
LibJS: Implement RegExp.prototype [ @@replace ] with UTF-16 code units
...
This also converts the GetSubstitution abstract operation take its input
strings as UTF-16 now that all callers are UTF-16 capable. This means
String.prototype.replace (and replaceAll) no longer needs UTF-8 and
UTF-16 copies of these strings.
2021-07-23 23:06:57 +01:00
Timothy Flynn
ee7b04f7bb
LibJS: Implement RegExp.prototype [ @@split ] with UTF-16 code units
2021-07-23 23:06:57 +01:00
Timothy Flynn
66c31a0c07
LibJS: Implement RegExp.prototype [ @@search ] with UTF-16 code units
2021-07-23 23:06:57 +01:00
Timothy Flynn
2c023157e9
LibJS: Implement RegExp.prototype [ @@match ] with UTF-16 code units
2021-07-23 23:06:57 +01:00
Timothy Flynn
b1ea9c20b0
LibJS: Implement RegExp.prototype.{exec,test} with UTF-16 code units
...
This converts RegExpExec to perform matching with UTF-16 strings. As a
very temporary stop-gap, this adds overloads to RegExpExec and friends
for both UTF-8 and UTF-16 strings. This is only needed until the rest
of RegExp.prototype is UTF-16 capable.
This also addresses a FIXME regarding code point index correction in
RegExpExec when the Unicode flag is set.
2021-07-23 23:06:57 +01:00
Timothy Flynn
a0c19deb80
LibJS: Implement RegExpCreate/RegExpInitialize closer to the spec
...
RegExpInitialize specifies how the pattern string should be created
before passing it to [[RegExpMatcher]]. Rather than passing it as-is,
the string should be converted to code points and back to a "List" (if
the Unicode flag is present), or as a "List" of UTF-16 code units.
Further. the spec requires that we keep both the original pattern string
and this parsed string in the RegExp object.
The caveat is that the LibRegex parser further requires any multi-byte
code units to be escaped (as "\unnnn"). Otherwise, the code unit is
recognized as individual UTF-8 bytes.
2021-07-23 23:06:57 +01:00
Idan Horowitz
1d76be97f5
LibJS: Implement Temporal.PlainDate.prototype.inLeapYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
c9ae7e1af1
LibJS: Implement Temporal.Calendar.prototype.inLeapYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
dd15fc471c
LibJS: Implement Temporal.PlainDate.prototype.monthsInYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
342172da37
LibJS: Implement Temporal.Calendar.prototype.monthsInYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
b1dd09840b
LibJS: Implement Temporal.PlainDate.prototype.daysInYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
7f27035342
LibJS: Implement Temporal.Calendar.prototype.daysInYear
2021-07-23 22:00:23 +01:00