1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 03:35:07 +00:00
Commit graph

5099 commits

Author SHA1 Message Date
Linus Groh
690585323d LibJS: Prefer Else + Assertion over If for constrained values
This is an editorial change in the Temporal spec.

See: 2088eaa
2022-06-15 17:49:20 +01:00
Linus Groh
9b3602d000 LibJS: Update missing/superfluous commas in various spec comments
These are editorial changes in the Temporal spec.

See:
- 9586746
- 3c76ecc
- 96eab07
2022-06-15 17:49:20 +01:00
Linus Groh
30328d74d0 LibJS: Use MaximumTemporalDurationRoundingIncrement in two more places
This is an editorial change in the Temporal spec.

See: de582e2
2022-06-15 17:49:20 +01:00
Linus Groh
6c82c9df79 LibJS: Fix GetIterator capitalization in Calendar.prototype.fields
This is an editorial change in the Temporal spec.

See: 8538970
2022-06-15 17:49:20 +01:00
Linus Groh
9d2377ff60 LibJS: Only call CanonicalizeTimeZoneName on valid time zone IDs
This is an editorial change in the Temporal spec.

See: 30122e6
2022-06-15 17:49:20 +01:00
Linus Groh
cf61d01140 LibJS: Add a named alias for parseResult.[[Name]] in ToTemporalTimeZone
This is an editorial change in the Temporal spec.

See: 8ddcb07
2022-06-15 17:49:20 +01:00
Linus Groh
71a519831d LibJS: Update to the latest ECMA-402 GetOption and move it into ECMA-262
This is an editorial change in the Temporal spec.

See: 4e79b69
2022-06-15 17:49:20 +01:00
Linus Groh
46d2ac6da4 LibJS: Align Temporal GetOption AO with ECMA-402
This is an editorial change in the Temporal spec.

See: 7b6a264
2022-06-15 17:49:20 +01:00
Linus Groh
c8d84f33b0 LibJS: Remove unused GetStringOrNumberOption operation
This is an editorial change in the Temporal spec.

See: d8b3423
2022-06-15 17:49:20 +01:00
Linus Groh
d1b71cba25 LibJS: Explicitly handle "auto" vs. number fractionalSecondDigits
This is an editorial change in the Temporal spec.

See:
- 4dd6713
- 4c2476b
- f1a839b
- c775ebe
- 0409774

(Changes across multiple commits, that ended up being reverted.)
2022-06-15 17:49:20 +01:00
Linus Groh
cbc4cf057d LibJS: Improve an alias name in ToSecondsStringPrecision
This is an editorial change in the Temporal spec.

See: b75bd9e
2022-06-15 17:49:20 +01:00
Linus Groh
4494be8cf2 LibJS: Inline call to AddISODate in ZonedDateTime.prototype.hoursInDay
This is an editorial change in the Temporal spec.

See: f034239
2022-06-15 17:49:20 +01:00
Linus Groh
810e9e32c9 LibJS: Remove RegulateISODate after BalanceISODate in AddISODate
This is an editorial change in the Temporal spec.

See: 32b22b1
2022-06-15 17:49:20 +01:00
Linus Groh
e96df3b7a7 LibJS: Leverage PrepareTemporalFields in ToTemporalTimeRecord
This is an editorial change in the Temporal spec.

See: b5ba981
2022-06-15 17:49:20 +01:00
Linus Groh
6cc69bbd8e LibJS: Rename ToPartialDuration to ToTemporalPartialDurationRecord
This is an editorial change in the Temporal spec.

See: 0509d41
2022-06-15 17:49:20 +01:00
Linus Groh
6982e53113 LibJS: Leverage ToPartialDuration in ToTemporalDurationRecord
This is an editorial change in the Temporal spec.

See: c3efde0
2022-06-15 17:49:20 +01:00
Linus Groh
9bcd88828f LibJS: Fold ToPartialTime into ToTemporalTimeRecord
This is an editorial change in the Temporal spec.

See: 58e476d
2022-06-15 17:49:20 +01:00
Linus Groh
3e6561c75f LibJS: Fold PreparePartialTemporalFields into PrepareTemporalFields
This is an editorial change in the Temporal spec.

See: 6ed1835
2022-06-15 17:49:20 +01:00
Linus Groh
631f270ac1 LibJS: Add missing conversion to integer values in Calendar AOs
This is an editorial change in the Temporal spec.

See: bfeb523
2022-06-15 17:49:20 +01:00
Linus Groh
03f48056d5 LibJS: Mark various uses of CreateTemporalTime as infallible
These are editorial changes in the Temporal spec.

See:
- dd35d5e
- 1ec6673
- 8c04e3b
- df7a802
- 5fc71ae
- ca305c6
2022-06-15 17:49:20 +01:00
Obinna Ikeh
3d99e83a86 LibJS: Update order of parameters in our is_less_than implementation
This change updates the parameter order of the is_less_than function
signature and calls to match accordingly with the spec
(https://tc39.es/ecma262/#sec-islessthan)
2022-06-13 17:37:11 -07:00
Linus Groh
698062b831 LibJS: Implement Array.prototype.with() 2022-06-13 20:26:54 +01:00
Linus Groh
ae81793f20 LibJS: Implement Array.prototype.toSpliced() 2022-06-13 20:26:54 +01:00
Linus Groh
ce17c868c0 LibJS: Implement Array.prototype.toSorted() 2022-06-13 20:26:54 +01:00
Linus Groh
e4370b7d82 LibJS: Implement Array.prototype.toReversed() 2022-06-13 20:26:54 +01:00
Linus Groh
e2a5a27302 LibJS: Implement the SortIndexedProperties AO
Also use it in array_merge_sort() instead of inlining the algorithm.
2022-06-13 20:26:54 +01:00
Linus Groh
5ddf0b0c99 LibJS: Implement the CompareArrayElements AO 2022-06-13 20:26:54 +01:00
Linus Groh
aa5d5bf1c8 LibJS: Remove redundant VM& parameter from array_merge_sort()
This is covered by GlobalObject& just fine.
2022-06-13 20:26:54 +01:00
Linus Groh
105c516a78 LibJS: Make array_merge_sort() public 2022-06-13 20:26:54 +01:00
Linus Groh
a4d0a6e1c1 LibJS: Update Array.prototype.group{,ToMap} spec URLs
This is an editorial change in the Array Grouping spec.

See: c51cac5
2022-06-13 20:15:56 +01:00
Linus Groh
013e2df858 LibJS: Rename Array.prototype.groupBy{,ToMap} => group{,ToMap}
This is a normative change in the Array Grouping spec.

See: 0cf4077
2022-06-13 20:05:24 +01:00
Matthias Zimmerman
c10d48b72c AK/ByteBuffer+Everywhere: Handle errors in ByteBuffer::slice() 2022-06-13 15:38:51 +01:00
Luke Wilde
125a71d36d LibJS/Bytecode: Define named functions as a variable inside their scope
This allows you to recurse into a named function that is stored in a
variable. For example, this would previously print "wrong" instead of
"right":
```js
function g() { console.log("wrong") }
f = function g(i) { if (i !== 1) g(1); else console.log("right"); }
f()
```
2022-06-13 07:13:03 +04:30
Luke Wilde
9ad807d08b LibJS/Bytecode: Pass contains_direct_call_to_eval into ESFO::create
Previously it would pass in `is_arrow_function` as
`contains_direct_call_to_eval`, which broke strict mode propagation in
arrow functions. This makes test-js work without falling apart because
`this` is mysteriously undefined because of the use of arrow functions
inside classes, which are strict mode by default.
2022-06-13 07:13:03 +04:30
Luke Wilde
77f88d00e0 LibJS/Bytecode: Make return; return undefined
Previously it would return whatever was in the accumulator.
2022-06-13 07:13:03 +04:30
Luke Wilde
482a827346 LibJS/Bytecode: Make typeof return "undefined" on unresolvable IDs
Previously it would throw instead of returning "undefined" for
`typeof Identifier` if Identifier does not exist.
2022-06-13 07:13:03 +04:30
Luke Wilde
c0fadfb9b7 LibJS/Bytecode: Implement break/continue labels
This is done by keeping track of all the labels that apply to a given
break/continue scope alongside their bytecode target. When a
break/continue with a label is generated, we scan from the most inner
scope to the most outer scope looking for the label, performing any
necessary unwinds on the way. Once the label is found, it is then
jumped to.
2022-06-13 07:13:03 +04:30
Linus Groh
4c77575ec5 LibJS: Simplify Temporal unit AOs
This is an editorial change in the Temporal spec.

See: 1b3d018
2022-06-10 12:39:11 +02:00
Linus Groh
b9beb2b120 LibJS: Remove unnecessary ToLimitedTemporalDuration AO
This is an editorial change in the Temporal spec.

See: c6571f4
2022-06-10 12:39:11 +02:00
Linus Groh
237f537b5c LibJS: Align DifferenceTemporalInstant with similar AOs
This is an editorial change in the Temporal spec.

See: cf9118b
2022-06-10 12:39:11 +02:00
Linus Groh
3bb94dd62e LibJS: Refactor Temporal parse AOs
This is an editorial change in the Temporal spec.

See: 7fe29eb
2022-06-10 12:39:11 +02:00
Linus Groh
86e22abd76 LibJS: Rename DefaultMergeFields to DefaultMergeCalendarFields
This is an editorial change in the Temporal spec.

See: 0ee80b2
2022-06-10 12:39:11 +02:00
Linus Groh
125530c71d LibJS: Mark a call of CreateTemporalDate as infallible
This is an editorial change in the Temporal spec.

See: c403d3f
2022-06-10 12:39:11 +02:00
stelar7
771e3b9868 LibJS: Stub out String.prototype.normalize 2022-06-02 23:04:27 +01:00
Linus Groh
9400b76d79 LibJS: Remove assertions replaced with structured headers
This is an editorial change in the Temporal spec.

See: 74fd5e8
2022-05-25 00:25:23 +01:00
Linus Groh
c3f1d8f5ba LibJS: Correct section IDs of Temporal .prototype property clauses
This is an editorial change in the Temporal spec.

See: e4eb181
2022-05-25 00:25:23 +01:00
Linus Groh
ae1fdf299d LibJS: Use the rounding abstract operations from Intl.NumberFormat V3
This is an editorial change in the Temporal spec.

See: 75279e5

Co-Authored-By: Idan Horowitz <idan.horowitz@gmail.com>
2022-05-25 00:25:23 +01:00
Linus Groh
93a20b3bfb LibJS: Use default argument of CalendarDateFromFields
This is an editorial change in the Temporal spec.

See: 7a4a518
2022-05-25 00:25:23 +01:00
Linus Groh
cf1ea18b7f LibJS: Align DifferenceTemporalPlainTime with other Difference* AOs
This is an editorial change in the Temporal spec.

See: 70f739d
2022-05-25 00:25:23 +01:00
Linus Groh
89d4094709 LibJS: Mark concrete method calls of Environment Records with ?/!
This is an editorial change in the ECMA-262 spec.

See: 7ae3ecf
2022-05-25 00:25:23 +01:00