mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 16:46:08 +00:00
LibJS/Temporal: Unroll the loop in to_temporal_time_record
This is an editorial change in the Temporal spec. See: tc39/proposal-temporal@8e80575
This commit is contained in:
parent
00da2e86e6
commit
b45225dbac
Notes:
sideshowbarker
2024-07-17 04:14:28 +09:00
Author: https://github.com/Epigenetic
Commit: b45225dbac
Pull-request: https://github.com/SerenityOS/serenity/pull/16057
Reviewed-by: https://github.com/linusg ✅
2 changed files with 83 additions and 38 deletions
|
@ -72,19 +72,6 @@ struct TemporalTimeLikeRecordField {
|
|||
PropertyKey property_name;
|
||||
};
|
||||
|
||||
template<typename StructT, typename ValueT>
|
||||
auto temporal_time_like_record_fields = [](VM& vm) {
|
||||
using FieldT = TemporalTimeLikeRecordField<StructT, ValueT>;
|
||||
return AK::Array {
|
||||
FieldT { &StructT::hour, vm.names.hour },
|
||||
FieldT { &StructT::minute, vm.names.minute },
|
||||
FieldT { &StructT::second, vm.names.second },
|
||||
FieldT { &StructT::millisecond, vm.names.millisecond },
|
||||
FieldT { &StructT::microsecond, vm.names.microsecond },
|
||||
FieldT { &StructT::nanosecond, vm.names.nanosecond },
|
||||
};
|
||||
};
|
||||
|
||||
enum class ToTemporalTimeRecordCompleteness {
|
||||
Partial,
|
||||
Complete,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue