/* * Copyright (c) 2020, Matthew Olsson * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace JS { NonnullGCPtr SymbolObject::create(Realm& realm, Symbol& primitive_symbol) { return realm.heap().allocate(realm, primitive_symbol, *realm.intrinsics().symbol_prototype()).release_allocated_value_but_fixme_should_propagate_errors(); } SymbolObject::SymbolObject(Symbol& symbol, Object& prototype) : Object(ConstructWithPrototypeTag::Tag, prototype) , m_symbol(symbol) { } void SymbolObject::visit_edges(Cell::Visitor& visitor) { Base::visit_edges(visitor); visitor.visit(m_symbol); } }