Linus Groh
525f22d018
LibJS: Replace standalone js_string() with PrimitiveString::create()
...
Note that js_rope_string() has been folded into this, the old name was
misleading - it would not always create a rope string, only if both
sides are not empty strings. Use a three-argument create() overload
instead.
2022-12-07 16:43:06 +00:00
Linus Groh
5db38d7ba1
LibJS: Replace standalone js_bigint() with BigInt::create()
...
Three standalone Cell creation functions remain in the JS namespace:
- js_bigint()
- js_string()
- js_symbol()
All of them are leftovers from early iterations when LibJS still took
inspiration from JSC, which itself has jsString(). Nowadays, we pretty
much exclusively use static create() functions to construct types
allocated on the JS heap, and there's no reason to not do the same for
these.
Also change the return type from BigInt* to NonnullGCPtr<BigInt> while
we're here.
This is patch 1/3, replacement of js_string() and js_symbol() follow.
2022-12-07 16:43:06 +00:00
Linus Groh
57dc179b1f
Everywhere: Rename to_{string => deprecated_string}() where applicable
...
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.
One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
2022-12-06 08:54:33 +01:00
Linus Groh
6e19ab2bbc
AK+Everywhere: Rename String to DeprecatedString
...
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Linus Groh
b0e7d59b8b
LibJS: Throw on conversion from TimeZone to Calendar and vice versa
...
This is a normative change in the Temporal spec.
See: 2084e77
2022-12-02 02:04:13 +01:00
Linus Groh
ca038c1a4e
LibJS: Align Temporal.{Calendar,TimeZone} id getters with toString
...
This is a normative change in the Temporal spec.
See: 0bb391a
2022-12-02 02:04:13 +01:00
Timothy Flynn
e86e59699d
LibJS: Use Object's new deferred instrinsic storage for GlobalObject
2022-11-26 09:36:22 +01:00
Andreas Kling
71067cbc6c
LibJS+LibWeb: Make Runtime/AbstractOperations.h not include AST.h
...
This led to considerable fallout and many files had to be patched with
now-missing include statements.
2022-11-23 16:05:59 +00:00
Jonah
b45225dbac
LibJS/Temporal: Unroll the loop in to_temporal_time_record
...
This is an editorial change in the Temporal spec.
See: tc39/proposal-temporal@8e80575
2022-11-20 11:56:56 +00:00
Jonah
00da2e86e6
LibJS/Temporal: Unroll the loop in to_temporal_duration_record
...
This is an editorial change in the Temporal spec.
See: 8e80575
2022-11-20 11:56:56 +00:00
Jonah
912867526b
LibJS/Temporal: Unroll the loop in to_temporal_partial_dictation_record
...
This is an editorial change in the Temporal spec.
See: 8e80575
2022-11-20 11:56:56 +00:00
Jonah
381b36b83f
LibJS/Temporal: Rename ToIntegerWithRounding to ToIntegerIfIntegral
...
This is an editorial change to the Temporal spec.
See: 1dceb57
2022-11-20 11:56:56 +00:00
Jonah
1cd0b5ad8a
LibJS/Temporal: Reorder Tables by Order of Magnitude
...
This is an editorial change in the Temporal spec.
See: f2d5642
and
07673d3
2022-11-20 11:56:56 +00:00
Linus Groh
24c0a6e9a4
Revert "LibJS: Add explicit assertion for days"
...
This reverts commit 56abb01ee3
.
Unfortunately, the assertion doesn't work out as expected and crashes
test-js.
2022-11-11 14:10:02 +00:00
Smrtnyk
56abb01ee3
LibJS: Add explicit assertion for days
...
This is an editorial change in Temporal spec.
See: 15b7293b38
2022-11-11 12:14:46 +00:00
Smrtnyk
2ba2e6ca0a
LibJS: Rename ToShowTimeZoneNameOption to ToTimeZoneNameOption
...
This is an editorial change in Temporal spec.
See: ab5b1ba910
2022-11-05 15:44:49 +00:00
Smrtnyk
efe82e5c91
LibJS: Rename ToShowCalendarOption to ToCalendarNameOption
...
This is an editorial change in the Temporal spec.
See: 2c9e2615f7
2022-11-04 21:00:25 +00:00
Luke Wilde
ac67077b57
LibJS: Fix length of PlainDateTime.withPlainTime
...
withPlainTime's argument is optional, so the length of the function is
actually 0.
2022-11-03 21:09:58 +00:00
Luke Wilde
b26b18a0bc
LibJS: Add timeZoneName: "critical" option to ZonedDateTime.toString()
...
This is a normative change in the Temporal spec.
See: d84937f
2022-11-03 19:15:50 +00:00
Luke Wilde
4a167cfbec
LibJS: Add calendarName: "critical" option to toString() methods
...
This is a normative change in the Temporal spec.
See: e715a50
2022-11-03 19:15:50 +00:00
Luke Wilde
192aa75279
LibJS: Align ISO 8601 grammar with annotations from IXDTF
...
This is a normative change in the Temporal spec.
See: c64b844
2022-11-03 19:15:50 +00:00
Moustafa Raafat
939374a037
LibJS: Use the UnsignedBigInteger compare_to_double algorithm
...
This also avoids an unnecessary copy
2022-11-02 22:04:34 -06:00
Moustafa Raafat
54b8a2b094
LibCrypto: Add a way to compare UnsignedBigInteger with double
...
This patch also make SignedBigInteger::compare_to_double make use
of the new function.
2022-11-02 22:04:34 -06:00
Yedaya Katsman
dcad8494d6
LibJS: Accept calendar names case-insensitively
...
This is a normative change in the Temporal spec
See tc39/proposal-temporal@03101c6
2022-10-24 23:00:19 +01:00
davidot
3dc99af3dc
LibJS: Make parse_temporal_duration use the new double parser
2022-10-23 15:48:45 +02:00
Moustafa Raafat
5edd4bd512
LibJS: Require NanosecondsToDays remainder less than dayLength
...
This is an normative change in the Temporal spec.
See: ac69b63
2022-10-22 19:14:14 +02:00
Moustafa Raafat
b1c8029c2b
LibJS: Require that NanosecondsToDays doesn't flip sign
...
This is an normative change in the Temporal spec.
See: e13c52d
2022-10-22 19:14:14 +02:00
Moustafa Raafat
8f964604f0
LibJS: Refactor CalendarFields for better linearity
...
This is a normative change in the Temporal spec.
See: 9b139a1
2022-10-20 00:53:44 +02:00
Idan Horowitz
d38aeddd77
LibJS: Simplify ParseTemporalTimeZoneString
...
This is an editorial change in the Temporal spec.
See: eec8efab
2022-10-20 00:47:42 +02:00
Idan Horowitz
0c61552b81
LibJS: Refactor ToRelativeTemporalObject
...
This is an editorial change in the Temporal spec.
See: 895854d9
2022-10-20 00:47:42 +02:00
Moustafa Raafat
092b33c96e
LibJS: Remove trivial operations ISO{Year,Month,Day}
...
This is an editorial change in the Temporal spec.
See: 606d8a2
2022-10-19 22:39:33 +02:00
Moustafa Raafat
69d5368b2a
LibJS: Remove trivial operation IsValidISOMonth
...
This is an editorial change in the Temporal spec.
See: a08330a
2022-10-19 22:39:33 +02:00
Moustafa Raafat
48cc557dfa
LibJS: Merge ISOMonthCode and BuildISOMonthCode
...
This is an editorial change in the Temporal spec.
See: a4d17b1
2022-10-19 22:39:33 +02:00
Moustafa Raafat
b69ceae10c
LibJS: Improve alias names in ResolveISOMonth
...
This is an editorial change in the Temporal spec.
See: 01d5fbe
2022-10-19 22:39:33 +02:00
Moustafa Raafat
d758566996
LibJS: Simplify ResolveISOMonth
...
This is an editorial change in the Temporal spec.
See: 1b83226
2022-10-19 22:39:33 +02:00
Linus Groh
b79b78a5cc
LibJS: Sync the set of rounding modes
...
This is a normative change in the Temporal spec.
See:
- 9613358
- 4c45464
2022-10-17 13:31:22 +02:00
Linus Groh
3d4ce3cc6d
LibJS: Add missing validation to remaining Calendar operations
...
This is a normative change in the Temporal spec.
See: c2a0cea
2022-10-17 12:56:05 +02:00
Linus Groh
4567ded8e4
LibJS: Reject relativeTo string such as "2022-08-18T17:01Z"
...
This is a normative change in the Temporal spec.
See: 2dc20bf
2022-10-17 12:56:05 +02:00
Linus Groh
57162ad510
LibJS: Rename IsValidTimeZoneName to IsAvailableTimeZoneName
...
This is an editorial change in the Temporal spec.
See: 873313b
2022-10-17 12:56:05 +02:00
Linus Groh
72997c6b77
LibJS: Define IsValidTimeZoneName in terms of AvailableTimeZones
...
This is an editorial change in the Temporal spec.
See: d83dcf0
Note that even though we already implement AvailableTimeZones for Intl,
I kept the existing implementation calling into LibTimeZone directly.
2022-10-17 12:56:05 +02:00
Linus Groh
b6f101f1c0
LibJS: Fix TemporalCalendarString ambiguity
...
This is a normative change in the Temporal spec.
See:
- 278d238
- b73aea7
2022-10-16 15:20:23 +02:00
Linus Groh
484c66125d
LibJS: Rename Get{IANA => Named}TimeZonePreviousTransition
...
This is an editorial change in the Temporal spec.
See: 6b759d1
2022-10-16 14:45:09 +02:00
Linus Groh
8cc260107d
LibJS: Rename Get{IANA => Named}TimeZoneNextTransition
...
This is an editorial change in the Temporal spec.
See: 4b0246a
2022-10-16 14:45:09 +02:00
Idan Horowitz
d795f9c6cf
LibJS: Change dateAdd to a required parameter of MoveRelativeDate
...
This is an editorial change in the Temporal spec.
See: 45d9079
2022-10-16 13:45:56 +02:00
Idan Horowitz
3c55643283
LibJS: Add dateAdd to all remaining MoveRelativeDate calls
...
This is a normative change in the Temporal spec.
See: a48838a
2022-10-16 13:45:56 +02:00
Idan Horowitz
4e79ce4e7a
LibJS: Add optional dateAdd parameter to MoveRelativeDate
...
This is a normative change in the Temporal spec.
See: 891060f
2022-10-16 13:45:56 +02:00
Luke Wilde
35c9e324b4
LibJS: Add fast path TimeZone conversion to PlainDate#toZonedDateTime
...
This is a normative chane in the Temporal spec.
See: fcab1af
2022-10-16 13:40:21 +02:00
Luke Wilde
707f12f927
LibJS: Remove extra property check from Instant#toZonedDateTimeISO
...
This is a normative change in the Temporal spec.
See: 7dfbd80
2022-10-16 13:40:21 +02:00
Luke Wilde
f7bb79d6d1
LibJS: Fast-path ToTemporalTimeZone when the argument is a TimeZone
...
This is a normative change in the Temporal spec.
See: 54cea53
2022-10-16 13:40:21 +02:00
Luke Wilde
8c3512d6ce
LibJS: Fast-path ToTemporalCalendar when the argument is a Calendar
...
This is a normative change in the Temporal spec.
See: 2a43b39
2022-10-16 13:40:21 +02:00