diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal')
40 files changed, 446 insertions, 446 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp index de4e7af2e5..413ae468be 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp @@ -63,7 +63,7 @@ Value CalendarConstructor::construct(FunctionObject& new_target) } // 12.3.2 Temporal.Calendar.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.from -JS_DEFINE_NATIVE_FUNCTION(CalendarConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarConstructor::from) { auto item = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h index 64fcbb69be..10ae604691 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h @@ -24,7 +24,7 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp index 41796a7189..81f7588df3 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp @@ -63,7 +63,7 @@ void CalendarPrototype::initialize(GlobalObject& global_object) } // 12.4.3 get Temporal.Calendar.prototype.id, https://tc39.es/proposal-temporal/#sec-get-temporal.calendar.prototype.id -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::id_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::id_getter) { // 1. Let calendar be the this value. auto calendar = vm.this_value(global_object); @@ -74,7 +74,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::id_getter) // 12.4.4 Temporal.Calendar.prototype.dateFromFields ( fields [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.datefromfields // NOTE: This is the minimum dateFromFields implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_from_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::date_from_fields) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -102,7 +102,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_from_fields) // 12.4.5 Temporal.Calendar.prototype.yearMonthFromFields ( fields [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.yearmonthfromfields // NOTE: This is the minimum yearMonthFromFields implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -130,7 +130,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields) // 12.4.6 Temporal.Calendar.prototype.monthDayFromFields ( fields [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthdayfromfields // NOTE: This is the minimum monthDayFromFields implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields) // 12.4.7 Temporal.Calendar.prototype.dateAdd ( date, duration [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dateadd // NOTE: This is the minimum dateAdd implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_add) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::date_add) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -194,7 +194,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_add) // 12.4.8 Temporal.Calendar.prototype.dateUntil ( one, two [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dateuntil // NOTE: This is the minimum dateUntil implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_until) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::date_until) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -224,7 +224,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_until) // 12.4.9 Temporal.Calendar.prototype.year ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.year // NOTE: This is the minimum year implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::year) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -246,7 +246,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year) // 12.4.10 Temporal.Calendar.prototype.month ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.month // NOTE: This is the minimum month implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::month) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -276,7 +276,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month) // 12.4.11 Temporal.Calendar.prototype.monthCode ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthcode // NOTE: This is the minimum monthCode implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_code) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::month_code) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -298,7 +298,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_code) // 12.4.12 Temporal.Calendar.prototype.day ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.day // NOTE: This is the minimum day implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::day) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -320,7 +320,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day) // 12.4.13 Temporal.Calendar.prototype.dayOfWeek ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dayofweek // NOTE: This is the minimum dayOfWeek implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_week) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::day_of_week) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -338,7 +338,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_week) // 12.4.14 Temporal.Calendar.prototype.dayOfYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dayofyear // NOTE: This is the minimum dayOfYear implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::day_of_year) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -356,7 +356,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_year) // 12.4.15 Temporal.Calendar.prototype.weekOfYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.weekofyear // NOTE: This is the minimum weekOfYear implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::week_of_year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::week_of_year) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -374,7 +374,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::week_of_year) // 12.4.16 Temporal.Calendar.prototype.daysInWeek ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinweek // NOTE: This is the minimum daysInWeek implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_week) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::days_in_week) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -392,7 +392,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_week) // 12.4.16 Temporal.Calendar.prototype.daysInMonth ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinweek // NOTE: This is the minimum daysInMonth implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_month) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::days_in_month) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -414,7 +414,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_month) // 12.4.18 Temporal.Calendar.prototype.daysInYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinyear // NOTE: This is the minimum daysInYear implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::days_in_year) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -436,7 +436,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_year) // 12.4.19 Temporal.Calendar.prototype.monthsInYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthsinyear // NOTE: This is the minimum monthsInYear implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::months_in_year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::months_in_year) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -458,7 +458,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::months_in_year) // 12.4.20 Temporal.Calendar.prototype.inLeapYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.inleapyear // NOTE: This is the minimum inLeapYear implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::in_leap_year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::in_leap_year) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -480,7 +480,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::in_leap_year) // 12.4.21 Temporal.Calendar.prototype.fields ( fields ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields // NOTE: This is the minimum fields implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::fields) { auto fields = vm.argument(0); @@ -556,7 +556,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::fields) // 12.4.22 Temporal.Calendar.prototype.mergeFields ( fields, additionalFields ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.mergefields // NOTE: This is the minimum mergeFields implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::merge_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::merge_fields) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -576,7 +576,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::merge_fields) } // 12.4.23 Temporal.Calendar.prototype.toString ( ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::to_string) { // 1. Let calendar be the this value. // 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). @@ -587,7 +587,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_string) } // 12.4.24 Temporal.Calendar.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::to_json) { // 1. Let calendar be the this value. auto calendar = vm.this_value(global_object); @@ -597,7 +597,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_json) } // 15.6.2.6 Temporal.Calendar.prototype.era ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.era -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::era) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::era) { auto temporal_date_like = vm.argument(0); @@ -625,7 +625,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::era) } // 15.6.2.7 Temporal.Calendar.prototype.eraYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.erayear -JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::era_year) +JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::era_year) { auto temporal_date_like = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h index 4c32e4a7d6..123c83315e 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h @@ -20,30 +20,30 @@ public: virtual ~CalendarPrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(id_getter); - JS_DECLARE_NATIVE_FUNCTION(date_from_fields); - JS_DECLARE_NATIVE_FUNCTION(year_month_from_fields); - JS_DECLARE_NATIVE_FUNCTION(month_day_from_fields); - JS_DECLARE_NATIVE_FUNCTION(date_add); - JS_DECLARE_NATIVE_FUNCTION(date_until); - JS_DECLARE_NATIVE_FUNCTION(year); - JS_DECLARE_NATIVE_FUNCTION(month); - JS_DECLARE_NATIVE_FUNCTION(month_code); - JS_DECLARE_NATIVE_FUNCTION(day); - JS_DECLARE_NATIVE_FUNCTION(day_of_week); - JS_DECLARE_NATIVE_FUNCTION(day_of_year); - JS_DECLARE_NATIVE_FUNCTION(week_of_year); - JS_DECLARE_NATIVE_FUNCTION(days_in_week); - JS_DECLARE_NATIVE_FUNCTION(days_in_month); - JS_DECLARE_NATIVE_FUNCTION(days_in_year); - JS_DECLARE_NATIVE_FUNCTION(months_in_year); - JS_DECLARE_NATIVE_FUNCTION(in_leap_year); - JS_DECLARE_NATIVE_FUNCTION(fields); - JS_DECLARE_NATIVE_FUNCTION(merge_fields); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); - JS_DECLARE_NATIVE_FUNCTION(era); - JS_DECLARE_NATIVE_FUNCTION(era_year); + JS_DECLARE_OLD_NATIVE_FUNCTION(id_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(date_from_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(year_month_from_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_day_from_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(date_add); + JS_DECLARE_OLD_NATIVE_FUNCTION(date_until); + JS_DECLARE_OLD_NATIVE_FUNCTION(year); + JS_DECLARE_OLD_NATIVE_FUNCTION(month); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_code); + JS_DECLARE_OLD_NATIVE_FUNCTION(day); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year); + JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year); + JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year); + JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year); + JS_DECLARE_OLD_NATIVE_FUNCTION(fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(merge_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(era); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_year); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp index 2a69dada37..65327db021 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp @@ -85,7 +85,7 @@ Value DurationConstructor::construct(FunctionObject& new_target) } // 7.2.2 Temporal.Duration.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.duration.from -JS_DEFINE_NATIVE_FUNCTION(DurationConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationConstructor::from) { auto item = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h index 73fff2b2f8..f431f4c658 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h @@ -24,7 +24,7 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp index 1f80984a62..0540a2d221 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp @@ -48,7 +48,7 @@ void DurationPrototype::initialize(GlobalObject& global_object) } // 7.3.3 get Temporal.Duration.prototype.years, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.years -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::years_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::years_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -59,7 +59,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::years_getter) } // 7.3.4 get Temporal.Duration.prototype.months, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.months -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::months_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::months_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -70,7 +70,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::months_getter) } // 7.3.5 get Temporal.Duration.prototype.weeks, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.weeks -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::weeks_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::weeks_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -81,7 +81,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::weeks_getter) } // 7.3.6 get Temporal.Duration.prototype.days, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.days -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::days_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::days_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -92,7 +92,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::days_getter) } // 7.3.7 get Temporal.Duration.prototype.hours, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.hours -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::hours_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::hours_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::hours_getter) } // 7.3.8 get Temporal.Duration.prototype.minutes, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.minutes -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::minutes_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::minutes_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -114,7 +114,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::minutes_getter) } // 7.3.9 get Temporal.Duration.prototype.seconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.seconds -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::seconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::seconds_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -125,7 +125,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::seconds_getter) } // 7.3.10 get Temporal.Duration.prototype.milliseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.milliseconds -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::milliseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::milliseconds_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -136,7 +136,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::milliseconds_getter) } // 7.3.11 get Temporal.Duration.prototype.microseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.microseconds -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::microseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::microseconds_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -147,7 +147,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::microseconds_getter) } // 7.3.12 get Temporal.Duration.prototype.nanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.nanoseconds -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::nanoseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::nanoseconds_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::nanoseconds_getter) } // 7.3.13 get Temporal.Duration.prototype.sign, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.sign -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::sign_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::sign_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -169,7 +169,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::sign_getter) } // 7.3.14 get Temporal.Duration.prototype.blank, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.blank -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::blank_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::blank_getter) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -187,7 +187,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::blank_getter) } // 7.3.15 Temporal.Duration.prototype.with ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.with -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::with) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::with) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::with) } // 7.3.16 Temporal.Duration.prototype.negated ( ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.negated -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::negated) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::negated) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -272,7 +272,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::negated) } // 7.3.17 Temporal.Duration.prototype.abs ( ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.abs -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::abs) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::abs) { // 1. Let duration be the this value. // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). @@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::abs) } // 7.3.25 Temporal.Duration.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.Duration", "a primitive value"); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h index 24d82649fe..ad5bb382d7 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h @@ -20,22 +20,22 @@ public: virtual ~DurationPrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(years_getter); - JS_DECLARE_NATIVE_FUNCTION(months_getter); - JS_DECLARE_NATIVE_FUNCTION(weeks_getter); - JS_DECLARE_NATIVE_FUNCTION(days_getter); - JS_DECLARE_NATIVE_FUNCTION(hours_getter); - JS_DECLARE_NATIVE_FUNCTION(minutes_getter); - JS_DECLARE_NATIVE_FUNCTION(seconds_getter); - JS_DECLARE_NATIVE_FUNCTION(milliseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(microseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(nanoseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(sign_getter); - JS_DECLARE_NATIVE_FUNCTION(blank_getter); - JS_DECLARE_NATIVE_FUNCTION(with); - JS_DECLARE_NATIVE_FUNCTION(negated); - JS_DECLARE_NATIVE_FUNCTION(abs); - JS_DECLARE_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(years_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(months_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(weeks_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(hours_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(minutes_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(seconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(milliseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(microseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(nanoseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(sign_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(blank_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(with); + JS_DECLARE_OLD_NATIVE_FUNCTION(negated); + JS_DECLARE_OLD_NATIVE_FUNCTION(abs); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp index 7ba555dad3..f2b0e56cf2 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp @@ -69,7 +69,7 @@ Value InstantConstructor::construct(FunctionObject& new_target) } // 8.2.2 Temporal.Instant.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.instant.from -JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from) { auto item = vm.argument(0); @@ -84,7 +84,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from) } // 8.2.3 Temporal.Instant.fromEpochSeconds ( epochSeconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochseconds -JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds) { // 1. Set epochSeconds to ? ToNumber(epochSeconds). auto epoch_seconds_value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)); @@ -108,7 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds) } // 8.2.4 Temporal.Instant.fromEpochMilliseconds ( epochMilliseconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochmilliseconds -JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds) { // 1. Set epochMilliseconds to ? ToNumber(epochMilliseconds). auto epoch_milliseconds_value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)); @@ -132,7 +132,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds) } // 8.2.5 Temporal.Instant.fromEpochMicroseconds ( epochMicroseconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochmicroseconds -JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds) { // 1. Set epochMicroseconds to ? ToBigInt(epochMicroseconds). auto* epoch_microseconds = TRY_OR_DISCARD(vm.argument(0).to_bigint(global_object)); @@ -151,7 +151,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds) } // 8.2.6 Temporal.Instant.fromEpochNanoseconds ( epochNanoseconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochnanoseconds -JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds) { // 1. Set epochNanoseconds to ? ToBigInt(epochNanoseconds). auto* epoch_nanoseconds = TRY_OR_DISCARD(vm.argument(0).to_bigint(global_object)); @@ -167,7 +167,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds) } // 8.2.7 Temporal.Instant.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.instant.compare -JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::compare) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::compare) { // 1. Set one to ? ToTemporalInstant(one). auto* one = TRY_OR_DISCARD(to_temporal_instant(global_object, vm.argument(0))); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h index 310e5c7c8e..cdce6d7d97 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h @@ -24,12 +24,12 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); - JS_DECLARE_NATIVE_FUNCTION(from_epoch_seconds); - JS_DECLARE_NATIVE_FUNCTION(from_epoch_milliseconds); - JS_DECLARE_NATIVE_FUNCTION(from_epoch_microseconds); - JS_DECLARE_NATIVE_FUNCTION(from_epoch_nanoseconds); - JS_DECLARE_NATIVE_FUNCTION(compare); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_seconds); + JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_milliseconds); + JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_microseconds); + JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_nanoseconds); + JS_DECLARE_OLD_NATIVE_FUNCTION(compare); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp index dbac4e2e42..4c300266f2 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp @@ -53,7 +53,7 @@ void InstantPrototype::initialize(GlobalObject& global_object) } // 8.3.3 get Temporal.Instant.prototype.epochSeconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochseconds -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_seconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_seconds_getter) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -70,7 +70,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_seconds_getter) } // 8.3.4 get Temporal.Instant.prototype.epochMilliseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochmilliseconds -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_milliseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_milliseconds_getter) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -87,7 +87,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_milliseconds_getter) } // 8.3.5 get Temporal.Instant.prototype.epochMicroseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochmicroseconds -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_microseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_microseconds_getter) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_microseconds_getter) } // 8.3.6 get Temporal.Instant.prototype.epochNanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochnanoseconds -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_nanoseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_nanoseconds_getter) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -118,7 +118,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_nanoseconds_getter) } // 8.3.7 Temporal.Instant.prototype.add ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.add -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::add) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::add) { auto temporal_duration_like = vm.argument(0); @@ -137,7 +137,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::add) } // 8.3.8 Temporal.Instant.prototype.subtract ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.subtract -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::subtract) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::subtract) { auto temporal_duration_like = vm.argument(0); @@ -156,7 +156,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::subtract) } // 8.3.9 Temporal.Instant.prototype.until ( other [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.until -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::until) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::until) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -200,7 +200,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::until) } // 8.3.10 Temporal.Instant.prototype.since ( other [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.since -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::since) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::since) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -244,7 +244,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::since) } // 8.3.11 Temporal.Instant.prototype.round ( options ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.round -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::round) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::round) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -321,7 +321,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::round) } // 8.3.12 Temporal.Instant.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.equals -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::equals) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::equals) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -339,7 +339,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::equals) } // 8.3.13 Temporal.Instant.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_string) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -377,7 +377,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_string) // 8.3.14 Temporal.Instant.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tolocalestring // NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_locale_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_locale_string) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -388,7 +388,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_locale_string) } // 8.3.15 Temporal.Instant.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_json) { // 1. Let instant be the this value. // 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]). @@ -399,7 +399,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_json) } // 8.3.16 Temporal.Instant.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.Instant", "a primitive value"); @@ -407,7 +407,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::value_of) } // 8.3.17 Temporal.Instant.prototype.toZonedDateTime ( item ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tozoneddatetime -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time) { auto item = vm.argument(0); @@ -453,7 +453,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time) } // 8.3.18 Temporal.Instant.prototype.toZonedDateTimeISO ( item ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tozoneddatetimeiso -JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time_iso) +JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time_iso) { auto item = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h index 04dfddf9de..970e91e431 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h @@ -20,22 +20,22 @@ public: virtual ~InstantPrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(epoch_seconds_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_milliseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_microseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_nanoseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(add); - JS_DECLARE_NATIVE_FUNCTION(subtract); - JS_DECLARE_NATIVE_FUNCTION(until); - JS_DECLARE_NATIVE_FUNCTION(since); - JS_DECLARE_NATIVE_FUNCTION(round); - JS_DECLARE_NATIVE_FUNCTION(equals); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_locale_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); - JS_DECLARE_NATIVE_FUNCTION(value_of); - JS_DECLARE_NATIVE_FUNCTION(to_zoned_date_time); - JS_DECLARE_NATIVE_FUNCTION(to_zoned_date_time_iso); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_seconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_milliseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_microseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_nanoseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(add); + JS_DECLARE_OLD_NATIVE_FUNCTION(subtract); + JS_DECLARE_OLD_NATIVE_FUNCTION(until); + JS_DECLARE_OLD_NATIVE_FUNCTION(since); + JS_DECLARE_OLD_NATIVE_FUNCTION(round); + JS_DECLARE_OLD_NATIVE_FUNCTION(equals); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_zoned_date_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_zoned_date_time_iso); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp index afc15ee0e4..72ac3fe013 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp @@ -47,21 +47,21 @@ void Now::initialize(GlobalObject& global_object) } // 2.2.1 Temporal.Now.timeZone ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.timezone -JS_DEFINE_NATIVE_FUNCTION(Now::time_zone) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::time_zone) { // 1. Return ! SystemTimeZone(). return system_time_zone(global_object); } // 2.2.2 Temporal.Now.instant ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.instant -JS_DEFINE_NATIVE_FUNCTION(Now::instant) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::instant) { // 1. Return ! SystemInstant(). return system_instant(global_object); } // 2.2.3 Temporal.Now.plainDateTime ( calendar [ , temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindatetime -JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date_time) { auto calendar = vm.argument(0); auto temporal_time_zone_like = vm.argument(1); @@ -71,7 +71,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time) } // 2.2.4 Temporal.Now.plainDateTimeISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindatetimeiso -JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time_iso) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date_time_iso) { auto temporal_time_zone_like = vm.argument(0); @@ -83,7 +83,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time_iso) } // 2.2.5 Temporal.Now.zonedDateTime ( calendar [ , temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.zoneddatetime -JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::zoned_date_time) { auto calendar = vm.argument(0); auto temporal_time_zone_like = vm.argument(1); @@ -93,7 +93,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time) } // 2.2.6 Temporal.Now.zonedDateTimeISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.zoneddatetimeiso -JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time_iso) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::zoned_date_time_iso) { auto temporal_time_zone_like = vm.argument(0); @@ -105,7 +105,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time_iso) } // 2.2.7 Temporal.Now.plainDate ( calendar [ , temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindate -JS_DEFINE_NATIVE_FUNCTION(Now::plain_date) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date) { auto calendar = vm.argument(0); auto temporal_time_zone_like = vm.argument(1); @@ -118,7 +118,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date) } // 2.2.8 Temporal.Now.plainDateISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindateiso -JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_iso) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date_iso) { auto temporal_time_zone_like = vm.argument(0); @@ -133,7 +133,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_iso) } // 2.2.9 Temporal.Now.plainTimeISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaintimeiso -JS_DEFINE_NATIVE_FUNCTION(Now::plain_time_iso) +JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_time_iso) { auto temporal_time_zone_like = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.h b/Userland/Libraries/LibJS/Runtime/Temporal/Now.h index c17563432e..da8152a216 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.h @@ -20,15 +20,15 @@ public: virtual ~Now() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(time_zone); - JS_DECLARE_NATIVE_FUNCTION(instant); - JS_DECLARE_NATIVE_FUNCTION(plain_date_time); - JS_DECLARE_NATIVE_FUNCTION(plain_date_time_iso); - JS_DECLARE_NATIVE_FUNCTION(zoned_date_time); - JS_DECLARE_NATIVE_FUNCTION(zoned_date_time_iso); - JS_DECLARE_NATIVE_FUNCTION(plain_date); - JS_DECLARE_NATIVE_FUNCTION(plain_date_iso); - JS_DECLARE_NATIVE_FUNCTION(plain_time_iso); + JS_DECLARE_OLD_NATIVE_FUNCTION(time_zone); + JS_DECLARE_OLD_NATIVE_FUNCTION(instant); + JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date_time_iso); + JS_DECLARE_OLD_NATIVE_FUNCTION(zoned_date_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(zoned_date_time_iso); + JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date); + JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date_iso); + JS_DECLARE_OLD_NATIVE_FUNCTION(plain_time_iso); }; TimeZone* system_time_zone(GlobalObject&); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp index 6c0c9910ff..2cb9abe87f 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp @@ -77,7 +77,7 @@ Value PlainDateConstructor::construct(FunctionObject& new_target) } // 3.2.2 Temporal.PlainDate.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.from -JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateConstructor::from) { // 1. Set options to ? GetOptionsObject(options). auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1))); @@ -98,7 +98,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from) } // 3.2.3 Temporal.PlainDate.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-properties-of-the-temporal-plaindate-constructor -JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::compare) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateConstructor::compare) { // 1. Set one to ? ToTemporalDate(one). auto* one = TRY_OR_DISCARD(to_temporal_date(global_object, vm.argument(0))); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h index 4a0d6ab6df..4df961ddf2 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h @@ -24,8 +24,8 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); - JS_DECLARE_NATIVE_FUNCTION(compare); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(compare); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp index d2623baf21..c3792c5236 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp @@ -63,7 +63,7 @@ void PlainDatePrototype::initialize(GlobalObject& global_object) } // 3.3.3 get Temporal.PlainDate.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.calendar -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -74,7 +74,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter) } // 3.3.4 get Temporal.PlainDate.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.year -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::year_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -88,7 +88,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::year_getter) } // 3.3.5 get Temporal.PlainDate.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.month -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::month_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -102,7 +102,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_getter) } // 3.3.6 get Temporal.PlainDate.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.monthCode -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_code_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::month_code_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -116,7 +116,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_code_getter) } // 3.3.7 get Temporal.PlainDate.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.day -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::day_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -130,7 +130,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_getter) } // 3.3.8 get Temporal.PlainDate.prototype.dayOfWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.dayofweek -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_week_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::day_of_week_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -144,7 +144,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_week_getter) } // 3.3.9 get Temporal.PlainDate.prototype.dayOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.dayofyear -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::day_of_year_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_year_getter) } // 3.3.10 get Temporal.PlainDate.prototype.weekOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.weekofyear -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::week_of_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::week_of_year_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -172,7 +172,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::week_of_year_getter) } // 3.3.11 get Temporal.PlainDate.prototype.daysInWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.daysinweek -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_week_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::days_in_week_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -186,7 +186,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_week_getter) } // 3.3.12 get Temporal.PlainDate.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.daysinmonth -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::days_in_month_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -200,7 +200,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_month_getter) } // 3.3.13 get Temporal.PlainDate.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.daysinyear -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::days_in_year_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -214,7 +214,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_year_getter) } // 3.3.14 get Temporal.PlainDate.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.monthsinyear -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::months_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::months_in_year_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -228,7 +228,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::months_in_year_getter) } // 3.3.15 get Temporal.PlainDate.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.inleapyear -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::in_leap_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::in_leap_year_getter) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -242,7 +242,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::in_leap_year_getter) } // 15.6.5.2 get Temporal.PlainDate.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.era -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::era_getter) { // 1. Let plainDate be the this value. // 2. Perform ? RequireInternalSlot(plainDate, [[InitializedTemporalDate]]). @@ -256,7 +256,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_getter) } // 15.6.5.3 get Temporal.PlainDate.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.erayear -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::era_year_getter) { // 1. Let plainDate be the this value. // 2. Perform ? RequireInternalSlot(plainDate, [[InitializedTemporalDate]]). @@ -270,7 +270,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_year_getter) } // 3.3.16 Temporal.PlainDate.prototype.toPlainYearMonth ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplainyearmonth -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_year_month) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_plain_year_month) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -290,7 +290,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_year_month) } // 3.3.17 Temporal.PlainDate.prototype.toPlainMonthDay ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplainmonthday -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_month_day) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_plain_month_day) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -310,7 +310,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_month_day) } // 3.3.18 Temporal.PlainDate.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.getisofields -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -336,7 +336,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields) } // 3.3.22 Temporal.PlainDate.prototype.withCalendar ( calendar ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.withcalendar -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with_calendar) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::with_calendar) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -350,7 +350,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with_calendar) } // 3.3.25 Temporal.PlainDate.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.equals -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::equals) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::equals) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -373,7 +373,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::equals) } // 3.3.26 Temporal.PlainDate.prototype.toPlainDateTime ( [ temporalTime ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplaindatetime -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_date_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_plain_date_time) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -393,7 +393,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_date_time) } // 3.3.28 Temporal.PlainDate.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_string) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_string) // 3.3.29 Temporal.PlainDate.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tolocalestring // NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_locale_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_locale_string) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -422,7 +422,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_locale_string) } // 3.3.30 Temporal.PlainDate.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_json) { // 1. Let temporalDate be the this value. // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). @@ -433,7 +433,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_json) } // 3.3.31 Temporal.PlainDate.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainDate", "a primitive value"); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h index 692cc36586..bc0d695d7b 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h @@ -20,31 +20,31 @@ public: virtual ~PlainDatePrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(calendar_getter); - JS_DECLARE_NATIVE_FUNCTION(year_getter); - JS_DECLARE_NATIVE_FUNCTION(month_getter); - JS_DECLARE_NATIVE_FUNCTION(month_code_getter); - JS_DECLARE_NATIVE_FUNCTION(day_getter); - JS_DECLARE_NATIVE_FUNCTION(day_of_week_getter); - JS_DECLARE_NATIVE_FUNCTION(day_of_year_getter); - JS_DECLARE_NATIVE_FUNCTION(week_of_year_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_week_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter); - JS_DECLARE_NATIVE_FUNCTION(era_getter); - JS_DECLARE_NATIVE_FUNCTION(era_year_getter); - JS_DECLARE_NATIVE_FUNCTION(to_plain_year_month); - JS_DECLARE_NATIVE_FUNCTION(to_plain_month_day); - JS_DECLARE_NATIVE_FUNCTION(get_iso_fields); - JS_DECLARE_NATIVE_FUNCTION(with_calendar); - JS_DECLARE_NATIVE_FUNCTION(equals); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date_time); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_locale_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); - JS_DECLARE_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_year_month); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_month_day); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(with_calendar); + JS_DECLARE_OLD_NATIVE_FUNCTION(equals); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp index 5015061eff..7f2e588201 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp @@ -96,7 +96,7 @@ Value PlainDateTimeConstructor::construct(FunctionObject& new_target) } // 5.2.2 Temporal.PlainDateTime.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.from -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimeConstructor::from) { auto item = vm.argument(0); @@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from) } // 5.2.3 Temporal.PlainDateTime.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.compare -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::compare) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimeConstructor::compare) { // 1. Set one to ? ToTemporalDateTime(one). auto* one = TRY_OR_DISCARD(to_temporal_date_time(global_object, vm.argument(0))); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h index 90577a8da6..0d9941a842 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h @@ -24,8 +24,8 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); - JS_DECLARE_NATIVE_FUNCTION(compare); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(compare); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp index ad13b848b4..89d691d304 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp @@ -66,7 +66,7 @@ void PlainDateTimePrototype::initialize(GlobalObject& global_object) } // 5.3.3 get Temporal.PlainDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.calendar -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -77,7 +77,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter) } // 5.3.4 get Temporal.PlainDateTime.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.year -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::year_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -91,7 +91,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::year_getter) } // 5.3.5 get Temporal.PlainDateTime.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.month -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::month_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -105,7 +105,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_getter) } // 5.3.6 get Temporal.PlainDateTime.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.monthcode -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter) } // 5.3.7 get Temporal.PlainDateTime.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.day -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::day_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -133,7 +133,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_getter) } // 5.3.8 get Temporal.PlainDateTime.prototype.hour, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.hour -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::hour_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::hour_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -144,7 +144,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::hour_getter) } // 5.3.9 get Temporal.PlainDateTime.prototype.minute, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.minute -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::minute_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::minute_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -155,7 +155,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::minute_getter) } // 5.3.10 get Temporal.PlainDateTime.prototype.second, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.second -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::second_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::second_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -166,7 +166,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::second_getter) } // 5.3.11 get Temporal.PlainDateTime.prototype.millisecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.millisecond -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::millisecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::millisecond_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -177,7 +177,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::millisecond_getter) } // 5.3.12 get Temporal.PlainDateTime.prototype.microsecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.microsecond -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::microsecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::microsecond_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::microsecond_getter) } // 5.3.13 get Temporal.PlainDateTime.prototype.nanosecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.nanosecond -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::nanosecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::nanosecond_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -199,7 +199,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::nanosecond_getter) } // 5.3.14 get Temporal.PlainDateTime.prototype.dayOfWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.dayofweek -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_week_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_week_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -213,7 +213,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_week_getter) } // 5.3.15 get Temporal.PlainDateTime.prototype.dayOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.dayofyear -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_year_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -227,7 +227,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_year_getter) } // 5.3.16 get Temporal.PlainDateTime.prototype.weekOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.weekofyear -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::week_of_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::week_of_year_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -241,7 +241,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::week_of_year_getter) } // 5.3.17 get Temporal.PlainDateTime.prototype.daysInWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.daysinweek -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_week_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_week_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -255,7 +255,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_week_getter) } // 5.3.18 get Temporal.PlainDateTime.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.daysinmonth -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_month_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -269,7 +269,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_month_getter) } // 5.3.19 get Temporal.PlainDateTime.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.daysinyear -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_year_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_year_getter) } // 5.3.20 get Temporal.PlainDateTime.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.monthsinyear -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::months_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::months_in_year_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -297,7 +297,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::months_in_year_getter) } // 5.3.21 get Temporal.PlainDateTime.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.inleapyear -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::in_leap_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::in_leap_year_getter) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -311,7 +311,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::in_leap_year_getter) } // 15.6.6.2 get Temporal.PlainDateTime.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.era -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::era_getter) { // 1. Let plainDateTime be the this value. // 2. Perform ? RequireInternalSlot(plainDateTime, [[InitializedTemporalDateTime]]). @@ -325,7 +325,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_getter) } // 15.6.6.3 get Temporal.PlainDateTime.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.erayear -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter) { // 1. Let plainDateTime be the this value. // 2. Perform ? RequireInternalSlot(plainDateTime, [[InitializedTemporalDateTime]]). @@ -339,7 +339,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter) } // 5.3.23 Temporal.PlainDateTime.prototype.withPlainTime ( [ plainTimeLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withplaintime -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_time) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -359,7 +359,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_time) } // 5.3.24 Temporal.PlainDateTime.prototype.withPlainDate ( plainDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withplaindate -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_date) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_date) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -376,7 +376,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_date) } // 5.3.25 Temporal.PlainDateTime.prototype.withCalendar ( calendar ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withcalendar -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -390,7 +390,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar) } // 5.3.31 Temporal.PlainDateTime.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.equals -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::equals) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::equals) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::equals) } // 5.3.35 Temporal.PlainDateTime.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainDateTime", "a primitive value"); @@ -419,7 +419,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::value_of) } // 5.3.37 Temporal.PlainDateTime.prototype.toPlainDate ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplaindate -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_date) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_date) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -430,7 +430,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_date) } // 5.3.38 Temporal.PlainDateTime.prototype.toPlainYearMonth ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplainyearmonth -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_year_month) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_year_month) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -450,7 +450,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_year_month) } // 5.3.39 Temporal.PlainDateTime.prototype.toPlainMonthDay ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplainmonthday -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_month_day) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_month_day) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -470,7 +470,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_month_day) } // 5.3.40 Temporal.PlainDateTime.prototype.toPlainTime ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplaintime -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_time) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). @@ -481,7 +481,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_time) } // 5.3.41 Temporal.PlainDateTime.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.getisofields -JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::get_iso_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::get_iso_fields) { // 1. Let dateTime be the this value. // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h index 5470d1c72e..5a10b778aa 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h @@ -20,37 +20,37 @@ public: virtual ~PlainDateTimePrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(calendar_getter); - JS_DECLARE_NATIVE_FUNCTION(year_getter); - JS_DECLARE_NATIVE_FUNCTION(month_getter); - JS_DECLARE_NATIVE_FUNCTION(month_code_getter); - JS_DECLARE_NATIVE_FUNCTION(day_getter); - JS_DECLARE_NATIVE_FUNCTION(hour_getter); - JS_DECLARE_NATIVE_FUNCTION(minute_getter); - JS_DECLARE_NATIVE_FUNCTION(second_getter); - JS_DECLARE_NATIVE_FUNCTION(millisecond_getter); - JS_DECLARE_NATIVE_FUNCTION(microsecond_getter); - JS_DECLARE_NATIVE_FUNCTION(nanosecond_getter); - JS_DECLARE_NATIVE_FUNCTION(day_of_week_getter); - JS_DECLARE_NATIVE_FUNCTION(day_of_year_getter); - JS_DECLARE_NATIVE_FUNCTION(week_of_year_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_week_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter); - JS_DECLARE_NATIVE_FUNCTION(era_getter); - JS_DECLARE_NATIVE_FUNCTION(era_year_getter); - JS_DECLARE_NATIVE_FUNCTION(with_plain_time); - JS_DECLARE_NATIVE_FUNCTION(with_plain_date); - JS_DECLARE_NATIVE_FUNCTION(with_calendar); - JS_DECLARE_NATIVE_FUNCTION(equals); - JS_DECLARE_NATIVE_FUNCTION(value_of); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date); - JS_DECLARE_NATIVE_FUNCTION(to_plain_year_month); - JS_DECLARE_NATIVE_FUNCTION(to_plain_month_day); - JS_DECLARE_NATIVE_FUNCTION(to_plain_time); - JS_DECLARE_NATIVE_FUNCTION(get_iso_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(hour_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(minute_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(second_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(millisecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(microsecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(nanosecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(with_plain_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(with_plain_date); + JS_DECLARE_OLD_NATIVE_FUNCTION(with_calendar); + JS_DECLARE_OLD_NATIVE_FUNCTION(equals); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_year_month); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_month_day); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp index 373eac7ee6..349ea2fd12 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp @@ -86,7 +86,7 @@ Value PlainMonthDayConstructor::construct(FunctionObject& new_target) } // 10.2.2 Temporal.PlainMonthDay.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.from -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayConstructor::from) { auto item = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h index 01ab59c0e7..e1b9690eb9 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h @@ -24,7 +24,7 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp index 35a2b26d17..867917d336 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp @@ -43,7 +43,7 @@ void PlainMonthDayPrototype::initialize(GlobalObject& global_object) } // 10.3.3 get Temporal.PlainMonthDay.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.calendar -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -54,7 +54,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter) } // 10.3.4 get Temporal.PlainMonthDay.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.monthcode -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::month_code_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::month_code_getter) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -68,7 +68,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::month_code_getter) } // 10.3.5 get Temporal.PlainMonthDay.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.day -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::day_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::day_getter) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::day_getter) } // 10.3.7 Temporal.PlainMonthDay.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.equals -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::equals) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::equals) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -108,7 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::equals) } // 10.3.8 Temporal.PlainMonthDay.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_string) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -126,7 +126,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_string) // 10.3.9 Temporal.PlainMonthDay.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tolocalestring // NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_locale_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_locale_string) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -137,7 +137,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_locale_string) } // 10.3.10 Temporal.PlainMonthDay.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_json) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). @@ -148,7 +148,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_json) } // 10.3.11 Temporal.PlainMonthDay.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainMonthDay", "a primitive value"); @@ -156,7 +156,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::value_of) } // 10.3.12 Temporal.PlainMonthDay.prototype.toPlainDate ( item ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.toplaindate -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date) { auto item = vm.argument(0); @@ -214,7 +214,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date) } // 10.3.13 Temporal.PlainMonthDay.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.getisofields -JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::get_iso_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::get_iso_fields) { // 1. Let monthDay be the this value. // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h index 4750c77f8c..40879338a9 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h @@ -20,16 +20,16 @@ public: virtual ~PlainMonthDayPrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(calendar_getter); - JS_DECLARE_NATIVE_FUNCTION(month_code_getter); - JS_DECLARE_NATIVE_FUNCTION(day_getter); - JS_DECLARE_NATIVE_FUNCTION(equals); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_locale_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); - JS_DECLARE_NATIVE_FUNCTION(value_of); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date); - JS_DECLARE_NATIVE_FUNCTION(get_iso_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(equals); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp index 7a7f0006ba..203fae1a21 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp @@ -82,7 +82,7 @@ Value PlainTimeConstructor::construct(FunctionObject& new_target) } // 4.2.2 Temporal.PlainTime.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.from -JS_DEFINE_NATIVE_FUNCTION(PlainTimeConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimeConstructor::from) { // 1. Set options to ? GetOptionsObject(options). auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1))); @@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimeConstructor::from) } // 4.2.3 Temporal.PlainTime.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.compare -JS_DEFINE_NATIVE_FUNCTION(PlainTimeConstructor::compare) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimeConstructor::compare) { // 1. Set one to ? ToTemporalTime(one). auto* one = TRY_OR_DISCARD(to_temporal_time(global_object, vm.argument(0))); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h index 9e6b69a57e..31f6465d9d 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h @@ -24,8 +24,8 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); - JS_DECLARE_NATIVE_FUNCTION(compare); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(compare); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp index 6f35442513..e9596e41fd 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp @@ -49,7 +49,7 @@ void PlainTimePrototype::initialize(GlobalObject& global_object) } // 4.3.3 get Temporal.PlainTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.calendar -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -60,7 +60,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter) } // 4.3.4 get Temporal.PlainTime.prototype.hour, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.hour -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::hour_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::hour_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -71,7 +71,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::hour_getter) } // 4.3.5 get Temporal.PlainTime.prototype.minute, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.minute -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::minute_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::minute_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::minute_getter) } // 4.3.6 get Temporal.PlainTime.prototype.second, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.second -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::second_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::second_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -93,7 +93,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::second_getter) } // 4.3.7 get Temporal.PlainTime.prototype.millisecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.millisecond -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::millisecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::millisecond_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::millisecond_getter) } // 4.3.8 get Temporal.PlainTime.prototype.microsecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.microsecond -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::microsecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::microsecond_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -115,7 +115,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::microsecond_getter) } // 4.3.9 get Temporal.PlainTime.prototype.nanosecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.nanosecond -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::nanosecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::nanosecond_getter) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -126,7 +126,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::nanosecond_getter) } // 4.3.12 Temporal.PlainTime.prototype.with ( temporalTimeLike [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.with -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::with) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::with) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -219,7 +219,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::with) } // 4.3.16 Temporal.PlainTime.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.equals -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::equals) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::equals) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -257,7 +257,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::equals) } // 4.3.17 Temporal.PlainTime.prototype.toPlainDateTime ( temporalDate ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.toplaindatetime -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_plain_date_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_plain_date_time) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -271,7 +271,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_plain_date_time) } // 4.3.19 Temporal.PlainTime.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.getisofields -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -306,7 +306,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields) } // 4.3.20 Temporal.PlainTime.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_string) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -330,7 +330,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_string) } // 4.3.21 Temporal.PlainTime.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tolocalestring -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_locale_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_locale_string) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -342,7 +342,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_locale_string) } // 4.3.22 Temporal.PlainTime.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_json) { // 1. Let temporalTime be the this value. // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). @@ -354,7 +354,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_json) } // 4.3.23 Temporal.PlainTime.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainTime", "a primitive value"); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h index b732aff2e0..60a5e7e377 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h @@ -20,21 +20,21 @@ public: virtual ~PlainTimePrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(calendar_getter); - JS_DECLARE_NATIVE_FUNCTION(hour_getter); - JS_DECLARE_NATIVE_FUNCTION(minute_getter); - JS_DECLARE_NATIVE_FUNCTION(second_getter); - JS_DECLARE_NATIVE_FUNCTION(millisecond_getter); - JS_DECLARE_NATIVE_FUNCTION(microsecond_getter); - JS_DECLARE_NATIVE_FUNCTION(nanosecond_getter); - JS_DECLARE_NATIVE_FUNCTION(with); - JS_DECLARE_NATIVE_FUNCTION(equals); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date_time); - JS_DECLARE_NATIVE_FUNCTION(get_iso_fields); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_locale_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); - JS_DECLARE_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(hour_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(minute_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(second_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(millisecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(microsecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(nanosecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(with); + JS_DECLARE_OLD_NATIVE_FUNCTION(equals); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp index 75a343c5b1..3f2548c308 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp @@ -88,7 +88,7 @@ Value PlainYearMonthConstructor::construct(FunctionObject& new_target) } // 9.2.2 Temporal.PlainYearMonth.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.from -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthConstructor::from) { // 1. Set options to ? GetOptionsObject(options). auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1))); @@ -111,7 +111,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::from) } // 9.2.3 Temporal.PlainYearMonth.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.compare -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::compare) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthConstructor::compare) { // 1. Set one to ? ToTemporalYearMonth(one). auto* one = TRY_OR_DISCARD(to_temporal_year_month(global_object, vm.argument(0))); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h index 145484b904..58b64e807d 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h @@ -24,8 +24,8 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); - JS_DECLARE_NATIVE_FUNCTION(compare); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(compare); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp index 0290aca1b1..5755bd0132 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp @@ -50,7 +50,7 @@ void PlainYearMonthPrototype::initialize(GlobalObject& global_object) } // 9.3.3 get Temporal.PlainYearMonth.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.calendar -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -61,7 +61,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter) } // 9.3.4 get Temporal.PlainYearMonth.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.year -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::year_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -75,7 +75,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::year_getter) } // 9.3.5 get Temporal.PlainYearMonth.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.month -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::month_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -89,7 +89,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_getter) } // 9.3.6 get Temporal.PlainYearMonth.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.monthCode -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_code_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::month_code_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_code_getter) } // 9.3.7 get Temporal.PlainYearMonth.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.daysinyear -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_year_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -117,7 +117,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_year_getter) } // 9.3.8 get Temporal.PlainYearMonth.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.daysinmonth -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_month_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -131,7 +131,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_month_getter) } // 9.3.9 get Temporal.PlainYearMonth.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.monthsinyear -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::months_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::months_in_year_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -145,7 +145,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::months_in_year_getter) } // 9.3.10 get Temporal.PlainYearMonth.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.inleapyear -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::in_leap_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::in_leap_year_getter) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -159,7 +159,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::in_leap_year_getter) } // 15.6.9.2 get Temporal.PlainYearMonth.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.era -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::era_getter) { // 1. Let plainYearMonth be the this value. // 2. Perform ? RequireInternalSlot(plainYearMonth, [[InitializedTemporalYearMonth]]). @@ -173,7 +173,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_getter) } // 15.6.9.3 get Temporal.PlainYearMonth.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.erayear -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::era_year_getter) { // 1. Let plainYearMonth be the this value. // 2. Perform ? RequireInternalSlot(plainYearMonth, [[InitializedTemporalYearMonth]]). @@ -187,7 +187,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_year_getter) } // 9.3.16 Temporal.PlainYearMonth.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.equals -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::equals) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::equals) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -213,7 +213,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::equals) } // 9.3.17 Temporal.PlainYearMonth.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -231,7 +231,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string) // 9.3.18 Temporal.PlainYearMonth.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tolocalestring // NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402. -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_locale_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_locale_string) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -242,7 +242,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_locale_string) } // 9.3.19 Temporal.PlainYearMonth.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_json) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). @@ -253,7 +253,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_json) } // 9.3.20 Temporal.PlainYearMonth.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainYearMonth", "a primitive value"); @@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::value_of) } // 9.3.21 Temporal.PlainYearMonth.prototype.toPlainDate ( item ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.toplaindate -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date) { auto item = vm.argument(0); @@ -319,7 +319,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date) } // 9.3.22 Temporal.PlainYearMonth.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.getisofields -JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::get_iso_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::get_iso_fields) { // 1. Let yearMonth be the this value. // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h index 4dc0ed0135..a4a48945a0 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h @@ -20,23 +20,23 @@ public: virtual ~PlainYearMonthPrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(calendar_getter); - JS_DECLARE_NATIVE_FUNCTION(year_getter); - JS_DECLARE_NATIVE_FUNCTION(month_getter); - JS_DECLARE_NATIVE_FUNCTION(month_code_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter); - JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter); - JS_DECLARE_NATIVE_FUNCTION(era_getter); - JS_DECLARE_NATIVE_FUNCTION(era_year_getter); - JS_DECLARE_NATIVE_FUNCTION(equals); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_locale_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); - JS_DECLARE_NATIVE_FUNCTION(value_of); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date); - JS_DECLARE_NATIVE_FUNCTION(get_iso_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(equals); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp index 219397925d..09c04527d0 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp @@ -79,7 +79,7 @@ Value TimeZoneConstructor::construct(FunctionObject& new_target) } // 11.3.2 Temporal.TimeZone.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.from -JS_DEFINE_NATIVE_FUNCTION(TimeZoneConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZoneConstructor::from) { auto item = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h index 385a9b0438..fb655b515b 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h @@ -24,7 +24,7 @@ public: private: virtual bool has_constructor() const override { return true; } - JS_DECLARE_NATIVE_FUNCTION(from); + JS_DECLARE_OLD_NATIVE_FUNCTION(from); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp index c3742afb81..cc1d425285 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp @@ -39,7 +39,7 @@ void TimeZonePrototype::initialize(GlobalObject& global_object) } // 11.4.3 get Temporal.TimeZone.prototype.id, https://tc39.es/proposal-temporal/#sec-get-temporal.timezone.prototype.id -JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::id_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::id_getter) { // 1. Let timeZone be the this value. auto time_zone = vm.this_value(global_object); @@ -49,7 +49,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::id_getter) } // 11.4.4 Temporal.TimeZone.prototype.getOffsetNanosecondsFor ( instant ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getoffsetnanosecondsfor -JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_nanoseconds_for) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::get_offset_nanoseconds_for) { // 1. Let timeZone be the this value. // 2. Perform ? RequireInternalSlot(timeZone, [[InitializedTemporalTimeZone]]). @@ -67,7 +67,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_nanoseconds_for) } // 11.4.5 Temporal.TimeZone.prototype.getOffsetStringFor ( instant ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getoffsetstringfor -JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_string_for) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::get_offset_string_for) { // 1. Let timeZone be the this value. // 2. Perform ? RequireInternalSlot(timeZone, [[InitializedTemporalTimeZone]]). @@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_string_for) } // 11.4.6 Temporal.TimeZone.prototype.getPlainDateTimeFor ( instant [ , calendarLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getplaindatetimefor -JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_plain_date_time_for) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::get_plain_date_time_for) { // 1. Let timeZone be the this value. auto time_zone = vm.this_value(global_object); @@ -98,7 +98,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_plain_date_time_for) } // 11.4.11 Temporal.TimeZone.prototype.toString ( ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.tostring -JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::to_string) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::to_string) { // 1. Let timeZone be the this value. // 2. Perform ? RequireInternalSlot(timeZone, [[InitializedTemporalTimeZone]]). @@ -109,7 +109,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::to_string) } // 11.4.12 Temporal.TimeZone.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.tojson -JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::to_json) +JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::to_json) { // 1. Let timeZone be the this value. auto time_zone = vm.this_value(global_object); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h index 3137cb5ee3..62f30c4a2c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h @@ -20,12 +20,12 @@ public: virtual ~TimeZonePrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(id_getter); - JS_DECLARE_NATIVE_FUNCTION(get_offset_nanoseconds_for); - JS_DECLARE_NATIVE_FUNCTION(get_offset_string_for); - JS_DECLARE_NATIVE_FUNCTION(get_plain_date_time_for); - JS_DECLARE_NATIVE_FUNCTION(to_string); - JS_DECLARE_NATIVE_FUNCTION(to_json); + JS_DECLARE_OLD_NATIVE_FUNCTION(id_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_offset_nanoseconds_for); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_offset_string_for); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_plain_date_time_for); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_string); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_json); }; } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp index ca3cd23818..9ff27cd88b 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp @@ -74,7 +74,7 @@ void ZonedDateTimePrototype::initialize(GlobalObject& global_object) } // 6.3.3 get Temporal.ZonedDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.calendar -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -85,7 +85,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter) } // 6.3.4 get Temporal.ZonedDateTime.prototype.timeZone, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.timezone -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::time_zone_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::time_zone_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -96,7 +96,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::time_zone_getter) } // 6.3.5 get Temporal.ZonedDateTime.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.year -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::year_getter) } // 6.3.6 get Temporal.ZonedDateTime.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.month -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::month_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -142,7 +142,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_getter) } // 6.3.7 get Temporal.ZonedDateTime.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.monthcode -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -165,7 +165,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter) } // 6.3.8 get Temporal.ZonedDateTime.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.day -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::day_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_getter) } // 6.3.9 get Temporal.ZonedDateTime.prototype.hour, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.hour -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::hour_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::hour_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -211,7 +211,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::hour_getter) } // 6.3.10 get Temporal.ZonedDateTime.prototype.minute, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.minute -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::minute_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::minute_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -234,7 +234,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::minute_getter) } // 6.3.11 get Temporal.ZonedDateTime.prototype.second, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.second -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::second_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::second_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -257,7 +257,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::second_getter) } // 6.3.12 get Temporal.ZonedDateTime.prototype.millisecond, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.millisecond -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::millisecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::millisecond_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -280,7 +280,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::millisecond_getter) } // 6.3.13 get Temporal.ZonedDateTime.prototype.microsecond, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.microsecond -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::microsecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::microsecond_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -303,7 +303,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::microsecond_getter) } // 6.3.14 get Temporal.ZonedDateTime.prototype.nanosecond, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.nanosecond -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::nanosecond_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::nanosecond_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -326,7 +326,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::nanosecond_getter) } // 6.3.15 get Temporal.ZonedDateTime.prototype.epochSeconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochseconds -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_seconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_seconds_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -343,7 +343,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_seconds_getter) } // 6.3.16 get Temporal.ZonedDateTime.prototype.epochMilliseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochmilliseconds -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_milliseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_milliseconds_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -360,7 +360,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_milliseconds_getter) } // 6.3.17 get Temporal.ZonedDateTime.prototype.epochMicroseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochmicroseconds -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_microseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_microseconds_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -377,7 +377,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_microseconds_getter) } // 6.3.18 get Temporal.ZonedDateTime.prototype.epochNanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochnanoseconds -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_nanoseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_nanoseconds_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -388,7 +388,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_nanoseconds_getter) } // 6.3.19 get Temporal.ZonedDateTime.prototype.dayOfWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.dayofweek -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_week_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_week_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_week_getter) } // 6.3.20 get Temporal.ZonedDateTime.prototype.dayOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.dayofyear -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -434,7 +434,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_year_getter) } // 6.3.21 get Temporal.ZonedDateTime.prototype.weekOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.weekofyear -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::week_of_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::week_of_year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -457,7 +457,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::week_of_year_getter) } // 6.3.23 get Temporal.ZonedDateTime.prototype.daysInWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinweek -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_week_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_week_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -480,7 +480,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_week_getter) } // 6.3.24 get Temporal.ZonedDateTime.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinmonth -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_month_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_month_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -503,7 +503,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_month_getter) } // 6.3.25 get Temporal.ZonedDateTime.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinyear -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -526,7 +526,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_year_getter) } // 6.3.26 get Temporal.ZonedDateTime.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.monthsinyear -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::months_in_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::months_in_year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -549,7 +549,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::months_in_year_getter) } // 6.3.27 get Temporal.ZonedDateTime.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.inleapyear -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::in_leap_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::in_leap_year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -572,7 +572,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::in_leap_year_getter) } // 6.3.28 get Temporal.ZonedDateTime.prototype.offsetNanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.offsetnanoseconds -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_nanoseconds_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_nanoseconds_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -589,7 +589,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_nanoseconds_getter) } // 6.3.29 get Temporal.ZonedDateTime.prototype.offset, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.offset -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -604,7 +604,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_getter) } // 15.6.10.2 get Temporal.ZonedDateTime.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.era -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::era_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -627,7 +627,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_getter) } // 15.6.10.3 get Temporal.ZonedDateTime.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.erayear -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -650,7 +650,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter) } // 6.3.44 Temporal.ZonedDateTime.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.valueof -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::value_of) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::value_of) { // 1. Throw a TypeError exception. vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.ZonedDateTime", "a primitive value"); @@ -658,7 +658,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::value_of) } // 6.3.46 Temporal.ZonedDateTime.prototype.toInstant ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toinstant -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_instant) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_instant) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -669,7 +669,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_instant) } // 6.3.47 Temporal.ZonedDateTime.prototype.toPlainDate ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaindate -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -692,7 +692,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date) } // 6.3.48 Temporal.ZonedDateTime.prototype.toPlainTime ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaintime -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_time) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -715,7 +715,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_time) } // 6.3.49 Temporal.ZonedDateTime.prototype.toPlainDateTime ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaindatetime -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date_time) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date_time) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -732,7 +732,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date_time) } // 6.3.50 Temporal.ZonedDateTime.prototype.toPlainYearMonth ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplainyearmonth -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_year_month) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_year_month) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -761,7 +761,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_year_month) } // 6.3.51 Temporal.ZonedDateTime.prototype.toPlainMonthDay ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplainmonthday -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). @@ -790,7 +790,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day) } // 6.3.52 Temporal.ZonedDateTime.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.getisofields -JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::get_iso_fields) +JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::get_iso_fields) { // 1. Let zonedDateTime be the this value. // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h index 5a24098148..2a66360fa3 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h @@ -20,42 +20,42 @@ public: virtual ~ZonedDateTimePrototype() override = default; private: - JS_DECLARE_NATIVE_FUNCTION(calendar_getter); - JS_DECLARE_NATIVE_FUNCTION(time_zone_getter); - JS_DECLARE_NATIVE_FUNCTION(year_getter); - JS_DECLARE_NATIVE_FUNCTION(month_getter); - JS_DECLARE_NATIVE_FUNCTION(month_code_getter); - JS_DECLARE_NATIVE_FUNCTION(day_getter); - JS_DECLARE_NATIVE_FUNCTION(hour_getter); - JS_DECLARE_NATIVE_FUNCTION(minute_getter); - JS_DECLARE_NATIVE_FUNCTION(second_getter); - JS_DECLARE_NATIVE_FUNCTION(millisecond_getter); - JS_DECLARE_NATIVE_FUNCTION(microsecond_getter); - JS_DECLARE_NATIVE_FUNCTION(nanosecond_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_seconds_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_milliseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_microseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(epoch_nanoseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(day_of_week_getter); - JS_DECLARE_NATIVE_FUNCTION(day_of_year_getter); - JS_DECLARE_NATIVE_FUNCTION(week_of_year_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_week_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter); - JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter); - JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter); - JS_DECLARE_NATIVE_FUNCTION(offset_nanoseconds_getter); - JS_DECLARE_NATIVE_FUNCTION(offset_getter); - JS_DECLARE_NATIVE_FUNCTION(era_getter); - JS_DECLARE_NATIVE_FUNCTION(era_year_getter); - JS_DECLARE_NATIVE_FUNCTION(value_of); - JS_DECLARE_NATIVE_FUNCTION(to_instant); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date); - JS_DECLARE_NATIVE_FUNCTION(to_plain_time); - JS_DECLARE_NATIVE_FUNCTION(to_plain_date_time); - JS_DECLARE_NATIVE_FUNCTION(to_plain_year_month); - JS_DECLARE_NATIVE_FUNCTION(to_plain_month_day); - JS_DECLARE_NATIVE_FUNCTION(get_iso_fields); + JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(time_zone_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(hour_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(minute_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(second_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(millisecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(microsecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(nanosecond_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_seconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_milliseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_microseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_nanoseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(offset_nanoseconds_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(offset_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(value_of); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_instant); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date_time); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_year_month); + JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_month_day); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields); }; } |