|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #include "config.h" |
|
22 |
|
23 #if ENABLE(JAVASCRIPT_DEBUGGER) |
|
24 |
|
25 #include "JSScriptProfileNode.h" |
|
26 |
|
27 #include "KURL.h" |
|
28 #include "ScriptProfileNode.h" |
|
29 #include <runtime/JSNumberCell.h> |
|
30 #include <runtime/JSString.h> |
|
31 #include <wtf/GetPtr.h> |
|
32 |
|
33 using namespace JSC; |
|
34 |
|
35 namespace WebCore { |
|
36 |
|
37 ASSERT_CLASS_FITS_IN_CELL(JSScriptProfileNode); |
|
38 |
|
39 /* Hash table */ |
|
40 #if ENABLE(JIT) |
|
41 #define THUNK_GENERATOR(generator) , generator |
|
42 #else |
|
43 #define THUNK_GENERATOR(generator) |
|
44 #endif |
|
45 |
|
46 static const HashTableValue JSScriptProfileNodeTableValues[10] = |
|
47 { |
|
48 { "functionName", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeFunctionName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
49 { "url", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeUrl), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
50 { "lineNumber", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeLineNumber), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
51 { "totalTime", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeTotalTime), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
52 { "selfTime", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeSelfTime), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
53 { "numberOfCalls", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeNumberOfCalls), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
54 { "children", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeChildren), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
55 { "visible", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeVisible), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
56 { "callUID", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsScriptProfileNodeCallUID), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
57 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
58 }; |
|
59 |
|
60 #undef THUNK_GENERATOR |
|
61 static JSC_CONST_HASHTABLE HashTable JSScriptProfileNodeTable = { 35, 31, JSScriptProfileNodeTableValues, 0 }; |
|
62 /* Hash table for prototype */ |
|
63 #if ENABLE(JIT) |
|
64 #define THUNK_GENERATOR(generator) , generator |
|
65 #else |
|
66 #define THUNK_GENERATOR(generator) |
|
67 #endif |
|
68 |
|
69 static const HashTableValue JSScriptProfileNodePrototypeTableValues[1] = |
|
70 { |
|
71 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
72 }; |
|
73 |
|
74 #undef THUNK_GENERATOR |
|
75 static JSC_CONST_HASHTABLE HashTable JSScriptProfileNodePrototypeTable = { 1, 0, JSScriptProfileNodePrototypeTableValues, 0 }; |
|
76 const ClassInfo JSScriptProfileNodePrototype::s_info = { "ScriptProfileNodePrototype", 0, &JSScriptProfileNodePrototypeTable, 0 }; |
|
77 |
|
78 JSObject* JSScriptProfileNodePrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
79 { |
|
80 return getDOMPrototype<JSScriptProfileNode>(exec, globalObject); |
|
81 } |
|
82 |
|
83 const ClassInfo JSScriptProfileNode::s_info = { "ScriptProfileNode", 0, &JSScriptProfileNodeTable, 0 }; |
|
84 |
|
85 JSScriptProfileNode::JSScriptProfileNode(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ScriptProfileNode> impl) |
|
86 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
87 , m_impl(impl) |
|
88 { |
|
89 } |
|
90 |
|
91 JSScriptProfileNode::~JSScriptProfileNode() |
|
92 { |
|
93 forgetDOMObject(this, impl()); |
|
94 } |
|
95 |
|
96 JSObject* JSScriptProfileNode::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
97 { |
|
98 return new (exec) JSScriptProfileNodePrototype(globalObject, JSScriptProfileNodePrototype::createStructure(globalObject->objectPrototype())); |
|
99 } |
|
100 |
|
101 bool JSScriptProfileNode::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
102 { |
|
103 return getStaticValueSlot<JSScriptProfileNode, Base>(exec, &JSScriptProfileNodeTable, this, propertyName, slot); |
|
104 } |
|
105 |
|
106 bool JSScriptProfileNode::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
107 { |
|
108 return getStaticValueDescriptor<JSScriptProfileNode, Base>(exec, &JSScriptProfileNodeTable, this, propertyName, descriptor); |
|
109 } |
|
110 |
|
111 JSValue jsScriptProfileNodeFunctionName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
112 { |
|
113 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
114 UNUSED_PARAM(exec); |
|
115 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
116 JSValue result = jsString(exec, imp->functionName()); |
|
117 return result; |
|
118 } |
|
119 |
|
120 JSValue jsScriptProfileNodeUrl(ExecState* exec, JSValue slotBase, const Identifier&) |
|
121 { |
|
122 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
123 UNUSED_PARAM(exec); |
|
124 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
125 JSValue result = jsString(exec, imp->url()); |
|
126 return result; |
|
127 } |
|
128 |
|
129 JSValue jsScriptProfileNodeLineNumber(ExecState* exec, JSValue slotBase, const Identifier&) |
|
130 { |
|
131 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
132 UNUSED_PARAM(exec); |
|
133 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
134 JSValue result = jsNumber(exec, imp->lineNumber()); |
|
135 return result; |
|
136 } |
|
137 |
|
138 JSValue jsScriptProfileNodeTotalTime(ExecState* exec, JSValue slotBase, const Identifier&) |
|
139 { |
|
140 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
141 UNUSED_PARAM(exec); |
|
142 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
143 JSValue result = jsNumber(exec, imp->totalTime()); |
|
144 return result; |
|
145 } |
|
146 |
|
147 JSValue jsScriptProfileNodeSelfTime(ExecState* exec, JSValue slotBase, const Identifier&) |
|
148 { |
|
149 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
150 UNUSED_PARAM(exec); |
|
151 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
152 JSValue result = jsNumber(exec, imp->selfTime()); |
|
153 return result; |
|
154 } |
|
155 |
|
156 JSValue jsScriptProfileNodeNumberOfCalls(ExecState* exec, JSValue slotBase, const Identifier&) |
|
157 { |
|
158 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
159 UNUSED_PARAM(exec); |
|
160 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
161 JSValue result = jsNumber(exec, imp->numberOfCalls()); |
|
162 return result; |
|
163 } |
|
164 |
|
165 JSValue jsScriptProfileNodeChildren(ExecState* exec, JSValue slotBase, const Identifier&) |
|
166 { |
|
167 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
168 return castedThis->children(exec); |
|
169 } |
|
170 |
|
171 JSValue jsScriptProfileNodeVisible(ExecState* exec, JSValue slotBase, const Identifier&) |
|
172 { |
|
173 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
174 UNUSED_PARAM(exec); |
|
175 ScriptProfileNode* imp = static_cast<ScriptProfileNode*>(castedThis->impl()); |
|
176 JSValue result = jsBoolean(imp->visible()); |
|
177 return result; |
|
178 } |
|
179 |
|
180 JSValue jsScriptProfileNodeCallUID(ExecState* exec, JSValue slotBase, const Identifier&) |
|
181 { |
|
182 JSScriptProfileNode* castedThis = static_cast<JSScriptProfileNode*>(asObject(slotBase)); |
|
183 return castedThis->callUID(exec); |
|
184 } |
|
185 |
|
186 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, ScriptProfileNode* object) |
|
187 { |
|
188 return getDOMObjectWrapper<JSScriptProfileNode>(exec, globalObject, object); |
|
189 } |
|
190 ScriptProfileNode* toScriptProfileNode(JSC::JSValue value) |
|
191 { |
|
192 return value.inherits(&JSScriptProfileNode::s_info) ? static_cast<JSScriptProfileNode*>(asObject(value))->impl() : 0; |
|
193 } |
|
194 |
|
195 } |
|
196 |
|
197 #endif // ENABLE(JAVASCRIPT_DEBUGGER) |