mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
LibJS: Rename define_native_function => define_old_native_function
This method will eventually be removed once all native functions are converted to ThrowCompletionOr
This commit is contained in:
parent
ca27e5eff5
commit
40eb3a39d4
95 changed files with 755 additions and 755 deletions
|
@ -26,7 +26,7 @@ void CalendarConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_calendar_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -34,32 +34,32 @@ void CalendarPrototype::initialize(GlobalObject& global_object)
|
|||
// 12.4.2 Temporal.Calendar.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Calendar"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.id, id_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.id, id_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.dateFromFields, date_from_fields, 1, attr);
|
||||
define_native_function(vm.names.yearMonthFromFields, year_month_from_fields, 1, attr);
|
||||
define_native_function(vm.names.monthDayFromFields, month_day_from_fields, 1, attr);
|
||||
define_native_function(vm.names.dateAdd, date_add, 2, attr);
|
||||
define_native_function(vm.names.dateUntil, date_until, 2, attr);
|
||||
define_native_function(vm.names.year, year, 1, attr);
|
||||
define_native_function(vm.names.month, month, 1, attr);
|
||||
define_native_function(vm.names.monthCode, month_code, 1, attr);
|
||||
define_native_function(vm.names.day, day, 1, attr);
|
||||
define_native_function(vm.names.dayOfWeek, day_of_week, 1, attr);
|
||||
define_native_function(vm.names.dayOfYear, day_of_year, 1, attr);
|
||||
define_native_function(vm.names.weekOfYear, week_of_year, 1, attr);
|
||||
define_native_function(vm.names.daysInWeek, days_in_week, 1, attr);
|
||||
define_native_function(vm.names.daysInMonth, days_in_month, 1, attr);
|
||||
define_native_function(vm.names.daysInYear, days_in_year, 1, attr);
|
||||
define_native_function(vm.names.monthsInYear, months_in_year, 1, attr);
|
||||
define_native_function(vm.names.inLeapYear, in_leap_year, 1, attr);
|
||||
define_native_function(vm.names.fields, fields, 1, attr);
|
||||
define_native_function(vm.names.mergeFields, merge_fields, 2, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_native_function(vm.names.era, era, 1, attr);
|
||||
define_native_function(vm.names.eraYear, era_year, 1, attr);
|
||||
define_old_native_function(vm.names.dateFromFields, date_from_fields, 1, attr);
|
||||
define_old_native_function(vm.names.yearMonthFromFields, year_month_from_fields, 1, attr);
|
||||
define_old_native_function(vm.names.monthDayFromFields, month_day_from_fields, 1, attr);
|
||||
define_old_native_function(vm.names.dateAdd, date_add, 2, attr);
|
||||
define_old_native_function(vm.names.dateUntil, date_until, 2, attr);
|
||||
define_old_native_function(vm.names.year, year, 1, attr);
|
||||
define_old_native_function(vm.names.month, month, 1, attr);
|
||||
define_old_native_function(vm.names.monthCode, month_code, 1, attr);
|
||||
define_old_native_function(vm.names.day, day, 1, attr);
|
||||
define_old_native_function(vm.names.dayOfWeek, day_of_week, 1, attr);
|
||||
define_old_native_function(vm.names.dayOfYear, day_of_year, 1, attr);
|
||||
define_old_native_function(vm.names.weekOfYear, week_of_year, 1, attr);
|
||||
define_old_native_function(vm.names.daysInWeek, days_in_week, 1, attr);
|
||||
define_old_native_function(vm.names.daysInMonth, days_in_month, 1, attr);
|
||||
define_old_native_function(vm.names.daysInYear, days_in_year, 1, attr);
|
||||
define_old_native_function(vm.names.monthsInYear, months_in_year, 1, attr);
|
||||
define_old_native_function(vm.names.inLeapYear, in_leap_year, 1, attr);
|
||||
define_old_native_function(vm.names.fields, fields, 1, attr);
|
||||
define_old_native_function(vm.names.mergeFields, merge_fields, 2, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_function(vm.names.era, era, 1, attr);
|
||||
define_old_native_function(vm.names.eraYear, era_year, 1, attr);
|
||||
}
|
||||
|
||||
// 12.4.3 get Temporal.Calendar.prototype.id, https://tc39.es/proposal-temporal/#sec-get-temporal.calendar.prototype.id
|
||||
|
|
|
@ -28,7 +28,7 @@ void DurationConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_duration_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -27,24 +27,24 @@ void DurationPrototype::initialize(GlobalObject& global_object)
|
|||
// 7.3.2 Temporal.Duration.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Duration"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.years, years_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.months, months_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.weeks, weeks_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.days, days_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.hours, hours_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.minutes, minutes_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.seconds, seconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.milliseconds, milliseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.microseconds, microseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.nanoseconds, nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.sign, sign_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.blank, blank_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.years, years_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.months, months_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.weeks, weeks_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.days, days_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.hours, hours_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.minutes, minutes_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.seconds, seconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.milliseconds, milliseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.microseconds, microseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.nanoseconds, nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.sign, sign_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.blank, blank_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.with, with, 1, attr);
|
||||
define_native_function(vm.names.negated, negated, 0, attr);
|
||||
define_native_function(vm.names.abs, abs, 0, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.with, with, 1, attr);
|
||||
define_old_native_function(vm.names.negated, negated, 0, attr);
|
||||
define_old_native_function(vm.names.abs, abs, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
}
|
||||
|
||||
// 7.3.3 get Temporal.Duration.prototype.years, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.years
|
||||
|
|
|
@ -28,12 +28,12 @@ void InstantConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_instant_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_native_function(vm.names.fromEpochSeconds, from_epoch_seconds, 1, attr);
|
||||
define_native_function(vm.names.fromEpochMilliseconds, from_epoch_milliseconds, 1, attr);
|
||||
define_native_function(vm.names.fromEpochMicroseconds, from_epoch_microseconds, 1, attr);
|
||||
define_native_function(vm.names.fromEpochNanoseconds, from_epoch_nanoseconds, 1, attr);
|
||||
define_native_function(vm.names.compare, compare, 2, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.fromEpochSeconds, from_epoch_seconds, 1, attr);
|
||||
define_old_native_function(vm.names.fromEpochMilliseconds, from_epoch_milliseconds, 1, attr);
|
||||
define_old_native_function(vm.names.fromEpochMicroseconds, from_epoch_microseconds, 1, attr);
|
||||
define_old_native_function(vm.names.fromEpochNanoseconds, from_epoch_nanoseconds, 1, attr);
|
||||
define_old_native_function(vm.names.compare, compare, 2, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -32,24 +32,24 @@ void InstantPrototype::initialize(GlobalObject& global_object)
|
|||
// 8.3.2 Temporal.Instant.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Instant"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.add, add, 1, attr);
|
||||
define_native_function(vm.names.subtract, subtract, 1, attr);
|
||||
define_native_function(vm.names.until, until, 1, attr);
|
||||
define_native_function(vm.names.since, since, 1, attr);
|
||||
define_native_function(vm.names.round, round, 1, attr);
|
||||
define_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_native_function(vm.names.toZonedDateTime, to_zoned_date_time, 1, attr);
|
||||
define_native_function(vm.names.toZonedDateTimeISO, to_zoned_date_time_iso, 1, attr);
|
||||
define_old_native_function(vm.names.add, add, 1, attr);
|
||||
define_old_native_function(vm.names.subtract, subtract, 1, attr);
|
||||
define_old_native_function(vm.names.until, until, 1, attr);
|
||||
define_old_native_function(vm.names.since, since, 1, attr);
|
||||
define_old_native_function(vm.names.round, round, 1, attr);
|
||||
define_old_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.toZonedDateTime, to_zoned_date_time, 1, attr);
|
||||
define_old_native_function(vm.names.toZonedDateTimeISO, to_zoned_date_time_iso, 1, attr);
|
||||
}
|
||||
|
||||
// 8.3.3 get Temporal.Instant.prototype.epochSeconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochseconds
|
||||
|
|
|
@ -35,15 +35,15 @@ void Now::initialize(GlobalObject& global_object)
|
|||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.Now"), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.timeZone, time_zone, 0, attr);
|
||||
define_native_function(vm.names.instant, instant, 0, attr);
|
||||
define_native_function(vm.names.plainDateTime, plain_date_time, 1, attr);
|
||||
define_native_function(vm.names.plainDateTimeISO, plain_date_time_iso, 0, attr);
|
||||
define_native_function(vm.names.zonedDateTime, zoned_date_time, 1, attr);
|
||||
define_native_function(vm.names.zonedDateTimeISO, zoned_date_time_iso, 0, attr);
|
||||
define_native_function(vm.names.plainDate, plain_date, 1, attr);
|
||||
define_native_function(vm.names.plainDateISO, plain_date_iso, 0, attr);
|
||||
define_native_function(vm.names.plainTimeISO, plain_time_iso, 0, attr);
|
||||
define_old_native_function(vm.names.timeZone, time_zone, 0, attr);
|
||||
define_old_native_function(vm.names.instant, instant, 0, attr);
|
||||
define_old_native_function(vm.names.plainDateTime, plain_date_time, 1, attr);
|
||||
define_old_native_function(vm.names.plainDateTimeISO, plain_date_time_iso, 0, attr);
|
||||
define_old_native_function(vm.names.zonedDateTime, zoned_date_time, 1, attr);
|
||||
define_old_native_function(vm.names.zonedDateTimeISO, zoned_date_time_iso, 0, attr);
|
||||
define_old_native_function(vm.names.plainDate, plain_date, 1, attr);
|
||||
define_old_native_function(vm.names.plainDateISO, plain_date_iso, 0, attr);
|
||||
define_old_native_function(vm.names.plainTimeISO, plain_time_iso, 0, attr);
|
||||
}
|
||||
|
||||
// 2.2.1 Temporal.Now.timeZone ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.timezone
|
||||
|
|
|
@ -30,8 +30,8 @@ void PlainDateConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_plain_date_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_native_function(vm.names.compare, compare, 2, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.compare, compare, 2, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(3), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -33,33 +33,33 @@ void PlainDatePrototype::initialize(GlobalObject& global_object)
|
|||
// 3.3.2 Temporal.PlainDate.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainDate"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
||||
define_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
||||
define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_native_function(vm.names.withCalendar, with_calendar, 1, attr);
|
||||
define_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_native_function(vm.names.toPlainDateTime, to_plain_date_time, 0, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
||||
define_old_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_old_native_function(vm.names.withCalendar, with_calendar, 1, attr);
|
||||
define_old_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_old_native_function(vm.names.toPlainDateTime, to_plain_date_time, 0, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
}
|
||||
|
||||
// 3.3.3 get Temporal.PlainDate.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.calendar
|
||||
|
|
|
@ -30,8 +30,8 @@ void PlainDateTimeConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_plain_date_time_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_native_function(vm.names.compare, compare, 2, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.compare, compare, 2, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(3), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -30,39 +30,39 @@ void PlainDateTimePrototype::initialize(GlobalObject& global_object)
|
|||
// 5.3.2 Temporal.PlainDateTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainDateTime"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.withPlainTime, with_plain_time, 1, attr);
|
||||
define_native_function(vm.names.withPlainDate, with_plain_date, 1, attr);
|
||||
define_native_function(vm.names.withCalendar, with_calendar, 1, attr);
|
||||
define_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_native_function(vm.names.toPlainDate, to_plain_date, 0, attr);
|
||||
define_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
||||
define_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
||||
define_native_function(vm.names.toPlainTime, to_plain_time, 0, attr);
|
||||
define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_old_native_function(vm.names.withPlainTime, with_plain_time, 1, attr);
|
||||
define_old_native_function(vm.names.withPlainDate, with_plain_date, 1, attr);
|
||||
define_old_native_function(vm.names.withCalendar, with_calendar, 1, attr);
|
||||
define_old_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainDate, to_plain_date, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainTime, to_plain_time, 0, attr);
|
||||
define_old_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
}
|
||||
|
||||
// 5.3.3 get Temporal.PlainDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.calendar
|
||||
|
|
|
@ -31,7 +31,7 @@ void PlainMonthDayConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.length, Value(2), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
}
|
||||
|
||||
// 10.1.1 Temporal.PlainMonthDay ( isoMonth, isoDay [ , calendarLike [ , referenceISOYear ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday
|
||||
|
|
|
@ -28,18 +28,18 @@ void PlainMonthDayPrototype::initialize(GlobalObject& global_object)
|
|||
// 10.3.2 Temporal.PlainMonthDay.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainMonthDay"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_native_function(vm.names.toPlainDate, to_plain_date, 1, attr);
|
||||
define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_old_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainDate, to_plain_date, 1, attr);
|
||||
define_old_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
}
|
||||
|
||||
// 10.3.3 get Temporal.PlainMonthDay.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.calendar
|
||||
|
|
|
@ -28,8 +28,8 @@ void PlainTimeConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_plain_time_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_native_function(vm.names.compare, compare, 2, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.compare, compare, 2, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -29,23 +29,23 @@ void PlainTimePrototype::initialize(GlobalObject& global_object)
|
|||
// 4.3.2 Temporal.PlainTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainTime"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.with, with, 1, attr);
|
||||
define_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_native_function(vm.names.toPlainDateTime, to_plain_date_time, 1, attr);
|
||||
define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.with, with, 1, attr);
|
||||
define_old_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_old_native_function(vm.names.toPlainDateTime, to_plain_date_time, 1, attr);
|
||||
define_old_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
}
|
||||
|
||||
// 4.3.3 get Temporal.PlainTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.calendar
|
||||
|
|
|
@ -32,8 +32,8 @@ void PlainYearMonthConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.length, Value(2), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_native_function(vm.names.compare, compare, 2, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.compare, compare, 2, attr);
|
||||
}
|
||||
|
||||
// 9.1.1 Temporal.PlainYearMonth ( isoYear, isoMonth [ , calendarLike [ , referenceISODay ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth
|
||||
|
|
|
@ -28,25 +28,25 @@ void PlainYearMonthPrototype::initialize(GlobalObject& global_object)
|
|||
// 9.3.2 Temporal.PlainYearMonth.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.PlainYearMonth"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_native_function(vm.names.toPlainDate, to_plain_date, 1, attr);
|
||||
define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_old_native_function(vm.names.equals, equals, 1, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainDate, to_plain_date, 1, attr);
|
||||
define_old_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
}
|
||||
|
||||
// 9.3.3 get Temporal.PlainYearMonth.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.calendar
|
||||
|
|
|
@ -26,7 +26,7 @@ void TimeZoneConstructor::initialize(GlobalObject& global_object)
|
|||
define_direct_property(vm.names.prototype, global_object.temporal_time_zone_prototype(), 0);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_old_native_function(vm.names.from, from, 1, attr);
|
||||
|
||||
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
}
|
||||
|
|
|
@ -27,12 +27,12 @@ void TimeZonePrototype::initialize(GlobalObject& global_object)
|
|||
auto& vm = this->vm();
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_accessor(vm.names.id, id_getter, {}, Attribute::Configurable);
|
||||
define_native_function(vm.names.getOffsetNanosecondsFor, get_offset_nanoseconds_for, 1, attr);
|
||||
define_native_function(vm.names.getOffsetStringFor, get_offset_string_for, 1, attr);
|
||||
define_native_function(vm.names.getPlainDateTimeFor, get_plain_date_time_for, 1, attr);
|
||||
define_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
define_old_native_accessor(vm.names.id, id_getter, {}, Attribute::Configurable);
|
||||
define_old_native_function(vm.names.getOffsetNanosecondsFor, get_offset_nanoseconds_for, 1, attr);
|
||||
define_old_native_function(vm.names.getOffsetStringFor, get_offset_string_for, 1, attr);
|
||||
define_old_native_function(vm.names.getPlainDateTimeFor, get_plain_date_time_for, 1, attr);
|
||||
define_old_native_function(vm.names.toString, to_string, 0, attr);
|
||||
define_old_native_function(vm.names.toJSON, to_json, 0, attr);
|
||||
|
||||
// 11.4.2 Temporal.TimeZone.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.TimeZone"), Attribute::Configurable);
|
||||
|
|
|
@ -33,44 +33,44 @@ void ZonedDateTimePrototype::initialize(GlobalObject& global_object)
|
|||
// 6.3.2 Temporal.ZonedDateTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.ZonedDateTime"), Attribute::Configurable);
|
||||
|
||||
define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.timeZone, time_zone_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.offsetNanoseconds, offset_nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.offset, offset_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.timeZone, time_zone_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.offsetNanoseconds, offset_nanoseconds_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.offset, offset_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
||||
define_old_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_native_function(vm.names.toInstant, to_instant, 0, attr);
|
||||
define_native_function(vm.names.toPlainDate, to_plain_date, 0, attr);
|
||||
define_native_function(vm.names.toPlainTime, to_plain_time, 0, attr);
|
||||
define_native_function(vm.names.toPlainDateTime, to_plain_date_time, 0, attr);
|
||||
define_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
||||
define_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
||||
define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
define_old_native_function(vm.names.valueOf, value_of, 0, attr);
|
||||
define_old_native_function(vm.names.toInstant, to_instant, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainDate, to_plain_date, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainTime, to_plain_time, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainDateTime, to_plain_date_time, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
||||
define_old_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
||||
define_old_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
||||
}
|
||||
|
||||
// 6.3.3 get Temporal.ZonedDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.calendar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue