summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/InternalFunction.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/runtime/InternalFunction.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/runtime/InternalFunction.h')
-rw-r--r--Source/JavaScriptCore/runtime/InternalFunction.h59
1 files changed, 30 insertions, 29 deletions
diff --git a/Source/JavaScriptCore/runtime/InternalFunction.h b/Source/JavaScriptCore/runtime/InternalFunction.h
index e216c2f82..6e12832cf 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
*
@@ -21,49 +21,50 @@
*
*/
-#ifndef InternalFunction_h
-#define InternalFunction_h
+#pragma once
#include "Identifier.h"
#include "JSDestructibleObject.h"
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 static void visitChildren(JSCell*, SlotVisitor&);
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
- {
- return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info());
- }
+ JS_EXPORT_PRIVATE const String& name();
+ const String displayName(VM&);
+ const String calculatedDisplayName(VM&);
- protected:
- static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
+ {
+ return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info());
+ }
- JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*);
+ JS_EXPORT_PRIVATE static Structure* createSubclassStructure(ExecState*, JSValue newTarget, Structure*);
- JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name);
+protected:
+ JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*);
- static CallType getCallData(JSCell*, CallData&);
- };
+ JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name);
- InternalFunction* asInternalFunction(JSValue);
+ static CallType getCallData(JSCell*, CallData&);
+ WriteBarrier<JSString> m_originalName;
+};
- inline InternalFunction* asInternalFunction(JSValue value)
- {
- ASSERT(asObject(value)->inherits(InternalFunction::info()));
- return static_cast<InternalFunction*>(asObject(value));
- }
+InternalFunction* asInternalFunction(JSValue);
-} // namespace JSC
+inline InternalFunction* asInternalFunction(JSValue value)
+{
+ ASSERT(asObject(value)->inherits(*value.getObject()->vm(), InternalFunction::info()));
+ return static_cast<InternalFunction*>(asObject(value));
+}
-#endif // InternalFunction_h
+} // namespace JSC