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