|
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 #include "JSComment.h" |
|
23 |
|
24 #include "Comment.h" |
|
25 #include <wtf/GetPtr.h> |
|
26 |
|
27 using namespace JSC; |
|
28 |
|
29 namespace WebCore { |
|
30 |
|
31 ASSERT_CLASS_FITS_IN_CELL(JSComment); |
|
32 |
|
33 /* Hash table */ |
|
34 #if ENABLE(JIT) |
|
35 #define THUNK_GENERATOR(generator) , generator |
|
36 #else |
|
37 #define THUNK_GENERATOR(generator) |
|
38 #endif |
|
39 |
|
40 static const HashTableValue JSCommentTableValues[2] = |
|
41 { |
|
42 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsCommentConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
43 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
44 }; |
|
45 |
|
46 #undef THUNK_GENERATOR |
|
47 static JSC_CONST_HASHTABLE HashTable JSCommentTable = { 2, 1, JSCommentTableValues, 0 }; |
|
48 /* Hash table for constructor */ |
|
49 #if ENABLE(JIT) |
|
50 #define THUNK_GENERATOR(generator) , generator |
|
51 #else |
|
52 #define THUNK_GENERATOR(generator) |
|
53 #endif |
|
54 |
|
55 static const HashTableValue JSCommentConstructorTableValues[1] = |
|
56 { |
|
57 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
58 }; |
|
59 |
|
60 #undef THUNK_GENERATOR |
|
61 static JSC_CONST_HASHTABLE HashTable JSCommentConstructorTable = { 1, 0, JSCommentConstructorTableValues, 0 }; |
|
62 class JSCommentConstructor : public DOMConstructorObject { |
|
63 public: |
|
64 JSCommentConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
65 |
|
66 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
67 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
68 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
69 static const JSC::ClassInfo s_info; |
|
70 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
71 { |
|
72 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
73 } |
|
74 protected: |
|
75 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
76 }; |
|
77 |
|
78 const ClassInfo JSCommentConstructor::s_info = { "CommentConstructor", 0, &JSCommentConstructorTable, 0 }; |
|
79 |
|
80 JSCommentConstructor::JSCommentConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
81 : DOMConstructorObject(JSCommentConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
82 { |
|
83 putDirect(exec->propertyNames().prototype, JSCommentPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
84 } |
|
85 |
|
86 bool JSCommentConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
87 { |
|
88 return getStaticValueSlot<JSCommentConstructor, DOMObject>(exec, &JSCommentConstructorTable, this, propertyName, slot); |
|
89 } |
|
90 |
|
91 bool JSCommentConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
92 { |
|
93 return getStaticValueDescriptor<JSCommentConstructor, DOMObject>(exec, &JSCommentConstructorTable, this, propertyName, descriptor); |
|
94 } |
|
95 |
|
96 /* Hash table for prototype */ |
|
97 #if ENABLE(JIT) |
|
98 #define THUNK_GENERATOR(generator) , generator |
|
99 #else |
|
100 #define THUNK_GENERATOR(generator) |
|
101 #endif |
|
102 |
|
103 static const HashTableValue JSCommentPrototypeTableValues[1] = |
|
104 { |
|
105 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
106 }; |
|
107 |
|
108 #undef THUNK_GENERATOR |
|
109 static JSC_CONST_HASHTABLE HashTable JSCommentPrototypeTable = { 1, 0, JSCommentPrototypeTableValues, 0 }; |
|
110 const ClassInfo JSCommentPrototype::s_info = { "CommentPrototype", 0, &JSCommentPrototypeTable, 0 }; |
|
111 |
|
112 JSObject* JSCommentPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
113 { |
|
114 return getDOMPrototype<JSComment>(exec, globalObject); |
|
115 } |
|
116 |
|
117 const ClassInfo JSComment::s_info = { "Comment", &JSCharacterData::s_info, &JSCommentTable, 0 }; |
|
118 |
|
119 JSComment::JSComment(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Comment> impl) |
|
120 : JSCharacterData(structure, globalObject, impl) |
|
121 { |
|
122 } |
|
123 |
|
124 JSObject* JSComment::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
125 { |
|
126 return new (exec) JSCommentPrototype(globalObject, JSCommentPrototype::createStructure(JSCharacterDataPrototype::self(exec, globalObject))); |
|
127 } |
|
128 |
|
129 bool JSComment::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
130 { |
|
131 return getStaticValueSlot<JSComment, Base>(exec, &JSCommentTable, this, propertyName, slot); |
|
132 } |
|
133 |
|
134 bool JSComment::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
135 { |
|
136 return getStaticValueDescriptor<JSComment, Base>(exec, &JSCommentTable, this, propertyName, descriptor); |
|
137 } |
|
138 |
|
139 JSValue jsCommentConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
140 { |
|
141 JSComment* domObject = static_cast<JSComment*>(asObject(slotBase)); |
|
142 return JSComment::getConstructor(exec, domObject->globalObject()); |
|
143 } |
|
144 JSValue JSComment::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
145 { |
|
146 return getDOMConstructor<JSCommentConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
147 } |
|
148 |
|
149 |
|
150 } |