WebAssemblyPrototype.cpp [plain text]
#include "config.h"
#include "WebAssemblyPrototype.h"
#if ENABLE(WEBASSEMBLY)
#include "FunctionPrototype.h"
#include "JSCInlines.h"
namespace JSC {
static EncodedJSValue JSC_HOST_CALL webAssemblyFunctionValidate(ExecState* state)
{
VM& vm = state->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
return JSValue::encode(throwException(state, scope, createError(state, ASCIILiteral("WebAssembly doesn't yet implement the validate function property"))));
}
static EncodedJSValue JSC_HOST_CALL webAssemblyFunctionCompile(ExecState* state)
{
VM& vm = state->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
return JSValue::encode(throwException(state, scope, createError(state, ASCIILiteral("WebAssembly doesn't yet implement the compile function property"))));
}
}
#include "WebAssemblyPrototype.lut.h"
namespace JSC {
const ClassInfo WebAssemblyPrototype::s_info = { "WebAssembly.prototype", &Base::s_info, &prototypeTableWebAssembly, CREATE_METHOD_TABLE(WebAssemblyPrototype) };
WebAssemblyPrototype* WebAssemblyPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
{
auto* object = new (NotNull, allocateCell<WebAssemblyPrototype>(vm.heap)) WebAssemblyPrototype(vm, structure);
object->finishCreation(vm);
return object;
}
Structure* WebAssemblyPrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
void WebAssemblyPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
}
WebAssemblyPrototype::WebAssemblyPrototype(VM& vm, Structure* structure)
: Base(vm, structure)
{
}
}
#endif // ENABLE(WEBASSEMBLY)