1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 14:34:59 +00:00
Commit graph

1259 commits

Author SHA1 Message Date
Linus Groh
6852ba4d34 LibJS: Implement Temporal.Instant.prototype.subtract() 2021-08-07 13:10:35 +01:00
Linus Groh
b38f1fb071 LibJS: Implement Temporal.Instant.prototype.add() 2021-08-07 13:10:35 +01:00
Linus Groh
8ffad70504 LibJS: Add missing spec link to Temporal.Instant.prototype.round() 2021-08-07 13:10:35 +01:00
Linus Groh
6762378f89 LibJS/Tests: Add length test for Temporal.Instant.prototype.round() 2021-08-07 12:10:34 +01:00
Linus Groh
cdb0c879d3 LibJS/Tests: Add length test for Temporal.Instant.prototype.equals() 2021-08-07 12:10:34 +01:00
Linus Groh
a8ba2f4b21 LibJS/Tests: Fix bad copy and paste that crept into a lot of tests
The top-level function should have been `describe()``, but instead it's
been nested `test()`s.
2021-08-07 12:10:34 +01:00
sin-ack
ab39a94fdf LibJS: Cast length to signed integer before subtraction
length is size_t as returned, and so subtracting from it may cause
underflow. We handle this case by just casting it to a signed value, and
the for loop predicate takes care of the rest.
2021-08-07 11:32:16 +02:00
Linus Groh
f12152f77e LibJS: Reflect an editorial change in the Temporal spec
See: fb9b550
2021-08-07 01:21:39 +01:00
Linus Groh
5d536c7fbc LibJS: Reflect infallibility editorial changes in the Temporal spec
See: de918c9
2021-08-07 01:15:45 +01:00
davidot
5cd2e0f3a2 LibJS: Improve the TypedArray.prototype.find{,Index} tests
Before this we did not check that it actually gave the first result.
2021-08-06 16:17:25 +01:00
davidot
871a29884d LibJS: Implement proposed TypedArray.prototype.findLast{,Index}
Proposal: https://tc39.es/proposal-array-find-from-last/
2021-08-06 16:17:25 +01:00
davidot
b6523906b3 LibJS: Implement proposed Array.prototype.findLast{,Index}
Proposal: https://tc39.es/proposal-array-find-from-last/
2021-08-06 16:17:25 +01:00
Linus Groh
b7b23d05d5 LibJS: Implement Temporal.ZonedDateTime.prototype.getISOFields() 2021-08-05 23:15:27 +01:00
Linus Groh
82ab5da4db LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainDateTime() 2021-08-05 23:15:27 +01:00
Linus Groh
6ce631b023 LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainTime() 2021-08-05 23:15:27 +01:00
Linus Groh
b4ea4e86a7 LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainDate() 2021-08-05 23:15:27 +01:00
Linus Groh
96a0c201d5 LibJS: Implement Temporal.ZonedDateTime.prototype.toInstant() 2021-08-05 23:15:27 +01:00
Linus Groh
20300bd7c4 LibJS: Implement Temporal.ZonedDateTime.prototype.valueOf() 2021-08-05 23:15:27 +01:00
Linus Groh
6c345c8107 LibJS: Implement Temporal.ZonedDateTime.prototype.offset 2021-08-05 19:19:40 +02:00
Linus Groh
f937e9b966 LibJS: Implement Temporal.ZonedDateTime.prototype.offsetNanoseconds 2021-08-05 19:19:40 +02:00
Linus Groh
dd36593c72 LibJS: Implement Temporal.ZonedDateTime.prototype.inLeapYear 2021-08-05 19:19:40 +02:00
Linus Groh
5a7db1b5f4 LibJS: Implement Temporal.ZonedDateTime.prototype.monthsInYear 2021-08-05 19:19:40 +02:00
Linus Groh
204ba01416 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInYear 2021-08-05 19:19:40 +02:00
Linus Groh
6007fc4804 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInMonth 2021-08-05 19:19:40 +02:00
Linus Groh
d89d55a7a3 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInWeek 2021-08-05 19:19:40 +02:00
Linus Groh
540fdbcf5b LibJS: Implement Temporal.ZonedDateTime.prototype.weekOfYear 2021-08-05 19:19:40 +02:00
Linus Groh
d20a4fe43e LibJS: Implement Temporal.ZonedDateTime.prototype.dayOfYear 2021-08-05 19:19:40 +02:00
Linus Groh
39e67a5823 LibJS: Implement Temporal.ZonedDateTime.prototype.dayOfWeek 2021-08-05 19:19:40 +02:00
Linus Groh
f86bbb7a71 LibJS: Implement Temporal.ZonedDateTime.prototype.epochNanoseconds 2021-08-05 19:19:40 +02:00
Linus Groh
62294d62c5 LibJS: Implement Temporal.ZonedDateTime.prototype.epochMicroseconds 2021-08-05 19:19:40 +02:00
Linus Groh
a9162b7e98 LibJS: Implement Temporal.ZonedDateTime.prototype.epochMilliseconds 2021-08-05 19:19:40 +02:00
Linus Groh
47135af987 LibJS: Implement Temporal.ZonedDateTime.prototype.epochSeconds 2021-08-05 19:19:40 +02:00
Linus Groh
a1082412ef LibJS: Implement Temporal.ZonedDateTime.prototype.nanosecond 2021-08-05 19:19:40 +02:00
Linus Groh
4b22d0f2ce LibJS: Implement Temporal.ZonedDateTime.prototype.microsecond 2021-08-05 19:19:40 +02:00
Linus Groh
752b3eb0c0 LibJS: Implement Temporal.ZonedDateTime.prototype.millisecond 2021-08-05 19:19:40 +02:00
Linus Groh
9d9ab492df LibJS: Implement Temporal.ZonedDateTime.prototype.second 2021-08-05 19:19:40 +02:00
Linus Groh
a6775517ad LibJS: Implement Temporal.ZonedDateTime.prototype.minute 2021-08-05 19:19:40 +02:00
Linus Groh
32f1e17e71 LibJS: Implement Temporal.ZonedDateTime.prototype.hour 2021-08-05 19:19:40 +02:00
Linus Groh
0580f102e4 LibJS: Implement Temporal.ZonedDateTime.prototype.day 2021-08-05 19:19:40 +02:00
Linus Groh
30e27f6483 LibJS: Implement Temporal.ZonedDateTime.prototype.monthCode 2021-08-05 19:19:40 +02:00
Linus Groh
fd18dc782f LibJS: Implement Temporal.ZonedDateTime.prototype.month 2021-08-05 19:19:40 +02:00
Linus Groh
b8ac31500c LibJS: Implement Temporal.ZonedDateTime.prototype.year 2021-08-05 19:19:40 +02:00
Linus Groh
e036f4a786 LibJS: Make regulate_iso_date() and iso_date_from_fields() use ISODate
No need for TemporalDate, we don't use the calendar field here anyway.
2021-08-05 19:19:40 +02:00
Timothy Flynn
70080feab2 AK+LibJS: Implement String.from{CharCode,CodePoint} using UTF-16 strings
Most of String.prototype and RegExp.prototype is implemented with UTF-16
so this is to prevent extra copying of the string data.
2021-08-04 11:18:24 +02:00
Timothy Flynn
b6ff7f4fcc LibJS: Allow PrimitiveString to be created with a UTF-16 string
PrimitiveString may currently only be created with a UTF-8 string, and
it transcodes on the fly when a UTF-16 string is needed. Allow creating
a PrimitiveString from a UTF-16 string to avoid unnecessary transcoding
when the caller only wants UTF-16.
2021-08-04 11:18:24 +02:00
Timothy Flynn
4c2cc419f9 LibJS: Decode UTF-16 surrogate pairs during string literal construction
Rather than deferring this decoding to PrimitiveString, we can decode
surrogate pairs when parsing the string. This prevents a string copy
when constructing the PrimitiveString.
2021-08-04 11:18:24 +02:00
Lenny Maiorani
97bd13264a Everywhere: Make use of container version of all_of
Problem:
- New `all_of` implementation takes the entire container so the user
  does not need to pass explicit begin/end iterators. This is unused
  except is in tests.

Solution:
- Make use of the new and more user-friendly version where possible.
2021-08-03 10:46:43 +02:00
Linus Groh
f58891ed42 LibJS: Add a js_bigint(VM&, ...) overload and use it
We already have js_string(VM&, ...) and js_symbol(VM&, ...) overloads,
so feels very familiar.
2021-08-03 00:14:48 +01:00
Lenny Maiorani
a0d7640e03 Userland: Make use of container version of any_of
Problem:
- New `any_of` implementation takes the entire container so the user
  does not need to pass explicit begin/end iterators. This is unused
  except is in tests.

Solution:
- Make use of the new and more user-friendly version where possible.
2021-08-02 00:37:18 +02:00
Linus Groh
a06bd451d4 LibJS: Implement Temporal.Now.zonedDateTimeISO() 2021-08-01 20:31:31 +01:00