FunctionPrototype.h [plain text]
#pragma once
#include "InternalFunction.h"
namespace JSC {
class FunctionPrototype final : public InternalFunction {
public:
typedef InternalFunction Base;
static FunctionPrototype* create(VM& vm, Structure* structure)
{
FunctionPrototype* prototype = new (NotNull, allocateCell<FunctionPrototype>(vm.heap)) FunctionPrototype(vm, structure);
prototype->finishCreation(vm, String());
return prototype;
}
void addFunctionProperties(ExecState*, JSGlobalObject*, JSFunction** callFunction, JSFunction** applyFunction, JSFunction** hasInstanceSymbolFunction);
void initRestrictedProperties(ExecState*, JSGlobalObject*);
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
{
return Structure::create(vm, globalObject, proto, TypeInfo(InternalFunctionType, StructureFlags), info());
}
DECLARE_INFO;
protected:
void finishCreation(VM&, const String& name);
private:
FunctionPrototype(VM&, Structure*);
};
}