Hendiadyoin1
ed46d52252
Everywhere: Use AK/Math.h if applicable
...
AK's version should see better inlining behaviors, than the LibM one.
We avoid mixed usage for now though.
Also clean up some stale math includes and improper floatingpoint usage.
2021-07-19 16:34:21 +04:30
Idan Horowitz
94322ea985
LibJS: Implement Temporal.PlainDate.prototype.calendar
2021-07-19 09:11:20 +01:00
Idan Horowitz
94e1324a67
LibJS: Implement Temporal.PlainDate.prototype[@@toStringTag]
2021-07-19 09:11:20 +01:00
Idan Horowitz
cc00ccec41
LibJS: Start implementing Temporal.PlainDate
...
This commit adds the PlainDate object itself, its constructor and
prototype (currently empty), and several required abstract operations.
2021-07-19 09:11:20 +01:00
Linus Groh
5516ad7158
LibJS: Rename Temporal.now => Temporal.Now
...
See:
- d0acb66
- 0097fdd
2021-07-19 00:59:26 +01:00
Linus Groh
d159938acc
LibJS: Reflect recent editorial changes in the Temporal proposal
...
See:
- 2148441
- 08c04cc
- b77da58
2021-07-19 00:59:26 +01:00
Linus Groh
5c77885873
LibJS: Implement Temporal.Duration.from()
...
...with ParseTemporalDurationString currently TODO()'d.
2021-07-19 00:34:28 +01:00
Linus Groh
7355c23e17
LibJS: Fix TemporalDurationLike property order
...
The table is sorted alphabetically and supposed to be iterated in that
oder. Also move this to a templated lambda for later re-use with
different target structs and value types.
2021-07-19 00:34:28 +01:00
Linus Groh
152251f5a7
LibJS: Move Temporal AO structs/enum classes above function declarations
...
This is a bit closer to our usual style, and tidier.
2021-07-19 00:34:28 +01:00
Ali Mohammad Pur
c85ab623c0
LibJS: Use a Utf8View on the subject if the regex has the unicode flag
...
This makes LibRegex behave (more) correctly with regards to matching
unicode code points.
2021-07-18 21:10:55 +04:30
Timothy Flynn
a2e734d202
LibJS: Report string length as the code point length, not byte length
...
For example, U+180E is 3 bytes, but should have a string length of 1.
2021-07-17 16:59:59 +01:00
Linus Groh
86c6e68431
LibJS: Implement Temporal.Duration.prototype.abs()
2021-07-16 21:59:13 +01:00
Linus Groh
7df47bf3fb
LibJS: Implement Temporal.Duration.prototype.negated()
2021-07-16 21:59:13 +01:00
Linus Groh
9aa1e4b885
LibJS: Implement Temporal.Duration.prototype.with()
2021-07-16 21:59:13 +01:00
Timothy Flynn
860417fb4f
LibJS: Ensure RegExpStringIterator keeps the RegExp matcher object alive
...
Fixes a crash found with 'test-js -g' due to this object going out of
scope.
2021-07-16 20:44:48 +02:00
Idan Horowitz
8d01d43f5e
LibJS: Replace the boolean argument of Object::set with an enum class
...
This is more serenity-esque and also makes pointing out missing
exception checks during reviews much easier.
2021-07-16 17:50:01 +01:00
Idan Horowitz
4b39e718b3
LibJS: Remove unused Object::PutOwnPropertyMode enum class
...
All usages of this enum class were removed in the Object rewrite, but
this enum was left behind.
2021-07-16 17:50:01 +01:00
Timothy Flynn
4812b95795
LibJS: Implement RegExp AdvanceStringIndex abstraction
...
This isn't particularly useful yet because the underlying LibRegex
engine doesn't support unicode matching yet. But the debt of FIXMEs
related to AdvanceStringIndex have added up, so let's get this out of
the way.
2021-07-16 13:53:11 +01:00
Timothy Flynn
5135f4000c
LibJS: Implement RegExp.prototype [ @@matchAll ]
...
This also allows String.prototype.matchAll to work, as all calls to that
method result in an invocation to @@matchAll.
2021-07-16 13:53:11 +01:00
Timothy Flynn
cfddcad7cf
LibJS: Implement the RegExpStringIterator object
...
This implementation closely follows the StringIterator object in that
the abstract closure meant to be created in CreateRegExpStringIterator
is instead unrolled into RegExpStringIterator.prototype.next.
2021-07-16 13:53:11 +01:00
Timothy Flynn
6cf64d0f09
LibJS: Make the RegExpExec abstraction publically available
...
For RegExpStringIterator, this will be needed outside of the RegExp
prototype.
2021-07-16 13:53:11 +01:00
Linus Groh
8daf35e1b1
LibJS: Implement Temporal.Duration.prototype.valueOf()
2021-07-16 01:07:01 +01:00
Linus Groh
a06b034a9a
LibJS: Implement Temporal.Duration.prototype.blank
2021-07-16 01:07:01 +01:00
Linus Groh
3713164fa3
LibJS: Implement Temporal.Duration.prototype.sign
2021-07-16 01:07:01 +01:00
Linus Groh
be5254dcac
LibJS: Implement Temporal.Duration.prototype.nanoseconds
2021-07-16 01:07:01 +01:00
Linus Groh
04e2d215a1
LibJS: Implement Temporal.Duration.prototype.microseconds
2021-07-16 01:07:01 +01:00
Linus Groh
db22f86055
LibJS: Implement Temporal.Duration.prototype.milliseconds
2021-07-16 01:07:01 +01:00
Linus Groh
b81331a110
LibJS: Implement Temporal.Duration.prototype.seconds
2021-07-16 01:07:01 +01:00
Linus Groh
dbdbfbeebc
LibJS: Implement Temporal.Duration.prototype.minutes
2021-07-16 01:07:01 +01:00
Linus Groh
067c2346ed
LibJS: Implement Temporal.Duration.prototype.hours
2021-07-16 01:07:01 +01:00
Linus Groh
2015640168
LibJS: Implement Temporal.Duration.prototype.days
2021-07-16 01:07:01 +01:00
Linus Groh
23d0c3494f
LibJS: Implement Temporal.Duration.prototype.weeks
2021-07-16 01:07:01 +01:00
Linus Groh
8011409428
LibJS: Implement Temporal.Duration.prototype.months
2021-07-16 01:07:01 +01:00
Linus Groh
300a22f9b9
LibJS: Implement Temporal.Duration.prototype.years
2021-07-16 01:07:01 +01:00
Linus Groh
23766f28db
LibJS: Implement Temporal.Duration.prototype[@@toStringTag]
2021-07-16 01:07:01 +01:00
Linus Groh
7921d8ba91
LibJS: Start implementing Temporal.Duration
...
This patch adds the Duration object itself, its constructor and
prototype (currently empty), and three required abstract operations.
2021-07-16 01:07:01 +01:00
Linus Groh
466c5bc96d
LibJS: Implement Temporal.Calendar.prototype.id
2021-07-14 23:50:03 +01:00
Linus Groh
3ee169d8e7
LibJS: Implement Temporal.Calendar.prototype.toJSON()
2021-07-14 23:50:03 +01:00
Linus Groh
83bbbbe567
LibJS: Implement Temporal.Calendar.prototype.toString()
2021-07-14 23:50:03 +01:00
Linus Groh
e01c6adab4
LibJS: Implement Temporal.Calendar.prototype[@@toStringTag]
2021-07-14 23:50:03 +01:00
Linus Groh
a2f1d79765
LibJS: Start implementing Temporal.Calendar
...
Just like the previous Temporal.{Instant,TimeZone} commits, this patch
adds the Calendar object itself, its constructor and prototype
(currently empty), and two required abstract operations.
2021-07-14 23:50:03 +01:00
Linus Groh
48b66c7a68
LibJS: Put Temporal.Instant.prototype member definitions in spec order
2021-07-14 23:50:03 +01:00
Linus Groh
6c8f0fbb35
LibJS: Use more specific return types for some Temporal AOs
...
Instead of returning Object* we should be specific and return Instant*,
TimeZone* etc.
2021-07-14 23:50:03 +01:00
Timothy Flynn
1a3e1bff7b
LibJS: Implement Atomics.isLockFree
2021-07-14 22:13:15 +01:00
Timothy Flynn
33eb830929
LibJS: Implement Atomics.compareExchange
2021-07-14 22:13:15 +01:00
Timothy Flynn
655ffce64d
LibJS: Implement Atomics.exchange
2021-07-14 22:13:15 +01:00
Timothy Flynn
6211eb0f9a
LibJS: Implement Atomics.store
2021-07-14 20:44:42 +01:00
Timothy Flynn
b6364ec899
LibJS: Implement Atomics.xor
2021-07-14 20:44:42 +01:00
Timothy Flynn
d2f6255b91
LibJS: Implement Atomics.sub
2021-07-14 20:44:42 +01:00
Timothy Flynn
f9d8e234b2
LibJS: Implement Atomics.or
2021-07-14 20:44:42 +01:00