summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp10
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimeConstructor.cpp2
19 files changed, 36 insertions, 36 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
index d015cffca8..410bcde89b 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
@@ -834,7 +834,7 @@ StringView larger_of_two_temporal_units(StringView unit1, StringView unit2)
}
// 13.23 MergeLargestUnitOption ( options, largestUnit ), https://tc39.es/proposal-temporal/#sec-temporal-mergelargestunitoption
-ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject& global_object, Object* options, String largest_unit)
+ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject& global_object, Object const* options, String largest_unit)
{
auto& vm = global_object.vm();
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h
index c1fe33fb35..1575909caa 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h
@@ -119,7 +119,7 @@ ThrowCompletionOr<String> to_temporal_duration_total_unit(GlobalObject& global_o
ThrowCompletionOr<Value> to_relative_temporal_object(GlobalObject&, Object const& options);
ThrowCompletionOr<void> validate_temporal_unit_range(GlobalObject&, StringView largest_unit, StringView smallest_unit);
StringView larger_of_two_temporal_units(StringView, StringView);
-ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject&, Object* options, String largest_unit);
+ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject&, Object const* options, String largest_unit);
Optional<u16> maximum_temporal_duration_rounding_increment(StringView unit);
ThrowCompletionOr<void> reject_object_with_calendar_or_time_zone(GlobalObject&, Object&);
String format_seconds_string_part(u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, Variant<StringView, u8> const& precision);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
index 67cad35cb4..7f7f2b0594 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
@@ -90,7 +90,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_from_fields)
return vm.throw_completion<TypeError>(global_object, ErrorType::NotAnObject, fields.to_string_without_side_effects());
// 5. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 6. Let result be ? ISODateFromFields(fields, options).
auto result = TRY(iso_date_from_fields(global_object, fields.as_object(), *options));
@@ -116,7 +116,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields)
return vm.throw_completion<TypeError>(global_object, ErrorType::NotAnObject, fields.to_string_without_side_effects());
// 5. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 6. Let result be ? ISOYearMonthFromFields(fields, options).
auto result = TRY(iso_year_month_from_fields(global_object, fields.as_object(), *options));
@@ -142,7 +142,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields)
return vm.throw_completion<TypeError>(global_object, ErrorType::NotAnObject, fields.to_string_without_side_effects());
// 5. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 6. Let result be ? ISOMonthDayFromFields(fields, options).
auto result = TRY(iso_month_day_from_fields(global_object, fields.as_object(), *options));
@@ -169,7 +169,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_add)
auto* duration = TRY(to_temporal_duration(global_object, vm.argument(1)));
// 6. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(2)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(2)));
// 7. Let overflow be ? ToTemporalOverflow(options).
auto overflow = TRY(to_temporal_overflow(global_object, options));
@@ -203,7 +203,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_until)
auto* two = TRY(to_temporal_date(global_object, vm.argument(1)));
// 6. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(2)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(2)));
// 7. Let largestUnit be ? ToLargestTemporalUnit(options, « "hour", "minute", "second", "millisecond", "microsecond", "nanosecond" », "auto", "day").
auto largest_unit = TRY(to_largest_temporal_unit(global_object, *options, { "hour"sv, "minute"sv, "second"sv, "millisecond"sv, "microsecond"sv, "nanosecond"sv }, "auto"sv, "day"sv));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp
index 1d8a9be0db..607abd6d06 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp
@@ -112,7 +112,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationConstructor::compare)
auto* two = TRY(to_temporal_duration(global_object, vm.argument(1)));
// 3. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(2)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(2)));
// 4. Let relativeTo be ? ToRelativeTemporalObject(options).
auto relative_to = TRY(to_relative_temporal_object(global_object, *options));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp
index 164a118b9f..57a00521aa 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp
@@ -302,7 +302,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::add)
auto other = TRY(to_temporal_duration_record(global_object, vm.argument(0)));
// 4. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 5. Let relativeTo be ? ToRelativeTemporalObject(options).
auto relative_to = TRY(to_relative_temporal_object(global_object, *options));
@@ -325,7 +325,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::subtract)
auto other = TRY(to_temporal_duration_record(global_object, vm.argument(0)));
// 4. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 5. Let relativeTo be ? ToRelativeTemporalObject(options).
auto relative_to = TRY(to_relative_temporal_object(global_object, *options));
@@ -583,7 +583,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::to_string)
auto* duration = TRY(typed_this_object(global_object));
// 3. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(0)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(0)));
// 4. Let precision be ? ToSecondsStringPrecision(options).
auto precision = TRY(to_seconds_string_precision(global_object, *options));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp
index ccd6571d68..66cd9227d7 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp
@@ -166,7 +166,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::until)
auto* other = TRY(to_temporal_instant(global_object, vm.argument(0)));
// 4. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 5. Let smallestUnit be ? ToSmallestTemporalUnit(options, « "year", "month", "week", "day" », "nanosecond").
auto smallest_unit = TRY(to_smallest_temporal_unit(global_object, *options, { "year"sv, "month"sv, "week"sv, "day"sv }, "nanosecond"sv));
@@ -210,7 +210,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::since)
auto* other = TRY(to_temporal_instant(global_object, vm.argument(0)));
// 4. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 5. Let smallestUnit be ? ToSmallestTemporalUnit(options, « "year", "month", "week", "day" », "nanosecond").
auto smallest_unit = TRY(to_smallest_temporal_unit(global_object, *options, { "year"sv, "month"sv, "week"sv, "day"sv }, "nanosecond"sv));
@@ -357,7 +357,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_string)
auto* instant = TRY(typed_this_object(global_object));
// 3. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(0)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(0)));
// 4. Let timeZone be ? Get(options, "timeZone").
auto time_zone = TRY(options->get(vm.names.timeZone));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp
index 0c64f7c2b7..25912f4dbf 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp
@@ -69,7 +69,7 @@ ThrowCompletionOr<PlainDate*> create_temporal_date(GlobalObject& global_object,
}
// 3.5.2 ToTemporalDate ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-totemporaldate
-ThrowCompletionOr<PlainDate*> to_temporal_date(GlobalObject& global_object, Value item, Object* options)
+ThrowCompletionOr<PlainDate*> to_temporal_date(GlobalObject& global_object, Value item, Object const* options)
{
auto& vm = global_object.vm();
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.h
index 8b3095b4b6..383bca9a83 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.h
@@ -43,7 +43,7 @@ struct ISODate {
};
ThrowCompletionOr<PlainDate*> create_temporal_date(GlobalObject&, i32 iso_year, u8 iso_month, u8 iso_day, Object& calendar, FunctionObject const* new_target = nullptr);
-ThrowCompletionOr<PlainDate*> to_temporal_date(GlobalObject&, Value item, Object* options = nullptr);
+ThrowCompletionOr<PlainDate*> to_temporal_date(GlobalObject&, Value item, Object const* options = nullptr);
DateDurationRecord difference_iso_date(GlobalObject&, i32 year1, u8 month1, u8 day1, i32 year2, u8 month2, u8 day2, StringView largest_unit);
ThrowCompletionOr<ISODate> regulate_iso_date(GlobalObject&, double year, double month, double day, StringView overflow);
bool is_valid_iso_date(i32 year, u8 month, u8 day);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp
index 2c7bab9210..9439e7758e 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp
@@ -77,7 +77,7 @@ ThrowCompletionOr<Object*> PlainDateConstructor::construct(FunctionObject& new_t
JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from)
{
// 1. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
auto item = vm.argument(0);
// 2. If Type(item) is Object and item has an [[InitializedTemporalDate]] internal slot, then
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
index 9286a89123..9634e62608 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
@@ -407,7 +407,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with)
auto* partial_date = TRY(prepare_partial_temporal_fields(global_object, temporal_date_like.as_object(), field_names));
// 8. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 9. Let fields be ? PrepareTemporalFields(temporalDate, fieldNames, «»).
auto* fields = TRY(prepare_temporal_fields(global_object, *temporal_date, field_names, {}));
@@ -453,7 +453,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::until)
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalDifferentCalendars);
// 5. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 6. Let disallowedUnits be « "hour", "minute", "second", "millisecond", "microsecond", "nanosecond" ».
Vector<StringView> disallowed_units { "hour"sv, "minute"sv, "second"sv, "millisecond"sv, "microsecond"sv, "nanosecond"sv };
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp
index 5607db14dd..9be652ee39 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp
@@ -102,7 +102,7 @@ bool iso_date_time_within_limits(GlobalObject& global_object, i32 year, u8 month
}
// 5.5.3 InterpretTemporalDateTimeFields ( calendar, fields, options ), https://tc39.es/proposal-temporal/#sec-temporal-interprettemporaldatetimefields
-ThrowCompletionOr<ISODateTime> interpret_temporal_date_time_fields(GlobalObject& global_object, Object& calendar, Object& fields, Object& options)
+ThrowCompletionOr<ISODateTime> interpret_temporal_date_time_fields(GlobalObject& global_object, Object& calendar, Object& fields, Object const& options)
{
// 1. Let timeResult be ? ToTemporalTimeRecord(fields).
auto unregulated_time_result = TRY(to_temporal_time_record(global_object, fields));
@@ -131,7 +131,7 @@ ThrowCompletionOr<ISODateTime> interpret_temporal_date_time_fields(GlobalObject&
}
// 5.5.4 ToTemporalDateTime ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-totemporaldatetime
-ThrowCompletionOr<PlainDateTime*> to_temporal_date_time(GlobalObject& global_object, Value item, Object* options)
+ThrowCompletionOr<PlainDateTime*> to_temporal_date_time(GlobalObject& global_object, Value item, Object const* options)
{
auto& vm = global_object.vm();
@@ -350,7 +350,7 @@ ISODateTime round_iso_date_time(i32 year, u8 month, u8 day, u8 hour, u8 minute,
}
// 5.5.11 DifferenceISODateTime ( y1, mon1, d1, h1, min1, s1, ms1, mus1, ns1, y2, mon2, d2, h2, min2, s2, ms2, mus2, ns2, calendar, largestUnit [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-differenceisodatetime
-ThrowCompletionOr<DurationRecord> difference_iso_date_time(GlobalObject& global_object, i32 year1, u8 month1, u8 day1, u8 hour1, u8 minute1, u8 second1, u16 millisecond1, u16 microsecond1, u16 nanosecond1, i32 year2, u8 month2, u8 day2, u8 hour2, u8 minute2, u8 second2, u16 millisecond2, u16 microsecond2, u16 nanosecond2, Object& calendar, StringView largest_unit, Object* options)
+ThrowCompletionOr<DurationRecord> difference_iso_date_time(GlobalObject& global_object, i32 year1, u8 month1, u8 day1, u8 hour1, u8 minute1, u8 second1, u16 millisecond1, u16 microsecond1, u16 nanosecond1, i32 year2, u8 month2, u8 day2, u8 hour2, u8 minute2, u8 second2, u16 millisecond2, u16 microsecond2, u16 nanosecond2, Object& calendar, StringView largest_unit, Object const* options)
{
// 1. If options is not present, set options to undefined.
// 2. Assert: Type(options) is Object or Undefined.
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.h
index 46b764ef74..072be07103 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.h
@@ -65,14 +65,14 @@ struct TemporalPlainDateTime {
BigInt* get_epoch_from_iso_parts(GlobalObject&, i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond);
bool iso_date_time_within_limits(GlobalObject&, i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond);
-ThrowCompletionOr<ISODateTime> interpret_temporal_date_time_fields(GlobalObject&, Object& calendar, Object& fields, Object& options);
-ThrowCompletionOr<PlainDateTime*> to_temporal_date_time(GlobalObject&, Value item, Object* options = nullptr);
+ThrowCompletionOr<ISODateTime> interpret_temporal_date_time_fields(GlobalObject&, Object& calendar, Object& fields, Object const& options);
+ThrowCompletionOr<PlainDateTime*> to_temporal_date_time(GlobalObject&, Value item, Object const* options = nullptr);
ISODateTime balance_iso_date_time(i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, i64 nanosecond);
ThrowCompletionOr<PlainDateTime*> create_temporal_date_time(GlobalObject&, i32 iso_year, u8 iso_month, u8 iso_day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, Object& calendar, FunctionObject const* new_target = nullptr);
ThrowCompletionOr<String> temporal_date_time_to_string(GlobalObject&, i32 iso_year, u8 iso_month, u8 iso_day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, Value calendar, Variant<StringView, u8> const& precision, StringView show_calendar);
i8 compare_iso_date_time(i32 year1, u8 month1, u8 day1, u8 hour1, u8 minute1, u8 second1, u16 millisecond1, u16 microsecond1, u16 nanosecond1, i32 year2, u8 month2, u8 day2, u8 hour2, u8 minute2, u8 second2, u16 millisecond2, u16 microsecond2, u16 nanosecond2);
ThrowCompletionOr<TemporalPlainDateTime> add_date_time(GlobalObject&, i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, Object& calendar, double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds, Object* options);
ISODateTime round_iso_date_time(i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, u64 increment, StringView unit, StringView rounding_mode, Optional<double> day_length = {});
-ThrowCompletionOr<DurationRecord> difference_iso_date_time(GlobalObject&, i32 year1, u8 month1, u8 day1, u8 hour1, u8 minute1, u8 second1, u16 millisecond1, u16 microsecond1, u16 nanosecond1, i32 year2, u8 month2, u8 day2, u8 hour2, u8 minute2, u8 second2, u16 millisecond2, u16 microsecond2, u16 nanosecond2, Object& calendar, StringView largest_unit, Object* options = nullptr);
+ThrowCompletionOr<DurationRecord> difference_iso_date_time(GlobalObject&, i32 year1, u8 month1, u8 day1, u8 hour1, u8 minute1, u8 second1, u16 millisecond1, u16 microsecond1, u16 nanosecond1, i32 year2, u8 month2, u8 day2, u8 hour2, u8 minute2, u8 second2, u16 millisecond2, u16 microsecond2, u16 nanosecond2, Object& calendar, StringView largest_unit, Object const* options = nullptr);
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
index e5f6b21e4b..8d2bef5034 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
@@ -525,7 +525,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::until)
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalDifferentCalendars);
// 5. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 6. Let smallestUnit be ? ToSmallestTemporalUnit(options, « », "nanosecond").
auto smallest_unit = TRY(to_smallest_temporal_unit(global_object, *options, {}, "nanosecond"sv));
@@ -579,7 +579,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::since)
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalDifferentCalendars);
// 5. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 6. Let smallestUnit be ? ToSmallestTemporalUnit(options, « », "nanosecond").
auto smallest_unit = TRY(to_smallest_temporal_unit(global_object, *options, {}, "nanosecond"sv));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp
index 91df5cfe80..0dae133372 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp
@@ -88,7 +88,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayConstructor::from)
auto item = vm.argument(0);
// 1. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
// 2. If Type(item) is Object and item has an [[InitializedTemporalMonthDay]] internal slot, then
if (item.is_object() && is<PlainMonthDay>(item.as_object())) {
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp
index d84419fbcf..3bae3796f9 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp
@@ -31,7 +31,7 @@ void PlainYearMonth::visit_edges(Visitor& visitor)
}
// 9.5.1 ToTemporalYearMonth ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-totemporalyearmonth
-ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_object, Value item, Object* options)
+ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_object, Value item, Object const* options)
{
auto& vm = global_object.vm();
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.h
index 9835c4dc34..77197f99bb 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
+ * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -39,7 +39,7 @@ struct ISOYearMonth {
u8 reference_iso_day;
};
-ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_object, Value item, Object* options = nullptr);
+ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_object, Value item, Object const* options = nullptr);
ThrowCompletionOr<ISOYearMonth> regulate_iso_year_month(GlobalObject&, double year, double month, StringView overflow);
bool is_valid_iso_month(u8 month);
bool iso_year_month_within_limits(i32 year, u8 month);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp
index 80fd7391ed..60bb3e0cd7 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp
@@ -114,7 +114,7 @@ ThrowCompletionOr<BigInt const*> interpret_iso_date_time_offset(GlobalObject& gl
}
// 6.5.2 ToTemporalZonedDateTime ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-totemporalzoneddatetime
-ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject& global_object, Value item, Object* options)
+ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject& global_object, Value item, Object const* options)
{
auto& vm = global_object.vm();
@@ -401,7 +401,7 @@ ThrowCompletionOr<BigInt*> add_zoned_date_time(GlobalObject& global_object, BigI
}
// 6.5.6 DifferenceZonedDateTime ( ns1, ns2, timeZone, calendar, largestUnit [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-differencezoneddatetime
-ThrowCompletionOr<DurationRecord> difference_zoned_date_time(GlobalObject& global_object, BigInt const& nanoseconds1, BigInt const& nanoseconds2, Object& time_zone, Object& calendar, StringView largest_unit, Object* options)
+ThrowCompletionOr<DurationRecord> difference_zoned_date_time(GlobalObject& global_object, BigInt const& nanoseconds1, BigInt const& nanoseconds2, Object& time_zone, Object& calendar, StringView largest_unit, Object const* options)
{
// 1. Assert: Type(ns1) is BigInt.
// 2. Assert: Type(ns2) is BigInt.
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.h b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.h
index 4f8d32fd69..e68c9f9d77 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.h
@@ -51,11 +51,11 @@ enum class MatchBehavior {
};
ThrowCompletionOr<BigInt const*> interpret_iso_date_time_offset(GlobalObject&, i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, OffsetBehavior offset_behavior, double offset_nanoseconds, Value time_zone, StringView disambiguation, StringView offset_option, MatchBehavior match_behavior);
-ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject&, Value item, Object* options = nullptr);
+ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject&, Value item, Object const* options = nullptr);
ThrowCompletionOr<ZonedDateTime*> create_temporal_zoned_date_time(GlobalObject&, BigInt const& epoch_nanoseconds, Object& time_zone, Object& calendar, FunctionObject const* new_target = nullptr);
ThrowCompletionOr<String> temporal_zoned_date_time_to_string(GlobalObject&, ZonedDateTime& zoned_date_time, Variant<StringView, u8> const& precision, StringView show_calendar, StringView show_time_zone, StringView show_offset, Optional<u64> increment = {}, Optional<StringView> unit = {}, Optional<StringView> rounding_mode = {});
ThrowCompletionOr<BigInt*> add_zoned_date_time(GlobalObject&, BigInt const& epoch_nanoseconds, Value time_zone, Object& calendar, double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds, Object* options = nullptr);
-ThrowCompletionOr<DurationRecord> difference_zoned_date_time(GlobalObject&, BigInt const& nanoseconds1, BigInt const& nanoseconds2, Object& time_zone, Object& calendar, StringView largest_unit, Object* options = nullptr);
+ThrowCompletionOr<DurationRecord> difference_zoned_date_time(GlobalObject&, BigInt const& nanoseconds1, BigInt const& nanoseconds2, Object& time_zone, Object& calendar, StringView largest_unit, Object const* options = nullptr);
ThrowCompletionOr<NanosecondsToDaysResult> nanoseconds_to_days(GlobalObject&, Crypto::SignedBigInteger nanoseconds, Value relative_to);
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimeConstructor.cpp
index 64f16cb0d4..1223a064b7 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimeConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimeConstructor.cpp
@@ -74,7 +74,7 @@ ThrowCompletionOr<Object*> ZonedDateTimeConstructor::construct(FunctionObject& n
JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimeConstructor::from)
{
// 1. Set options to ? GetOptionsObject(options).
- auto* options = TRY(get_options_object(global_object, vm.argument(1)));
+ auto const* options = TRY(get_options_object(global_object, vm.argument(1)));
auto item = vm.argument(0);