summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/InternalFunction.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/JavaScriptCore/runtime/InternalFunction.h
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/JavaScriptCore/runtime/InternalFunction.h')
-rw-r--r--Source/JavaScriptCore/runtime/InternalFunction.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/Source/JavaScriptCore/runtime/InternalFunction.h b/Source/JavaScriptCore/runtime/InternalFunction.h
index e35f5f9f2..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;
- static JS_EXPORTDATA const ClassInfo s_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), &s_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(JSGlobalObject*, 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::s_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