InternalFunction.h [plain text]
#ifndef InternalFunction_h
#define InternalFunction_h
#include "JSObjectWithGlobalObject.h"
#include "Identifier.h"
namespace JSC {
class FunctionPrototype;
class InternalFunction : public JSObjectWithGlobalObject {
public:
typedef JSObjectWithGlobalObject Base;
static JS_EXPORTDATA const ClassInfo s_info;
const UString& name(ExecState*);
const UString displayName(ExecState*);
const UString calculatedDisplayName(ExecState*);
static Structure* createStructure(JSGlobalData& globalData, JSValue proto)
{
return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
protected:
static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
InternalFunction(VPtrStealingHackType);
InternalFunction(JSGlobalData*, JSGlobalObject*, Structure*, const Identifier&);
private:
virtual CallType getCallData(CallData&) = 0;
virtual void vtableAnchor();
};
InternalFunction* asInternalFunction(JSValue);
inline InternalFunction* asInternalFunction(JSValue value)
{
ASSERT(asObject(value)->inherits(&InternalFunction::s_info));
return static_cast<InternalFunction*>(asObject(value));
}
}
#endif // InternalFunction_h