1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:28:11 +00:00
Commit graph

2483 commits

Author SHA1 Message Date
Linus Groh
2cbcb99ec7 LibJS: Update spec comment in parse_temporal_time_zone_string()
This is a normative change in the Temporal spec.

See: 19b693c
2021-10-30 23:15:18 +02:00
Linus Groh
a7cb042ca8 LibJS: Fix format_time_zone_offset_string() for negative offsets
This is a normative change in the Temporal spec.

See: ec43be3
2021-10-30 23:14:50 +02:00
Linus Groh
5da8ae0020 LibJS: Update parse_temporal_time_zone_string() substring bounds
This is a normative change in the Temporal spec.

See: 73b9fe3
2021-10-30 23:14:43 +02:00
Linus Groh
92fdae178b LibJS: Implement Temporal.TimeZone.prototype.getPreviousTransition() 2021-10-30 16:32:20 +02:00
Linus Groh
e9cbeeac45 LibJS: Implement Temporal.TimeZone.prototype.getNextTransition() 2021-10-30 16:32:20 +02:00
Linus Groh
5fde02184d LibJS: Implement Temporal.TimeZone.prototype.getPossibleInstantsFor() 2021-10-30 16:32:20 +02:00
Linus Groh
82792a6815 LibJS: Mark single argument BigInt() constructor as 'explicit' 2021-10-30 16:32:20 +02:00
Linus Groh
de2e95b278 LibJS: Ensure make_day()'s temporary Core::DateTime is treated as UTC
DateTime::create() and subsequently DateTime::set_time() uses mktime()
internally to ensure out-of-range input values still result in a valid
date (Jan 32 -> Feb 1 etc.).
This however also means that the input is treated as local time, and
then shifted to UTC accordingly for the returned time_t - it is however
already in UTC in this case! The temporary solution is simply to set the
"TZ" environment variable to "UTC" and back after create(). The proper
solution is probably to have better timezone support in Core::DateTime.
This should only affect Lagom, as serenity itself has no timezone
support yet and always assumes UTC.
2021-10-30 10:15:49 +02:00
Linus Groh
28a9a248d6 LibJS: Fix off-by-one in make_day()'s temporary Core::DateTime
Just like in the previous commit, the day value of Core::DateTime is
one-based, not zero based.
Noticed while implementing a new Temporal function, this likely would've
been caught earlier if we'd also use it for the Date API (we don't).
2021-10-30 10:15:49 +02:00
Idan Horowitz
040e29c7b9 LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
658056233e LibJS: Convert GeneratorObjectPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7b5ccbc5ed LibJS: Convert ProxyConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
92bd64cb56 LibJS: Convert the ProxyCreate AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
84681788c4 LibJS: Convert FinalizationRegistryPrototype funcs to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
909e13c5e6 LibJS: Convert WeakSetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
56e14ba09f LibJS: Convert WeakMapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
f1e215ea3e LibJS: Convert MapIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
dab0a92c19 LibJS: Convert MapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
8ff152ec5c LibJS: Convert MapConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
23ea1f1a3e LibJS: Convert MathObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
b184e872e4 LibJS: Convert ReflectObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
4c3ea0bb91 LibJS: Convert StringIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
720bb21ee2 LibJS: Convert ArrayBufferPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
ffa58184d2 LibJS: Convert ArrayBufferConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
70cbd43718 LibJS: Convert DataViewPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
9d3348d8da LibJS: Convert the SetViewValue AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
fca05f835f LibJS: Convert the GetViewValue AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7f3fa7d7e0 LibJS: Convert NumberPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
2c6955462e LibJS: Convert NumberConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
08fb31087b LibJS: Convert BooleanPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
2a0c51149d LibJS: Convert FunctionPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
c0bb456fd2 LibJS: Convert the CreateDynamicFunction AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
47f762ab42 LibJS: Convert ErrorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
c815519a65 LibJS: Convert WeakRefPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
719d1b48ac LibJS: Convert ArrayIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
d1d4ee699b LibJS: Convert ConsoleObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
e7a134a346 LibJS: Convert JSONObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
6b954b9e76 LibJS: Convert SetIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
d46d8c9016 LibJS: Convert SetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
c2e0753d8a LibJS: Convert SetConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7c96ed8cf3 LibJS: Convert SymbolPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
294f244745 LibJS: Convert SymbolConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
87ff51fa67 LibJS: Convert BigIntPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
4128f95903 LibJS: Convert BigIntConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Linus Groh
09d1db5afd LibJS: Clarify mathematical types in Temporal AOs and functions
This is an editorial change in the Temporal spec.

See: e480d40
2021-10-26 23:10:11 +02:00
Andreas Kling
5599d22744 LibJS: Support calling result of a computed MemberExpression in bytecode
This patch adds support for calls of the form o.f[expr]()
2021-10-25 16:05:04 +02:00
Andreas Kling
a2a8b97c11 LibJS: Simplify MemberExpression::generate_bytecode()
Use the get-from-reference helper in BytecodeGenerator.
2021-10-25 16:04:31 +02:00
Andreas Kling
72cd31d033 LibJS: Tweak Value::to_property_key() fast path for Int32
Move the check for Int32 *before* we call to_primitive().
2021-10-25 15:37:28 +02:00
Andreas Kling
cfbb69a9cd LibJS: Support more assignment expressions in the bytecode VM
Use the new reference get/put helpers in BytecodeGenerator to support
assignment expressions other than just plain assignment.
2021-10-25 15:29:52 +02:00
Andreas Kling
72736f9e93 LibJS: Generate bytecode for UpdateExpression with MemberExpression arg 2021-10-25 15:17:41 +02:00