#ifndef V8_OBJECTS_JS_TEMPORAL_OBJECTS_H_
#define V8_OBJECTS_JS_TEMPORAL_OBJECTS_H_
#include "src/execution/isolate.h"
#include "src/heap/factory.h"
#include "src/objects/objects.h"
#include "src/objects/object-macros.h"
namespace v8 {
namespace internal {
#include "torque-generated/src/objects/js-temporal-objects-tq.inc"
#define DECLARE_TEMPORAL_INLINE_GETTER_SETTER(field) …
#define DECLARE_TEMPORAL_TIME_INLINE_GETTER_SETTER() …
#define DECLARE_TEMPORAL_DATE_INLINE_GETTER_SETTER() …
#define TEMPORAL_UNIMPLEMENTED(T) …
class JSTemporalPlainDate;
class JSTemporalPlainMonthDay;
class JSTemporalPlainYearMonth;
class JSTemporalCalendar
: public TorqueGeneratedJSTemporalCalendar<JSTemporalCalendar, JSObject> { … };
class JSTemporalDuration
: public TorqueGeneratedJSTemporalDuration<JSTemporalDuration, JSObject> { … };
class JSTemporalInstant
: public TorqueGeneratedJSTemporalInstant<JSTemporalInstant, JSObject> { … };
class JSTemporalPlainDate
: public TorqueGeneratedJSTemporalPlainDate<JSTemporalPlainDate, JSObject> { … };
class JSTemporalPlainDateTime
: public TorqueGeneratedJSTemporalPlainDateTime<JSTemporalPlainDateTime,
JSObject> { … };
class JSTemporalPlainMonthDay
: public TorqueGeneratedJSTemporalPlainMonthDay<JSTemporalPlainMonthDay,
JSObject> { … };
class JSTemporalPlainTime
: public TorqueGeneratedJSTemporalPlainTime<JSTemporalPlainTime, JSObject> { … };
class JSTemporalPlainYearMonth
: public TorqueGeneratedJSTemporalPlainYearMonth<JSTemporalPlainYearMonth,
JSObject> { … };
class JSTemporalTimeZone
: public TorqueGeneratedJSTemporalTimeZone<JSTemporalTimeZone, JSObject> { … };
class JSTemporalZonedDateTime
: public TorqueGeneratedJSTemporalZonedDateTime<JSTemporalZonedDateTime,
JSObject> { … };
namespace temporal {
struct DateRecord { … };
struct TimeRecord { … };
struct DateTimeRecord { … };
V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalPlainDateTime>
CreateTemporalDateTime(Isolate* isolate, const DateTimeRecord& date_time,
DirectHandle<JSReceiver> calendar);
MaybeHandle<JSTemporalTimeZone> CreateTemporalTimeZone(
Isolate* isolate, Handle<String> identifier);
V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalInstant> CreateTemporalInstant(
Isolate* isolate, Handle<JSFunction> target, Handle<HeapObject> new_target,
DirectHandle<BigInt> epoch_nanoseconds);
V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalInstant> CreateTemporalInstant(
Isolate* isolate, DirectHandle<BigInt> epoch_nanoseconds);
#define DECLARE_CALENDAR_ABSTRACT_INT_OPERATION(Name) …
#define DECLARE_CALENDAR_ABSTRACT_OPERATION …
DECLARE_CALENDAR_ABSTRACT_INT_OPERATION(Year)
DECLARE_CALENDAR_ABSTRACT_INT_OPERATION(Month)
DECLARE_CALENDAR_ABSTRACT_OPERATION(MonthCode)
DECLARE_CALENDAR_ABSTRACT_INT_OPERATION(Day)
DECLARE_CALENDAR_ABSTRACT_OPERATION(DayOfWeek)
DECLARE_CALENDAR_ABSTRACT_OPERATION(DayOfYear)
DECLARE_CALENDAR_ABSTRACT_OPERATION(WeekOfYear)
DECLARE_CALENDAR_ABSTRACT_OPERATION(DaysInWeek)
DECLARE_CALENDAR_ABSTRACT_OPERATION(DaysInMonth)
DECLARE_CALENDAR_ABSTRACT_OPERATION(DaysInYear)
DECLARE_CALENDAR_ABSTRACT_OPERATION(MonthsInYear)
DECLARE_CALENDAR_ABSTRACT_OPERATION(InLeapYear)
#ifdef V8_INTL_SUPPORT
DECLARE_CALENDAR_ABSTRACT_OPERATION(Era)
DECLARE_CALENDAR_ABSTRACT_OPERATION(EraYear)
#endif
#undef DECLARE_CALENDAR_ABSTRACT_OPERATION
Handle<JSTemporalCalendar> GetISO8601Calendar(Isolate* isolate);
V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalPlainDateTime>
BuiltinTimeZoneGetPlainDateTimeFor(Isolate* isolate,
Handle<JSReceiver> time_zone,
Handle<JSTemporalInstant> instant,
DirectHandle<JSReceiver> calendar,
const char* method_name);
V8_WARN_UNUSED_RESULT MaybeHandle<Object> InvokeCalendarMethod(
Isolate* isolate, Handle<JSReceiver> calendar, Handle<String> name,
Handle<JSReceiver> temporal_like);
V8_WARN_UNUSED_RESULT MaybeHandle<JSReceiver> ToTemporalCalendar(
Isolate* isolate, Handle<Object> temporal_calendar_like,
const char* method_name);
V8_WARN_UNUSED_RESULT MaybeHandle<JSReceiver> ToTemporalTimeZone(
Isolate* isolate, Handle<Object> temporal_time_zone_like,
const char* method_name);
V8_WARN_UNUSED_RESULT MaybeHandle<Oddball> IsInvalidTemporalCalendarField(
Isolate* isolate, Handle<String> string,
DirectHandle<FixedArray> field_names);
V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalCalendar> GetBuiltinCalendar(
Isolate* isolate, Handle<String> id);
MaybeHandle<JSTemporalInstant> BuiltinTimeZoneGetInstantForCompatible(
Isolate* isolate, Handle<JSReceiver> time_zone,
Handle<JSTemporalPlainDateTime> date_time, const char* method_name);
struct TimeDurationRecord { … };
struct DurationRecord { … };
Maybe<DurationRecord> ToPartialDuration(
Isolate* isolate, Handle<Object> temporal_duration_like_obj,
const DurationRecord& input);
bool IsValidDuration(Isolate* isolate, const DurationRecord& dur);
}
}
}
#include "src/objects/object-macros-undef.h"
#endif