|
@@ -41,6 +41,7 @@
|
|
#include <LibJS/Runtime/Set.h>
|
|
#include <LibJS/Runtime/Set.h>
|
|
#include <LibJS/Runtime/Shape.h>
|
|
#include <LibJS/Runtime/Shape.h>
|
|
#include <LibJS/Runtime/StringObject.h>
|
|
#include <LibJS/Runtime/StringObject.h>
|
|
|
|
+#include <LibJS/Runtime/Temporal/Calendar.h>
|
|
#include <LibJS/Runtime/Temporal/Instant.h>
|
|
#include <LibJS/Runtime/Temporal/Instant.h>
|
|
#include <LibJS/Runtime/Temporal/TimeZone.h>
|
|
#include <LibJS/Runtime/Temporal/TimeZone.h>
|
|
#include <LibJS/Runtime/TypedArray.h>
|
|
#include <LibJS/Runtime/TypedArray.h>
|
|
@@ -427,6 +428,14 @@ static void print_data_view(JS::Object const& object, HashTable<JS::Object*>& se
|
|
out(" @ {:p}", data_view.viewed_array_buffer());
|
|
out(" @ {:p}", data_view.viewed_array_buffer());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void print_temporal_calendar(JS::Object const& object, HashTable<JS::Object*>& seen_objects)
|
|
|
|
+{
|
|
|
|
+ auto& calendar = static_cast<JS::Temporal::Calendar const&>(object);
|
|
|
|
+ print_type("Temporal.Calendar");
|
|
|
|
+ out(" ");
|
|
|
|
+ print_value(JS::js_string(object.vm(), calendar.identifier()), seen_objects);
|
|
|
|
+}
|
|
|
|
+
|
|
static void print_temporal_instant(JS::Object const& object, HashTable<JS::Object*>& seen_objects)
|
|
static void print_temporal_instant(JS::Object const& object, HashTable<JS::Object*>& seen_objects)
|
|
{
|
|
{
|
|
auto& instant = static_cast<JS::Temporal::Instant const&>(object);
|
|
auto& instant = static_cast<JS::Temporal::Instant const&>(object);
|
|
@@ -505,6 +514,8 @@ static void print_value(JS::Value value, HashTable<JS::Object*>& seen_objects)
|
|
return print_primitive_wrapper_object("Number", object, seen_objects);
|
|
return print_primitive_wrapper_object("Number", object, seen_objects);
|
|
if (is<JS::BooleanObject>(object))
|
|
if (is<JS::BooleanObject>(object))
|
|
return print_primitive_wrapper_object("Boolean", object, seen_objects);
|
|
return print_primitive_wrapper_object("Boolean", object, seen_objects);
|
|
|
|
+ if (is<JS::Temporal::Calendar>(object))
|
|
|
|
+ return print_temporal_calendar(object, seen_objects);
|
|
if (is<JS::Temporal::Instant>(object))
|
|
if (is<JS::Temporal::Instant>(object))
|
|
return print_temporal_instant(object, seen_objects);
|
|
return print_temporal_instant(object, seen_objects);
|
|
if (is<JS::Temporal::TimeZone>(object))
|
|
if (is<JS::Temporal::TimeZone>(object))
|