diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
commit | a4e969f4965059196ca948db781e52f7cfebf19e (patch) | |
tree | 6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/runtime/InternalFunction.h | |
parent | 41386e9cb918eed93b3f13648cbef387e371e451 (diff) | |
download | WebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz |
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/runtime/InternalFunction.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/InternalFunction.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/Source/JavaScriptCore/runtime/InternalFunction.h b/Source/JavaScriptCore/runtime/InternalFunction.h index e216c2f82..e392214a1 100644 --- a/Source/JavaScriptCore/runtime/InternalFunction.h +++ b/Source/JavaScriptCore/runtime/InternalFunction.h @@ -1,6 +1,6 @@ /* * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) - * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2006, 2007, 2008, 2016 Apple Inc. All rights reserved. * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) * Copyright (C) 2007 Maks Orlovich * @@ -29,40 +29,41 @@ namespace JSC { - class FunctionPrototype; +class FunctionPrototype; - class InternalFunction : public JSDestructibleObject { - public: - typedef JSDestructibleObject Base; +class InternalFunction : public JSDestructibleObject { +public: + typedef JSDestructibleObject Base; + static const unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance | ImplementsDefaultHasInstance | TypeOfShouldCallGetCallData; - DECLARE_EXPORT_INFO; + DECLARE_EXPORT_INFO; - JS_EXPORT_PRIVATE const String& name(ExecState*); - const String displayName(ExecState*); - const String calculatedDisplayName(ExecState*); + JS_EXPORT_PRIVATE const String& name(ExecState*); + const String displayName(ExecState*); + const String calculatedDisplayName(ExecState*); - static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) - { - return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); - } + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) + { + return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); + } - protected: - static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags; + JS_EXPORT_PRIVATE static Structure* createSubclassStructure(ExecState*, JSValue newTarget, Structure*); - JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*); +protected: + JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*); - JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name); + JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name); - static CallType getCallData(JSCell*, CallData&); - }; + static CallType getCallData(JSCell*, CallData&); +}; - InternalFunction* asInternalFunction(JSValue); +InternalFunction* asInternalFunction(JSValue); - inline InternalFunction* asInternalFunction(JSValue value) - { - ASSERT(asObject(value)->inherits(InternalFunction::info())); - return static_cast<InternalFunction*>(asObject(value)); - } +inline InternalFunction* asInternalFunction(JSValue value) +{ + ASSERT(asObject(value)->inherits(InternalFunction::info())); + return static_cast<InternalFunction*>(asObject(value)); +} } // namespace JSC |