summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal
AgeCommit message (Collapse)Author
2023-01-06LibJS: Rename ToIntegerThrowOnInfinity to ToIntegerWithTruncationBodilessSleeper
This commit ticks away two of the boxes in #15525 Temporal commits: tc39/proposal-temporal@f274678 and tc39/proposal-temporal@a63a0fb
2023-01-06LibJS: Replace "is not zero" language in Temporal commentsBodilessSleeper
This commit ticks away one of the boxes in #15525 Temporal commit: tc39/proposal-temporal@9cd448a
2023-01-05LibJS: Convert calendar operation results to floatsBodilessSleeper
This commit ticks away one of the boxes in #15525 Temporal commit: tc39/proposal-temporal@11aad40
2023-01-03LibJS: Rename ToPositiveInteger -> ToPositiveIntegerWithTruncationBodilessSleeper
This commit ticks away one of the boxes in #15525 Temporal commit: tc39/proposal-temporal@768b916
2023-01-03LibJS: Update comments in Temporal/Calendar.cppBodilessSleeper
This commit ticks away one of the boxes in #15525 Temporal commit: tc39/proposal-temporal@08cc0fb
2023-01-02Everywhere: Remove unused includes of LibC/stdlib.hBen Wiederhake
These instances were detected by searching for files that include stdlib.h, but don't match the regex: \\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_ uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs| ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use anything from the stdlib. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2022-12-31LibJS: Fix spec link and spec comment in PlainYearMonthBodilessSleeper
2022-12-31LibJS: Remove call to ToPositiveInteger after CalendarDaysInMonthBodilessSleeper
Implements: tc39/proposal-temporal@261692a In order to remove the call to to_positive_integer() there neeeded to be a change of return type from ThrowCompletionOr<Value> to ThrowCompletionOr<double>. This is one of the changes that will come anyways with the following commit: tc39/proposal-temporal@11aad40. :^)
2022-12-26LibJS: Add yearOfWeek calendar methods and propertiesLuke Wilde
This is a normative change in the Temporal spec. See: - https://github.com/tc39/proposal-temporal/commit/7fa4d18 - https://github.com/tc39/proposal-temporal/commit/caa941d
2022-12-15LibJS: Convert Object::construct() to NonnullGCPtrLinus Groh
2022-12-15LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Remove Object(Object& prototype) footgunAndreas Kling
This constructor was easily confused with a copy constructor, and it was possible to accidentally copy-construct Objects in at least one way that we dicovered (via generic ThrowCompletionOr construction). This patch adds a mandatory ConstructWithPrototypeTag parameter to the constructor to disambiguate it.
2022-12-14LibJS: Convert Object::create() to NonnullGCPtrLinus Groh
2022-12-07LibJS: Replace standalone js_string() with PrimitiveString::create()Linus Groh
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-07LibJS: Replace standalone js_bigint() with BigInt::create()Linus Groh
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-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
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-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
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-02LibJS: Throw on conversion from TimeZone to Calendar and vice versaLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/2084e77
2022-12-02LibJS: Align Temporal.{Calendar,TimeZone} id getters with toStringLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/0bb391a
2022-11-26LibJS: Use Object's new deferred instrinsic storage for GlobalObjectTimothy Flynn
2022-11-23LibJS+LibWeb: Make Runtime/AbstractOperations.h not include AST.hAndreas Kling
This led to considerable fallout and many files had to be patched with now-missing include statements.
2022-11-20LibJS/Temporal: Unroll the loop in to_temporal_time_recordJonah
This is an editorial change in the Temporal spec. See: tc39/proposal-temporal@8e80575
2022-11-20LibJS/Temporal: Unroll the loop in to_temporal_duration_recordJonah
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/8e80575
2022-11-20LibJS/Temporal: Unroll the loop in to_temporal_partial_dictation_recordJonah
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/8e80575
2022-11-20LibJS/Temporal: Rename ToIntegerWithRounding to ToIntegerIfIntegralJonah
This is an editorial change to the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/1dceb57
2022-11-20LibJS/Temporal: Reorder Tables by Order of MagnitudeJonah
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/f2d5642 and https://github.com/tc39/proposal-temporal/commit/07673d3
2022-11-11Revert "LibJS: Add explicit assertion for days"Linus Groh
This reverts commit 56abb01ee3be7213f67ba7024881e3a0c7baf941. Unfortunately, the assertion doesn't work out as expected and crashes test-js.
2022-11-11LibJS: Add explicit assertion for daysSmrtnyk
This is an editorial change in Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/15b7293b38956a99805a48ab042a780a343cb5e2
2022-11-05LibJS: Rename ToShowTimeZoneNameOption to ToTimeZoneNameOptionSmrtnyk
This is an editorial change in Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/ab5b1ba91054a921e2ae129e3fe024bd1c6e7f2f
2022-11-04LibJS: Rename ToShowCalendarOption to ToCalendarNameOptionSmrtnyk
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/2c9e2615f74a5ff15a812dac5cc2c3fa0c4a5922
2022-11-03LibJS: Fix length of PlainDateTime.withPlainTimeLuke Wilde
withPlainTime's argument is optional, so the length of the function is actually 0.
2022-11-03LibJS: Add timeZoneName: "critical" option to ZonedDateTime.toString()Luke Wilde
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/d84937f
2022-11-03LibJS: Add calendarName: "critical" option to toString() methods Luke Wilde
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/e715a50
2022-11-03LibJS: Align ISO 8601 grammar with annotations from IXDTFLuke Wilde
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/c64b844
2022-11-02LibJS: Use the UnsignedBigInteger compare_to_double algorithmMoustafa Raafat
This also avoids an unnecessary copy
2022-11-02LibCrypto: Add a way to compare UnsignedBigInteger with doubleMoustafa Raafat
This patch also make SignedBigInteger::compare_to_double make use of the new function.
2022-10-24LibJS: Accept calendar names case-insensitivelyYedaya Katsman
This is a normative change in the Temporal spec See tc39/proposal-temporal@03101c6
2022-10-23LibJS: Make parse_temporal_duration use the new double parserdavidot
2022-10-22LibJS: Require NanosecondsToDays remainder less than dayLengthMoustafa Raafat
This is an normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/ac69b63
2022-10-22LibJS: Require that NanosecondsToDays doesn't flip signMoustafa Raafat
This is an normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/e13c52d
2022-10-20LibJS: Refactor CalendarFields for better linearityMoustafa Raafat
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/9b139a1
2022-10-20LibJS: Simplify ParseTemporalTimeZoneStringIdan Horowitz
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/eec8efab
2022-10-20LibJS: Refactor ToRelativeTemporalObjectIdan Horowitz
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/895854d9
2022-10-19LibJS: Remove trivial operations ISO{Year,Month,Day}Moustafa Raafat
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/606d8a2
2022-10-19LibJS: Remove trivial operation IsValidISOMonthMoustafa Raafat
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/a08330a
2022-10-19LibJS: Merge ISOMonthCode and BuildISOMonthCodeMoustafa Raafat
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/a4d17b1
2022-10-19LibJS: Improve alias names in ResolveISOMonthMoustafa Raafat
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/01d5fbe
2022-10-19LibJS: Simplify ResolveISOMonthMoustafa Raafat
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/1b83226
2022-10-17LibJS: Sync the set of rounding modesLinus Groh
This is a normative change in the Temporal spec. See: - https://github.com/tc39/proposal-temporal/commit/9613358 - https://github.com/tc39/proposal-temporal/commit/4c45464
2022-10-17LibJS: Add missing validation to remaining Calendar operationsLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/c2a0cea