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
Linus Groh
a06bd451d4
LibJS: Implement Temporal.Now.zonedDateTimeISO()
2021-08-01 20:31:31 +01:00
Linus Groh
36c79c2989
LibJS: Implement Temporal.Now.zonedDateTime()
2021-08-01 20:31:31 +01:00
Linus Groh
49c5f87274
LibJS: Implement Temporal.ZonedDateTime.prototype.timeZone
2021-08-01 20:31:31 +01:00
Linus Groh
d022b74d33
LibJS: Implement Temporal.ZonedDateTime.prototype.calendar
2021-08-01 20:31:31 +01:00
Linus Groh
bc416ab802
LibJS: Implement Temporal.ZonedDateTime.prototype[@@toStringTag]
2021-08-01 20:31:31 +01:00
Linus Groh
4640643019
LibJS: Handle ZonedDateTime in ToTemporalDate
2021-08-01 20:31:31 +01:00
Linus Groh
6f75dcc7b8
LibJS: Handle ZonedDateTime in ToTemporalInstant
2021-08-01 20:31:31 +01:00
Linus Groh
1f5098f61e
LibJS: Handle ZonedDateTime in ToTemporalTimeZone
2021-08-01 20:31:31 +01:00
Linus Groh
fa0d6d1045
LibJS: Handle ZonedDateTime in GetTemporalCalendarWithISODefault
2021-08-01 20:31:31 +01:00
Linus Groh
14e7eff43f
LibJS: Handle ZonedDateTime in ToTemporalCalendar
2021-08-01 20:31:31 +01:00
Linus Groh
cfb77b66e5
LibJS: Start implementing Temporal.ZonedDateTime
...
This commit adds the ZonedDateTime object itself, its constructor and
prototype (currently empty), and the CreateTemporalZonedDateTime
abstract operation.
2021-08-01 20:31:31 +01:00
Linus Groh
1b9b995f93
LibJS: Use "T m_foo; // [[Foo]]" style for all Temporal internal slots
2021-08-01 20:31:31 +01:00
Linus Groh
dc80a258f6
LibJS: Implement Temporal.Calendar.from()
2021-08-01 11:40:25 +01:00
Linus Groh
e511390423
LibJS: Implement Temporal.TimeZone.prototype.getPlainDateTimeFor()
2021-08-01 10:24:38 +01:00
Linus Groh
c4123d8aad
LibJS: Implement Temporal.TimeZone.prototype.getOffsetStringFor()
2021-08-01 10:24:38 +01:00
Linus Groh
f987c11464
LibJS: Implement Temporal.TimeZone.from()
2021-08-01 10:24:38 +01:00
Brian Gianforcaro
53166c10ca
LibJS: Remove unused header includes
2021-08-01 08:10:16 +02:00
Brian Gianforcaro
b10657a2b6
LibJS: Remove unused includes out of Cell.h, move to the users
...
Almost everything in LibJS includes Cell.h, don't force all code to
include AK/TypeCasts.h + AK/String.h. Instead include them where they
are actually used and required.
2021-08-01 08:10:16 +02:00
Idan Horowitz
64a98d0f90
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainTime
2021-07-31 00:16:41 +01:00
Idan Horowitz
010761aff4
LibJS: Implement Temporal.PlainDateTime.prototype.withPlainDate
2021-07-31 00:16:41 +01:00
Idan Horowitz
f657c86d58
LibJS: Implement Temporal.PlainDateTime.prototype.withCalendar
2021-07-31 00:16:41 +01:00
Timothy Flynn
f1dd770a8a
LibJS: Parse RegExp literals at AST creation time, not execution time
...
The spec requires that invalid RegExp literals must cause a Syntax Error
before the JavaScript is executed. See:
https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors
This is explicitly tested in the RegExp/property-escapes test262 tests.
For example, see unsupported-property-Line_Break.js:
$DONOTEVALUATE();
/\p{Line_Break}/u;
That RegExp literal is invalid because Line_Break is not a supported
Unicode property. $DONOTEVALUATE() just throws an exception when it is
executed. The test expects that this file will fail to be parsed.
Note that RegExp patterns can still be parsed at execution time by way
of "new RegExp(...)".
2021-07-30 21:26:31 +01:00
Linus Groh
116c45d668
LibJS: Take prepare_temporal_fields() Vector arguments by const&
2021-07-30 20:52:39 +01:00
Linus Groh
4d0f849654
LibJS: Replace TypeError with RangeError in GetOffsetNanosecondsFor
...
Also fix "a integral number" => "an integral number".
2021-07-30 19:53:25 +01:00
Linus Groh
e7c5c3d507
LibJS: Implement Temporal.PlainTime.prototype.getISOFields()
2021-07-30 09:41:11 +01:00
Linus Groh
c7bef42975
LibJS: Implement Temporal.PlainDate.prototype.getISOFields()
2021-07-30 09:41:11 +01:00
Idan Horowitz
d1ee31c5de
LibJS: Implement Temporal.PlainTime.prototype.toPlainDateTime
2021-07-29 22:47:56 +01:00
Idan Horowitz
8f9b4a5ea6
LibJS: Implement Temporal.PlainDateTime.prototype.inLeapYear
2021-07-29 22:47:56 +01:00
Idan Horowitz
b9ed19c850
LibJS: Implement Temporal.PlainDateTime.prototype.monthsInYear
2021-07-29 22:47:56 +01:00
Idan Horowitz
fb5c0ed0d0
LibJS: Implement Temporal.PlainDateTime.prototype.daysInYear
2021-07-29 22:47:56 +01:00
Idan Horowitz
2d86cbae45
LibJS: Implement Temporal.PlainDateTime.prototype.daysInMonth
2021-07-29 22:47:56 +01:00
Idan Horowitz
01d33174c8
LibJS: Implement Temporal.PlainDateTime.prototype.daysInWeek
2021-07-29 22:47:56 +01:00
Idan Horowitz
d4e9d572f5
LibJS: Implement Temporal.PlainDateTime.prototype.weekOfYear
2021-07-29 22:47:56 +01:00
Idan Horowitz
0800c2a958
LibJS: Implement Temporal.PlainDateTime.prototype.dayOfYear
2021-07-29 22:47:56 +01:00
Idan Horowitz
c41b7b27c9
LibJS: Implement Temporal.PlainDateTime.prototype.dayOfWeek
2021-07-29 22:47:56 +01:00
Idan Horowitz
518a9f3eab
LibJS: Implement Temporal.PlainDateTime.prototype.nanosecond
2021-07-29 22:47:56 +01:00