1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:57:34 +00:00

LibJS: Replace GlobalObject with VM in Temporal AOs [Part 2/19]

This commit is contained in:
Linus Groh 2022-08-20 08:52:42 +01:00
parent f9705eb2f4
commit 694f66b5ca
58 changed files with 1564 additions and 1600 deletions

View file

@ -41,15 +41,15 @@ static auto const ns_max_instant = "8640000000000000000000"_sbigint;
static auto const ns_min_instant = "-8640000000000000000000"_sbigint;
bool is_valid_epoch_nanoseconds(BigInt const& epoch_nanoseconds);
ThrowCompletionOr<Instant*> create_temporal_instant(GlobalObject&, BigInt const& nanoseconds, FunctionObject const* new_target = nullptr);
ThrowCompletionOr<Instant*> to_temporal_instant(GlobalObject&, Value item);
ThrowCompletionOr<BigInt*> parse_temporal_instant(GlobalObject&, String const& iso_string);
ThrowCompletionOr<Instant*> create_temporal_instant(VM&, BigInt const& nanoseconds, FunctionObject const* new_target = nullptr);
ThrowCompletionOr<Instant*> to_temporal_instant(VM&, Value item);
ThrowCompletionOr<BigInt*> parse_temporal_instant(VM&, String const& iso_string);
i32 compare_epoch_nanoseconds(BigInt const&, BigInt const&);
ThrowCompletionOr<BigInt*> add_instant(GlobalObject&, BigInt const& epoch_nanoseconds, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds);
BigInt* difference_instant(GlobalObject&, BigInt const& nanoseconds1, BigInt const& nanoseconds2, u64 rounding_increment, StringView smallest_unit, StringView rounding_mode);
BigInt* round_temporal_instant(GlobalObject&, BigInt const& nanoseconds, u64 increment, StringView unit, StringView rounding_mode);
ThrowCompletionOr<String> temporal_instant_to_string(GlobalObject&, Instant&, Value time_zone, Variant<StringView, u8> const& precision);
ThrowCompletionOr<Duration*> difference_temporal_instant(GlobalObject&, DifferenceOperation, Instant const&, Value other, Value options);
ThrowCompletionOr<Instant*> add_duration_to_or_subtract_duration_from_instant(GlobalObject&, ArithmeticOperation, Instant const&, Value temporal_duration_like);
ThrowCompletionOr<BigInt*> add_instant(VM&, BigInt const& epoch_nanoseconds, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds);
BigInt* difference_instant(VM&, BigInt const& nanoseconds1, BigInt const& nanoseconds2, u64 rounding_increment, StringView smallest_unit, StringView rounding_mode);
BigInt* round_temporal_instant(VM&, BigInt const& nanoseconds, u64 increment, StringView unit, StringView rounding_mode);
ThrowCompletionOr<String> temporal_instant_to_string(VM&, Instant&, Value time_zone, Variant<StringView, u8> const& precision);
ThrowCompletionOr<Duration*> difference_temporal_instant(VM&, DifferenceOperation, Instant const&, Value other, Value options);
ThrowCompletionOr<Instant*> add_duration_to_or_subtract_duration_from_instant(VM&, ArithmeticOperation, Instant const&, Value temporal_duration_like);
}