1 // Copyright 2021 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_OBJECTS_JS_TEMPORAL_OBJECTS_H_ 6 #define V8_OBJECTS_JS_TEMPORAL_OBJECTS_H_ 7 8 #include "src/execution/isolate.h" 9 #include "src/heap/factory.h" 10 #include "src/objects/objects.h" 11 12 // Has to be the last include (doesn't have include guards): 13 #include "src/objects/object-macros.h" 14 15 namespace v8 { 16 namespace internal { 17 18 #include "torque-generated/src/objects/js-temporal-objects-tq.inc" 19 20 #define DECLARE_TEMPORAL_INLINE_GETTER_SETTER(field) \ 21 inline void set_##field(int32_t field); \ 22 inline int32_t field() const; 23 24 #define DECLARE_TEMPORAL_TIME_INLINE_GETTER_SETTER() \ 25 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_hour) \ 26 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_minute) \ 27 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_second) \ 28 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_millisecond) \ 29 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_microsecond) \ 30 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_nanosecond) 31 32 #define DECLARE_TEMPORAL_DATE_INLINE_GETTER_SETTER() \ 33 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_year) \ 34 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_month) \ 35 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(iso_day) 36 37 #define TEMPORAL_UNIMPLEMENTED(T) \ 38 { \ 39 printf("TBW %s\n", __PRETTY_FUNCTION__); \ 40 UNIMPLEMENTED(); \ 41 } 42 43 class JSTemporalPlainDate; 44 class JSTemporalPlainMonthDay; 45 class JSTemporalPlainYearMonth; 46 47 class JSTemporalCalendar 48 : public TorqueGeneratedJSTemporalCalendar<JSTemporalCalendar, JSObject> { 49 public: 50 // #sec-temporal.calendar 51 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalCalendar> Constructor( 52 Isolate* isolate, Handle<JSFunction> target, 53 Handle<HeapObject> new_target, Handle<Object> identifier); 54 55 // #sec-temporal.calendar.prototype.year 56 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> Year( 57 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 58 Handle<Object> temporal_date_like); 59 60 // #sec-temporal.calendar.prototype.daysinyear 61 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> DaysInYear( 62 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 63 Handle<Object> temporal_date_like); 64 65 // #sec-temporal.calendar.prototype.dayofweek 66 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> DayOfWeek( 67 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 68 Handle<Object> temporal_date_like); 69 70 // #sec-temporal.calendar.prototype.dayofyear 71 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> DayOfYear( 72 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 73 Handle<Object> temporal_date_like); 74 75 // #sec-temporal.calendar.prototype.monthsinyear 76 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> MonthsInYear( 77 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 78 Handle<Object> temporal_date_like); 79 80 // #sec-temporal.calendar.prototype.inleapyear 81 V8_WARN_UNUSED_RESULT static MaybeHandle<Oddball> InLeapYear( 82 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 83 Handle<Object> temporal_date_like); 84 85 // #sec-temporal.calendar.prototype.daysinmonth 86 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> DaysInMonth( 87 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 88 Handle<Object> temporal_date_like); 89 90 // #sec-temporal.calendar.prototype.daysinweek 91 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> DaysInWeek( 92 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 93 Handle<Object> temporal_date_like); 94 95 // #sec-temporal.calendar.prototype.datefromfields 96 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDate> DateFromFields( 97 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 98 Handle<Object> fields, Handle<Object> options); 99 100 // #sec-temporal.calendar.prototype.mergefields 101 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> MergeFields( 102 Isolate* isolate, Handle<JSTemporalCalendar> calendar, 103 Handle<Object> fields, Handle<Object> additional_fields); 104 105 // #sec-temporal.calendar.prototype.tostring 106 static MaybeHandle<String> ToString(Isolate* isolate, 107 Handle<JSTemporalCalendar> calendar, 108 const char* method); 109 110 DECL_PRINTER(JSTemporalCalendar) 111 112 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_CALENDAR_FLAGS() 113 114 DECL_INT_ACCESSORS(calendar_index) 115 116 TQ_OBJECT_CONSTRUCTORS(JSTemporalCalendar) 117 }; 118 119 class JSTemporalDuration 120 : public TorqueGeneratedJSTemporalDuration<JSTemporalDuration, JSObject> { 121 public: 122 // #sec-temporal.duration 123 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalDuration> Constructor( 124 Isolate* isolate, Handle<JSFunction> target, 125 Handle<HeapObject> new_target, Handle<Object> years, 126 Handle<Object> months, Handle<Object> weeks, Handle<Object> days, 127 Handle<Object> hours, Handle<Object> minutes, Handle<Object> seconds, 128 Handle<Object> milliseconds, Handle<Object> microseconds, 129 Handle<Object> nanoseconds); 130 131 // #sec-get-temporal.duration.prototype.sign 132 V8_WARN_UNUSED_RESULT static MaybeHandle<Smi> Sign( 133 Isolate* isolate, Handle<JSTemporalDuration> duration); 134 135 // #sec-get-temporal.duration.prototype.blank 136 V8_WARN_UNUSED_RESULT static MaybeHandle<Oddball> Blank( 137 Isolate* isolate, Handle<JSTemporalDuration> duration); 138 139 // #sec-temporal.duration.prototype.negated 140 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalDuration> Negated( 141 Isolate* isolate, Handle<JSTemporalDuration> duration); 142 143 // #sec-temporal.duration.prototype.abs 144 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalDuration> Abs( 145 Isolate* isolate, Handle<JSTemporalDuration> duration); 146 147 DECL_PRINTER(JSTemporalDuration) 148 149 TQ_OBJECT_CONSTRUCTORS(JSTemporalDuration) 150 }; 151 152 class JSTemporalInstant 153 : public TorqueGeneratedJSTemporalInstant<JSTemporalInstant, JSObject> { 154 public: 155 // #sec-temporal-instant-constructor 156 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> Constructor( 157 Isolate* isolate, Handle<JSFunction> target, 158 Handle<HeapObject> new_target, Handle<Object> epoch_nanoseconds); 159 160 // #sec-temporal.now.instant 161 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> Now( 162 Isolate* isolate); 163 164 // #sec-temporal.instant.fromepochseconds 165 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> FromEpochSeconds( 166 Isolate* isolate, Handle<Object> epoch_seconds); 167 // #sec-temporal.instant.fromepochmilliseconds 168 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> 169 FromEpochMilliseconds(Isolate* isolate, Handle<Object> epoch_milliseconds); 170 // #sec-temporal.instant.fromepochmicroseconds 171 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> 172 FromEpochMicroseconds(Isolate* isolate, Handle<Object> epoch_microseconds); 173 // #sec-temporal.instant.fromepochnanoeconds 174 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> 175 FromEpochNanoseconds(Isolate* isolate, Handle<Object> epoch_nanoseconds); 176 177 // #sec-temporal.instant.from 178 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalInstant> From( 179 Isolate* isolate, Handle<Object> item); 180 181 DECL_PRINTER(JSTemporalInstant) 182 183 TQ_OBJECT_CONSTRUCTORS(JSTemporalInstant) 184 }; 185 186 class JSTemporalPlainDate 187 : public TorqueGeneratedJSTemporalPlainDate<JSTemporalPlainDate, JSObject> { 188 public: 189 // #sec-temporal-createtemporaldate 190 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDate> Constructor( 191 Isolate* isolate, Handle<JSFunction> target, 192 Handle<HeapObject> new_target, Handle<Object> iso_year, 193 Handle<Object> iso_month, Handle<Object> iso_day, 194 Handle<Object> calendar_like); 195 196 // #sec-temporal.plaindate.prototype.withcalendar 197 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDate> WithCalendar( 198 Isolate* isolate, Handle<JSTemporalPlainDate> plain_date, 199 Handle<Object> calendar_like); 200 201 // #sec-temporal.plaindate.from 202 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDate> From( 203 Isolate* isolate, Handle<Object> item, Handle<Object> options); 204 205 // #sec-temporal.plaindate.prototype.getisofields 206 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields( 207 Isolate* isolate, Handle<JSTemporalPlainDate> plain_date); 208 209 // #sec-temporal.now.plaindate 210 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDate> Now( 211 Isolate* isolate, Handle<Object> calendar_like, 212 Handle<Object> temporal_time_zone_like); 213 214 // #sec-temporal.now.plaindateiso 215 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDate> NowISO( 216 Isolate* isolate, Handle<Object> temporal_time_zone_like); 217 DECL_PRINTER(JSTemporalPlainDate) 218 219 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_YEAR_MONTH_DAY() 220 221 DECLARE_TEMPORAL_DATE_INLINE_GETTER_SETTER() 222 223 TQ_OBJECT_CONSTRUCTORS(JSTemporalPlainDate) 224 }; 225 226 class JSTemporalPlainDateTime 227 : public TorqueGeneratedJSTemporalPlainDateTime<JSTemporalPlainDateTime, 228 JSObject> { 229 public: 230 // #sec-temporal-createtemporaldatetime 231 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDateTime> Constructor( 232 Isolate* isolate, Handle<JSFunction> target, 233 Handle<HeapObject> new_target, Handle<Object> iso_year, 234 Handle<Object> iso_month, Handle<Object> iso_day, Handle<Object> hour, 235 Handle<Object> minute, Handle<Object> second, Handle<Object> millisecond, 236 Handle<Object> microsecond, Handle<Object> nanosecond, 237 Handle<Object> calendar_like); 238 239 // #sec-temporal.plaindatetime.prototype.withcalendar 240 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDateTime> 241 WithCalendar(Isolate* isolate, Handle<JSTemporalPlainDateTime> date_time, 242 Handle<Object> calendar_like); 243 244 // #sec-temporal.plaindatetime.prototype.getisofields 245 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields( 246 Isolate* isolate, Handle<JSTemporalPlainDateTime> date_time); 247 248 // #sec-temporal.now.plaindatetime 249 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDateTime> Now( 250 Isolate* isolate, Handle<Object> calendar_like, 251 Handle<Object> temporal_time_zone_like); 252 253 // #sec-temporal.now.plaindatetimeiso 254 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainDateTime> NowISO( 255 Isolate* isolate, Handle<Object> temporal_time_zone_like); 256 257 DECL_PRINTER(JSTemporalPlainDateTime) 258 259 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_YEAR_MONTH_DAY() 260 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_HOUR_MINUTE_SECOND() 261 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_SECOND_PARTS() 262 263 DECLARE_TEMPORAL_DATE_INLINE_GETTER_SETTER() 264 DECLARE_TEMPORAL_TIME_INLINE_GETTER_SETTER() 265 266 TQ_OBJECT_CONSTRUCTORS(JSTemporalPlainDateTime) 267 }; 268 269 class JSTemporalPlainMonthDay 270 : public TorqueGeneratedJSTemporalPlainMonthDay<JSTemporalPlainMonthDay, 271 JSObject> { 272 public: 273 // ##sec-temporal.plainmonthday 274 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainMonthDay> Constructor( 275 Isolate* isolate, Handle<JSFunction> target, 276 Handle<HeapObject> new_target, Handle<Object> iso_month, 277 Handle<Object> iso_day, Handle<Object> calendar_like, 278 Handle<Object> reference_iso_year); 279 280 // #sec-temporal.plainmonthday.prototype.getisofields 281 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields( 282 Isolate* isolate, Handle<JSTemporalPlainMonthDay> month_day); 283 284 DECL_PRINTER(JSTemporalPlainMonthDay) 285 286 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_YEAR_MONTH_DAY() 287 288 DECLARE_TEMPORAL_DATE_INLINE_GETTER_SETTER() 289 290 TQ_OBJECT_CONSTRUCTORS(JSTemporalPlainMonthDay) 291 }; 292 293 class JSTemporalPlainTime 294 : public TorqueGeneratedJSTemporalPlainTime<JSTemporalPlainTime, JSObject> { 295 public: 296 // #sec-temporal-plaintime-constructor 297 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainTime> Constructor( 298 Isolate* isolate, Handle<JSFunction> target, 299 Handle<HeapObject> new_target, Handle<Object> hour, Handle<Object> minute, 300 Handle<Object> second, Handle<Object> millisecond, 301 Handle<Object> microsecond, Handle<Object> nanosecond); 302 303 // #sec-temporal.plaintime.from 304 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainTime> From( 305 Isolate* isolate, Handle<Object> item, Handle<Object> options); 306 307 // #sec-temporal.plaintime.prototype.getisofields 308 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields( 309 Isolate* isolate, Handle<JSTemporalPlainTime> plain_time); 310 311 // #sec-temporal.now.plaintimeiso 312 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainTime> NowISO( 313 Isolate* isolate, Handle<Object> temporal_time_zone_like); 314 315 DECL_PRINTER(JSTemporalPlainTime) 316 317 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_HOUR_MINUTE_SECOND() 318 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_SECOND_PARTS() 319 320 DECLARE_TEMPORAL_TIME_INLINE_GETTER_SETTER() 321 322 TQ_OBJECT_CONSTRUCTORS(JSTemporalPlainTime) 323 }; 324 325 class JSTemporalPlainYearMonth 326 : public TorqueGeneratedJSTemporalPlainYearMonth<JSTemporalPlainYearMonth, 327 JSObject> { 328 public: 329 // ##sec-temporal.plainyearmonth 330 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainYearMonth> 331 Constructor(Isolate* isolate, Handle<JSFunction> target, 332 Handle<HeapObject> new_target, Handle<Object> iso_year, 333 Handle<Object> iso_month, Handle<Object> calendar_like, 334 Handle<Object> reference_iso_day); 335 336 // #sec-temporal.plainyearmonth.prototype.getisofields 337 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields( 338 Isolate* isolate, Handle<JSTemporalPlainYearMonth> year_month); 339 340 // Abstract Operations 341 342 DECL_PRINTER(JSTemporalPlainYearMonth) 343 344 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_YEAR_MONTH_DAY() 345 346 DECLARE_TEMPORAL_DATE_INLINE_GETTER_SETTER() 347 348 TQ_OBJECT_CONSTRUCTORS(JSTemporalPlainYearMonth) 349 }; 350 351 class JSTemporalTimeZone 352 : public TorqueGeneratedJSTemporalTimeZone<JSTemporalTimeZone, JSObject> { 353 public: 354 // #sec-temporal.now.timezone 355 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalTimeZone> Now( 356 Isolate* isolate); 357 358 // #sec-temporal.timezone 359 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalTimeZone> Constructor( 360 Isolate* isolate, Handle<JSFunction> target, 361 Handle<HeapObject> new_target, Handle<Object> identifier); 362 363 // #sec-temporal.timezone.prototype.tostring 364 static MaybeHandle<Object> ToString(Isolate* isolate, 365 Handle<JSTemporalTimeZone> time_zone, 366 const char* method); 367 368 DECL_PRINTER(JSTemporalTimeZone) 369 370 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_TIME_ZONE_FLAGS() 371 DEFINE_TORQUE_GENERATED_JS_TEMPORAL_TIME_ZONE_SUB_MILLISECONDS() 372 373 DECL_BOOLEAN_ACCESSORS(is_offset) 374 DECL_INT_ACCESSORS(offset_milliseconds_or_time_zone_index) 375 376 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(offset_milliseconds) 377 DECLARE_TEMPORAL_INLINE_GETTER_SETTER(offset_sub_milliseconds) 378 379 int32_t time_zone_index() const; 380 int64_t offset_nanoseconds() const; 381 void set_offset_nanoseconds(int64_t offset_nanoseconds); 382 383 MaybeHandle<String> id(Isolate* isolate) const; 384 385 TQ_OBJECT_CONSTRUCTORS(JSTemporalTimeZone) 386 }; 387 388 class JSTemporalZonedDateTime 389 : public TorqueGeneratedJSTemporalZonedDateTime<JSTemporalZonedDateTime, 390 JSObject> { 391 public: 392 // #sec-temporal.zoneddatetime 393 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalZonedDateTime> Constructor( 394 Isolate* isolate, Handle<JSFunction> target, 395 Handle<HeapObject> new_target, Handle<Object> epoch_nanoseconds, 396 Handle<Object> time_zone_like, Handle<Object> calendar_like); 397 398 // #sec-temporal.zoneddatetime.prototype.withcalendar 399 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalZonedDateTime> 400 WithCalendar(Isolate* isolate, 401 Handle<JSTemporalZonedDateTime> zoned_date_time, 402 Handle<Object> calendar_like); 403 404 // #sec-temporal.zoneddatetime.prototype.withtimezone 405 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalZonedDateTime> 406 WithTimeZone(Isolate* isolate, 407 Handle<JSTemporalZonedDateTime> zoned_date_time, 408 Handle<Object> time_zone_like); 409 410 // #sec-temporal.zoneddatetime.prototype.getisofields 411 V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields( 412 Isolate* isolate, Handle<JSTemporalZonedDateTime> zoned_date_time); 413 414 // #sec-temporal.zoneddatetime.prototype.toplainyearmonth 415 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainYearMonth> 416 ToPlainYearMonth(Isolate* isolate, 417 Handle<JSTemporalZonedDateTime> zoned_date_time); 418 419 // #sec-temporal.zoneddatetime.prototype.toplainmonthday 420 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainMonthDay> 421 ToPlainMonthDay(Isolate* isolate, 422 Handle<JSTemporalZonedDateTime> zoned_date_time); 423 424 // #sec-temporal.now.zoneddatetime 425 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalZonedDateTime> Now( 426 Isolate* isolate, Handle<Object> calendar_like, 427 Handle<Object> temporal_time_zone_like); 428 429 // #sec-temporal.now.zoneddatetimeiso 430 V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalZonedDateTime> NowISO( 431 Isolate* isolate, Handle<Object> temporal_time_zone_like); 432 433 DECL_PRINTER(JSTemporalZonedDateTime) 434 435 TQ_OBJECT_CONSTRUCTORS(JSTemporalZonedDateTime) 436 }; 437 438 namespace temporal { 439 440 // #sec-temporal-createtemporalinstant 441 V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalInstant> CreateTemporalInstant( 442 Isolate* isolate, Handle<JSFunction> target, Handle<HeapObject> new_target, 443 Handle<BigInt> epoch_nanoseconds); 444 V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalInstant> CreateTemporalInstant( 445 Isolate* isolate, Handle<BigInt> epoch_nanoseconds); 446 447 // #sec-temporal-calendaryear 448 #define DECLARE_CALENDAR_ABSTRACT_OPERATION(Name) \ 449 V8_WARN_UNUSED_RESULT MaybeHandle<Object> Calendar##Name( \ 450 Isolate* isolate, Handle<JSReceiver> calendar, \ 451 Handle<JSReceiver> date_like); 452 DECLARE_CALENDAR_ABSTRACT_OPERATION(Year) 453 DECLARE_CALENDAR_ABSTRACT_OPERATION(Month) 454 DECLARE_CALENDAR_ABSTRACT_OPERATION(MonthCode) 455 DECLARE_CALENDAR_ABSTRACT_OPERATION(Day) 456 457 #ifdef V8_INTL_SUPPORT 458 DECLARE_CALENDAR_ABSTRACT_OPERATION(Era) 459 DECLARE_CALENDAR_ABSTRACT_OPERATION(EraYear) 460 #endif // V8_INTL_SUPPORT 461 462 #undef DECLARE_CALENDAR_ABSTRACT_OPERATION 463 464 // #sec-temporal-getiso8601calendar 465 V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalCalendar> GetISO8601Calendar( 466 Isolate* isolate); 467 468 // #sec-temporal-builtintimezonegetplaindatetimefor 469 V8_WARN_UNUSED_RESULT MaybeHandle<JSTemporalPlainDateTime> 470 BuiltinTimeZoneGetPlainDateTimeFor(Isolate* isolate, 471 Handle<JSReceiver> time_zone, 472 Handle<JSTemporalInstant> instant, 473 Handle<JSReceiver> calendar, 474 const char* method); 475 476 V8_WARN_UNUSED_RESULT MaybeHandle<Object> InvokeCalendarMethod( 477 Isolate* isolate, Handle<JSReceiver> calendar, Handle<String> name, 478 Handle<JSReceiver> temporal_like); 479 480 V8_WARN_UNUSED_RESULT MaybeHandle<JSReceiver> ToTemporalCalendar( 481 Isolate* isolate, Handle<Object> temporal_calendar_like, 482 const char* method); 483 484 V8_WARN_UNUSED_RESULT MaybeHandle<JSReceiver> ToTemporalTimeZone( 485 Isolate* isolate, Handle<Object> temporal_time_zone_like, 486 const char* method); 487 488 } // namespace temporal 489 } // namespace internal 490 } // namespace v8 491 #include "src/objects/object-macros-undef.h" 492 #endif // V8_OBJECTS_JS_TEMPORAL_OBJECTS_H_ 493