WebAssemblyToJSCallee.cpp [plain text]
#include "config.h"
#include "WebAssemblyToJSCallee.h"
#if ENABLE(WEBASSEMBLY)
#include "JSCInlines.h"
#include "JSWebAssemblyModule.h"
namespace JSC {
const ClassInfo WebAssemblyToJSCallee::s_info = { "WebAssemblyToJSCallee", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(WebAssemblyToJSCallee) };
WebAssemblyToJSCallee* WebAssemblyToJSCallee::create(VM& vm, JSWebAssemblyModule* module)
{
Structure* structure = module->globalObject(vm)->webAssemblyToJSCalleeStructure();
WebAssemblyToJSCallee* callee = new (NotNull, allocateCell<WebAssemblyToJSCallee>(vm.heap)) WebAssemblyToJSCallee(vm, structure);
callee->finishCreation(vm, module);
return callee;
}
Structure* WebAssemblyToJSCallee::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(WebAssemblyToJSCalleeType, StructureFlags), info());
}
WebAssemblyToJSCallee::WebAssemblyToJSCallee(VM& vm, Structure* structure)
: Base(vm, structure)
{
}
void WebAssemblyToJSCallee::finishCreation(VM& vm, JSWebAssemblyModule* module)
{
Base::finishCreation(vm);
m_module.set(vm, this, module);
}
void WebAssemblyToJSCallee::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<WebAssemblyToJSCallee*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
visitor.append(thisObject->m_module);
}
}
#endif // ENABLE(WEBASSEMBLY)