11cb0ef41Sopenharmony_ci// Copyright 2021 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci// found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci#include 'src/objects/js-temporal-objects.h'
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_cibitfield struct JSTemporalCalendarFlags extends uint31 {
81cb0ef41Sopenharmony_ci  calendar_index: int32: 5 bit;
91cb0ef41Sopenharmony_ci}
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_cibitfield struct JSTemporalYearMonthDay extends uint31 {
121cb0ef41Sopenharmony_ci  iso_year: int32: 20 bit;
131cb0ef41Sopenharmony_ci  iso_month: int32: 4 bit;
141cb0ef41Sopenharmony_ci  iso_day: int32: 5 bit;
151cb0ef41Sopenharmony_ci}
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_cibitfield struct JSTemporalHourMinuteSecond extends uint31 {
181cb0ef41Sopenharmony_ci  iso_hour: int32: 5 bit;
191cb0ef41Sopenharmony_ci  iso_minute: int32: 6 bit;
201cb0ef41Sopenharmony_ci  iso_second: int32: 6 bit;
211cb0ef41Sopenharmony_ci}
221cb0ef41Sopenharmony_ci
231cb0ef41Sopenharmony_cibitfield struct JSTemporalSecondParts extends uint31 {
241cb0ef41Sopenharmony_ci  iso_millisecond: int32: 10 bit;
251cb0ef41Sopenharmony_ci  iso_microsecond: int32: 10 bit;
261cb0ef41Sopenharmony_ci  iso_nanosecond: int32: 10 bit;
271cb0ef41Sopenharmony_ci}
281cb0ef41Sopenharmony_ci
291cb0ef41Sopenharmony_cibitfield struct JSTemporalTimeZoneFlags extends uint31 {
301cb0ef41Sopenharmony_ci  is_offset: bool: 1 bit;
311cb0ef41Sopenharmony_ci  offset_milliseconds_or_time_zone_index: int32: 28 bit;
321cb0ef41Sopenharmony_ci}
331cb0ef41Sopenharmony_cibitfield struct JSTemporalTimeZoneSubMilliseconds extends uint31 {
341cb0ef41Sopenharmony_ci  offset_sub_milliseconds: int32: 21 bit;
351cb0ef41Sopenharmony_ci}
361cb0ef41Sopenharmony_ci
371cb0ef41Sopenharmony_ciextern class JSTemporalCalendar extends JSObject {
381cb0ef41Sopenharmony_ci  flags: SmiTagged<JSTemporalCalendarFlags>;
391cb0ef41Sopenharmony_ci}
401cb0ef41Sopenharmony_ci
411cb0ef41Sopenharmony_ciextern class JSTemporalDuration extends JSObject {
421cb0ef41Sopenharmony_ci  years: Number;
431cb0ef41Sopenharmony_ci  months: Number;
441cb0ef41Sopenharmony_ci  weeks: Number;
451cb0ef41Sopenharmony_ci  days: Number;
461cb0ef41Sopenharmony_ci  hours: Number;
471cb0ef41Sopenharmony_ci  minutes: Number;
481cb0ef41Sopenharmony_ci  seconds: Number;
491cb0ef41Sopenharmony_ci  milliseconds: Number;
501cb0ef41Sopenharmony_ci  microseconds: Number;
511cb0ef41Sopenharmony_ci  nanoseconds: Number;
521cb0ef41Sopenharmony_ci}
531cb0ef41Sopenharmony_ci
541cb0ef41Sopenharmony_ciextern class JSTemporalInstant extends JSObject { nanoseconds: BigInt; }
551cb0ef41Sopenharmony_ci
561cb0ef41Sopenharmony_ciextern class JSTemporalPlainDateTime extends JSObject {
571cb0ef41Sopenharmony_ci  year_month_day: SmiTagged<JSTemporalYearMonthDay>;
581cb0ef41Sopenharmony_ci  hour_minute_second: SmiTagged<JSTemporalHourMinuteSecond>;
591cb0ef41Sopenharmony_ci  second_parts: SmiTagged<JSTemporalSecondParts>;
601cb0ef41Sopenharmony_ci  calendar: JSReceiver;
611cb0ef41Sopenharmony_ci}
621cb0ef41Sopenharmony_ci
631cb0ef41Sopenharmony_ciextern class JSTemporalPlainDate extends JSObject {
641cb0ef41Sopenharmony_ci  year_month_day: SmiTagged<JSTemporalYearMonthDay>;
651cb0ef41Sopenharmony_ci  calendar: JSReceiver;
661cb0ef41Sopenharmony_ci}
671cb0ef41Sopenharmony_ci
681cb0ef41Sopenharmony_ciextern class JSTemporalPlainMonthDay extends JSObject {
691cb0ef41Sopenharmony_ci  year_month_day: SmiTagged<JSTemporalYearMonthDay>;
701cb0ef41Sopenharmony_ci  calendar: JSReceiver;
711cb0ef41Sopenharmony_ci}
721cb0ef41Sopenharmony_ci
731cb0ef41Sopenharmony_ciextern class JSTemporalPlainTime extends JSObject {
741cb0ef41Sopenharmony_ci  hour_minute_second: SmiTagged<JSTemporalHourMinuteSecond>;
751cb0ef41Sopenharmony_ci  second_parts: SmiTagged<JSTemporalSecondParts>;
761cb0ef41Sopenharmony_ci  calendar: JSReceiver;
771cb0ef41Sopenharmony_ci}
781cb0ef41Sopenharmony_ci
791cb0ef41Sopenharmony_ciextern class JSTemporalPlainYearMonth extends JSObject {
801cb0ef41Sopenharmony_ci  year_month_day: SmiTagged<JSTemporalYearMonthDay>;
811cb0ef41Sopenharmony_ci  calendar: JSReceiver;
821cb0ef41Sopenharmony_ci}
831cb0ef41Sopenharmony_ci
841cb0ef41Sopenharmony_ciextern class JSTemporalTimeZone extends JSObject {
851cb0ef41Sopenharmony_ci  flags: SmiTagged<JSTemporalTimeZoneFlags>;
861cb0ef41Sopenharmony_ci  details: SmiTagged<JSTemporalTimeZoneSubMilliseconds>;
871cb0ef41Sopenharmony_ci}
881cb0ef41Sopenharmony_ci
891cb0ef41Sopenharmony_ciextern class JSTemporalZonedDateTime extends JSObject {
901cb0ef41Sopenharmony_ci  nanoseconds: BigInt;
911cb0ef41Sopenharmony_ci  time_zone: JSReceiver;
921cb0ef41Sopenharmony_ci  calendar: JSReceiver;
931cb0ef41Sopenharmony_ci}
94