Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSFunction.h

raw symbols SCIP
1 /*
2 * Copyright (C) 1999-2000 Harri Porten ([email protected])
3 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Cameron Zwarich ([email protected])
5 * Copyright (C) 2007 Maks Orlovich
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 */
23
24 #ifndef JSFunction_h
25 #define JSFunction_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSFunction.h:25:9`!
26
27 #include "InternalFunction.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/InternalFunction.h`/
28
29 namespace JSCcxx . . $ `<built-in>:463:9`! {
30
31 class ExecutableBasecxx . . $ QTJSC/ExecutableBase#;
32 class FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#;
33 class FunctionPrototypecxx . . $ QTJSC/FunctionPrototype#;
34 class JSActivationcxx . . $ QTJSC/JSActivation#;
35 class JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#;
36
37 class JSFunctioncxx . . $ QTJSC/JSFunction# : public InternalFunctioncxx . . $ QTJSC/InternalFunction# {
38 friend class JITcxx . . $ QTJSC/JIT#;
39 friend class JSGlobalDatacxx . . $ QTJSC/JSGlobalData#;
40
41 typedef InternalFunctioncxx . . $ QTJSC/InternalFunction# Basecxx . . $ QTJSC/JSFunction#Base#;
42
43 public:
44 JSFunctioncxx . . $ QTJSC/JSFunction#JSFunction(d0bee40614c306f0).(ExecStatecxx . . $ QTJSC/ExecState#*, NonNullPassRefPtrcxx . . $ NonNullPassRefPtr#<Structurecxx . . $ QTJSC/Structure#>, int length, const Identifiercxx . . $ QTJSC/Identifier#&, NativeFunctioncxx . . $ QTJSC/NativeFunction#);
45 JSFunctioncxx . . $ QTJSC/JSFunction#JSFunction(8f64747d1ea3da42).(ExecStatecxx . . $ QTJSC/ExecState#*, NonNullPassRefPtrcxx . . $ NonNullPassRefPtr#<FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#>, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#*);
46 virtual ~cxx . . $ QTJSC/JSFunction#`~JSFunction`(49f6e7a06ebc5aa8).JSFunctioncxx . . $ QTJSC/JSFunction#();
47
48 JSObjectcxx . . $ QTJSC/JSObject#* constructcxx . . $ QTJSC/JSFunction#construct(ec25cef8276945af).(ExecStatecxx . . $ QTJSC/ExecState#*, const ArgListcxx . . $ QTJSC/ArgList#&);
49 JSValuecxx . . $ QTJSC/JSValue# callcxx . . $ QTJSC/JSFunction#call(a346bc844d0fe1c2).(ExecStatecxx . . $ QTJSC/ExecState#*, JSValuecxx . . $ QTJSC/JSValue# thisValue, const ArgListcxx . . $ QTJSC/ArgList#&);
50
51 void setScopecxx . . $ QTJSC/JSFunction#setScope(b489e285b10a6c80).(const ScopeChaincxx . . $ QTJSC/ScopeChain#& scopeChain) { setScopeChaincxx . . $ QTJSC/JSFunction#setScopeChain(b489e285b10a6c80).(scopeChain); }
52 ScopeChaincxx . . $ QTJSC/ScopeChain#& scopecxx . . $ QTJSC/JSFunction#scope(b239d380c31bc982).() { return scopeChaincxx . . $ QTJSC/JSFunction#scopeChain(b239d380c31bc982).(); }
53
54 ExecutableBasecxx . . $ QTJSC/ExecutableBase#* executablecxx . . $ QTJSC/JSFunction#executable(278b097dd65ecae5).() const { return m_executable.get(); }
55
56 // To call either of these methods include Executable.h
57 inline bool isHostFunctioncxx . . $ QTJSC/JSFunction#isHostFunction(50ce9a9e25b4a850).() const;
58 FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#* jsExecutablecxx . . $ QTJSC/JSFunction#jsExecutable(41a6d61c9ef790ed).() const;
59
60 static JS_EXPORTDATAcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/config.h:36:9`! const ClassInfocxx . . $ QTJSC/ClassInfo# infocxx . . $ QTJSC/JSFunction#info.;
61
62 static PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> createStructurecxx . . $ QTJSC/JSFunction#createStructure(da75fbe5e97e240f).(JSValuecxx . . $ QTJSC/JSValue# prototype)
63 {
64 return Structure::create(prototype, TypeInfocxx . . $ QTJSC/TypeInfo#TypeInfo(85e540a0e5560fef).(ObjectTypecxx . . $ QTJSC/ObjectType., StructureFlagscxx . . $ QTJSC/JSFunction#StructureFlags.));
65 }
66
67 NativeFunctioncxx . . $ QTJSC/NativeFunction# nativeFunctioncxx . . $ QTJSC/JSFunction#nativeFunction(9571a288bde0ae2f).()
68 {
69 return *WTFcxx . . $ QTWTF/::bitwise_castcxx . . $ QTWTF/bitwise_cast(6510c324ac8ecfb4).<NativeFunctioncxx . . $ QTJSC/NativeFunction#*>(m_datacxx . . $ QTJSC/JSFunction#m_data.);
70 }
71
72 virtual ConstructTypecxx . . $ QTJSC/ConstructType# getConstructDatacxx . . $ QTJSC/JSFunction#getConstructData(80014d68d6143eea).(ConstructDatacxx . . $ QTJSC/ConstructData#&);
73 virtual CallTypecxx . . $ QTJSC/CallType# getCallDatacxx . . $ QTJSC/JSFunction#getCallData(9482040cf952d29d).(CallDatacxx . . $ QTJSC/CallData#&);
74
75 protected:
76 const static unsigned StructureFlagscxx . . $ QTJSC/JSFunction#StructureFlags. = OverridesGetOwnPropertySlotcxx . . $ QTJSC/OverridesGetOwnPropertySlot. | ImplementsHasInstancecxx . . $ QTJSC/ImplementsHasInstance. | OverridesMarkChildrencxx . . $ QTJSC/OverridesMarkChildren. | OverridesGetPropertyNamescxx . . $ QTJSC/OverridesGetPropertyNames. | InternalFunctioncxx . . $ QTJSC/InternalFunction#::StructureFlagscxx . . $ QTJSC/InternalFunction#StructureFlags.;
77
78 private:
79 JSFunctioncxx . . $ QTJSC/JSFunction#JSFunction(9678d77265d996b).(NonNullPassRefPtrcxx . . $ NonNullPassRefPtr#<Structurecxx . . $ QTJSC/Structure#>);
80
81 bool isHostFunctionNonInlinecxx . . $ QTJSC/JSFunction#isHostFunctionNonInline(50ce9a9e25b4a850).() const;
82
83 virtual bool getOwnPropertySlotcxx . . $ QTJSC/JSFunction#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#&, PropertySlotcxx . . $ QTJSC/PropertySlot#&);
84 virtual bool getOwnPropertyDescriptorcxx . . $ QTJSC/JSFunction#getOwnPropertyDescriptor(dce4ef7012294c32).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#&, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#&);
85 virtual void getOwnPropertyNamescxx . . $ QTJSC/JSFunction#getOwnPropertyNames(2f9e3f18de200b4e).(ExecStatecxx . . $ QTJSC/ExecState#*, PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#&, EnumerationModecxx . . $ QTJSC/EnumerationMode# mode = ExcludeDontEnumPropertiescxx . . $ QTJSC/ExcludeDontEnumProperties.);
86 virtual void putcxx . . $ QTJSC/JSFunction#put(dfb3133dafbe9ff4).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSValuecxx . . $ QTJSC/JSValue#, PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#&);
87 virtual bool deletePropertycxx . . $ QTJSC/JSFunction#deleteProperty(13154ef9bddc9416).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName);
88
89 virtual void markChildrencxx . . $ QTJSC/JSFunction#markChildren(bd9cae851d80a865).(MarkStackcxx . . $ QTJSC/MarkStack#&);
90
91 virtual const ClassInfocxx . . $ QTJSC/ClassInfo#* classInfocxx . . $ QTJSC/JSFunction#classInfo(f90fb4cda7a7c2e2).() const { return &infocxx . . $ QTJSC/JSFunction#info.; }
92
93 static JSValuecxx . . $ QTJSC/JSValue# argumentsGettercxx . . $ QTJSC/JSFunction#argumentsGetter(2d50ae1b8ebdc06b).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#&, const PropertySlotcxx . . $ QTJSC/PropertySlot#&);
94 static JSValuecxx . . $ QTJSC/JSValue# callerGettercxx . . $ QTJSC/JSFunction#callerGetter(2d50ae1b8ebdc06b).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#&, const PropertySlotcxx . . $ QTJSC/PropertySlot#&);
95 static JSValuecxx . . $ QTJSC/JSValue# lengthGettercxx . . $ QTJSC/JSFunction#lengthGetter(2d50ae1b8ebdc06b).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#&, const PropertySlotcxx . . $ QTJSC/PropertySlot#&);
96
97 RefPtrcxx . . $ RefPtr#<ExecutableBasecxx . . $ QTJSC/ExecutableBase#> m_executablecxx . . $ QTJSC/JSFunction#m_executable.;
98 ScopeChaincxx . . $ QTJSC/ScopeChain#& scopeChaincxx . . $ QTJSC/JSFunction#scopeChain(b239d380c31bc982).()
99 {
100 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!isHostFunctionNonInline());
101 return *WTFcxx . . $ `<built-in>:467:9`!::bitwise_castcxx . . $ QTWTF/bitwise_cast(6510c324ac8ecfb4).<ScopeChaincxx . . $ QTJSC/ScopeChain#*>(m_datacxx . . $ QTJSC/JSFunction#m_data.);
102 }
103 void clearScopeChaincxx . . $ QTJSC/JSFunction#clearScopeChain(49f6e7a06ebc5aa8).()
104 {
105 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!isHostFunctionNonInline());
106 new (m_datacxx . . $ QTJSC/JSFunction#m_data.) ScopeChaincxx . . $ QTJSC/ScopeChain#(NoScopeChaincxx . . $ QTJSC/NoScopeChain#());
107 }
108 void setScopeChaincxx . . $ QTJSC/JSFunction#setScopeChain(fdc7869371484d42).(ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* sc)
109 {
110 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!isHostFunctionNonInline());
111 new (m_datacxx . . $ QTJSC/JSFunction#m_data.) ScopeChaincxx . . $ QTJSC/ScopeChain#ScopeChain(fdc7869371484d42).(sc);
112 }
113 void setScopeChaincxx . . $ QTJSC/JSFunction#setScopeChain(b489e285b10a6c80).(const ScopeChaincxx . . $ QTJSC/ScopeChain#& sc)
114 {
115 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!isHostFunctionNonInline());
116 *WTFcxx . . $ `<built-in>:467:9`!::bitwise_castcxx . . $ QTWTF/bitwise_cast(6510c324ac8ecfb4).<ScopeChaincxx . . $ QTJSC/ScopeChain#*>(m_datacxx . . $ QTJSC/JSFunction#m_data.) = sc;
117 }
118 void setNativeFunctioncxx . . $ QTJSC/JSFunction#setNativeFunction(10fcf79cb215d05).(NativeFunctioncxx . . $ QTJSC/NativeFunction# func)
119 {
120 *WTFcxx . . $ `<built-in>:467:9`!::bitwise_castcxx . . $ QTWTF/bitwise_cast(6510c324ac8ecfb4).<NativeFunctioncxx . . $ QTJSC/NativeFunction#*>(m_datacxx . . $ QTJSC/JSFunction#m_data.) = func;
121 }
122 unsigned char m_datacxx . . $ QTJSC/JSFunction#m_data.[sizeof(void*)];
123 };
124
125 JSFunctioncxx . . $ QTJSC/JSFunction#* asFunctioncxx . . $ QTJSC/asFunction(deffc94ad83de35f).(JSValuecxx . . $ QTJSC/JSValue#);
126
127 inline JSFunctioncxx . . $ QTJSC/JSFunction#* asFunctioncxx . . $ QTJSC/asFunction(deffc94ad83de35f).(JSValuecxx . . $ QTJSC/JSValue# value)
128 {
129 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(asObject(value)->inherits(&JSFunction::info));
130 return static_cast<JSFunction*>(asObject(value));
131 }
132
133 } // namespace JSC
134
135 #endif // JSFunction_h