mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
Our Temporal implementation is woefully out of date. The spec has been so vastly rewritten that it is unfortunately not practical to update our implementation in-place. Even just removing Temporal objects that were removed from the spec, or updating any of the simpler remaining objects, has proven to be a mess in previous attempts. So, this removes our Temporal implementation. AOs used by other specs are left intact.
31 lines
810 B
C++
31 lines
810 B
C++
/*
|
|
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibJS/Runtime/GlobalObject.h>
|
|
#include <LibJS/Runtime/Temporal/Temporal.h>
|
|
|
|
namespace JS::Temporal {
|
|
|
|
GC_DEFINE_ALLOCATOR(Temporal);
|
|
|
|
// 1 The Temporal Object, https://tc39.es/proposal-temporal/#sec-temporal-objects
|
|
Temporal::Temporal(Realm& realm)
|
|
: Object(ConstructWithPrototypeTag::Tag, realm.intrinsics().object_prototype())
|
|
{
|
|
}
|
|
|
|
void Temporal::initialize(Realm& realm)
|
|
{
|
|
Base::initialize(realm);
|
|
|
|
auto& vm = this->vm();
|
|
|
|
// 1.1.1 Temporal [ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal-@@tostringtag
|
|
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, "Temporal"_string), Attribute::Configurable);
|
|
}
|
|
|
|
}
|