Changeset 92706 in webkit
- Timestamp:
- Aug 9, 2011 1:46:17 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 95 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackConstructor.h
r91194 r92706 33 33 34 34 class JSCallbackConstructor : public JSObjectWithGlobalObject { 35 protected:36 JSCallbackConstructor(JSGlobalObject*, Structure*, JSClassRef, JSObjectCallAsConstructorCallback);37 35 public: 36 typedef JSObjectWithGlobalObject Base; 37 38 38 static JSCallbackConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, JSObjectCallAsConstructorCallback callback) 39 39 { … … 52 52 53 53 protected: 54 JSCallbackConstructor(JSGlobalObject*, Structure*, JSClassRef, JSObjectCallAsConstructorCallback); 54 55 static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags; 55 56 -
trunk/Source/JavaScriptCore/API/JSCallbackFunction.h
r91194 r92706 37 37 38 38 public: 39 typedef InternalFunction Base; 40 39 41 static JSCallbackFunction* create(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name) 40 42 { -
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r91194 r92706 115 115 116 116 117 template <class Base>118 class JSCallbackObject : public Base{117 template <class Parent> 118 class JSCallbackObject : public Parent { 119 119 protected: 120 120 JSCallbackObject(ExecState*, JSGlobalObject*, Structure*, JSClassRef, void* data); 121 121 JSCallbackObject(JSGlobalData&, JSClassRef, Structure*); 122 122 // We'd like to use the placement version of operator new defined in JSCell, but 123 // we can't because Baseis a template argument, so we just duplicate the same123 // we can't because Parent is a template argument, so we just duplicate the same 124 124 // functionality here. 125 125 void* operator new(size_t, void* ptr) { return ptr; } 126 126 127 127 public: 128 typedef Parent Base; 129 128 130 static JSCallbackObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, void* data) 129 131 { … … 145 147 static Structure* createStructure(JSGlobalData& globalData, JSValue proto) 146 148 { 147 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info);149 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), Parent::AnonymousSlotCount, &s_info); 148 150 } 149 151 … … 164 166 165 167 protected: 166 static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Base::StructureFlags;168 static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Parent::StructureFlags; 167 169 168 170 private: … … 189 191 virtual void visitChildren(SlotVisitor& visitor) 190 192 { 191 ASSERT_GC_OBJECT_INHERITS((static_cast< Base*>(this)), &JSCallbackObject<Base>::s_info);193 ASSERT_GC_OBJECT_INHERITS((static_cast<Parent*>(this)), &JSCallbackObject<Parent>::s_info); 192 194 COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); 193 ASSERT( Base::structure()->typeInfo().overridesVisitChildren());194 Base::visitChildren(visitor);195 ASSERT(Parent::structure()->typeInfo().overridesVisitChildren()); 196 Parent::visitChildren(visitor); 195 197 m_callbackObjectData->visitChildren(visitor); 196 198 } -
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r91194 r92706 43 43 namespace JSC { 44 44 45 template <class Base>46 inline JSCallbackObject< Base>* JSCallbackObject<Base>::asCallbackObject(JSValue value)45 template <class Parent> 46 inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(JSValue value) 47 47 { 48 48 ASSERT(asObject(value)->inherits(&s_info)); … … 50 50 } 51 51 52 template <class Base>53 JSCallbackObject< Base>::JSCallbackObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, void* data)54 : Base(globalObject, structure)52 template <class Parent> 53 JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, void* data) 54 : Parent(globalObject, structure) 55 55 , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass))) 56 56 { 57 ASSERT( Base::inherits(&s_info));57 ASSERT(Parent::inherits(&s_info)); 58 58 init(exec); 59 59 } … … 61 61 // Global object constructor. 62 62 // FIXME: Move this into a separate JSGlobalCallbackObject class derived from this one. 63 template <class Base>64 JSCallbackObject< Base>::JSCallbackObject(JSGlobalData& globalData, JSClassRef jsClass, Structure* structure)65 : Base(globalData, structure)63 template <class Parent> 64 JSCallbackObject<Parent>::JSCallbackObject(JSGlobalData& globalData, JSClassRef jsClass, Structure* structure) 65 : Parent(globalData, structure) 66 66 , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass))) 67 67 { 68 ASSERT( Base::inherits(&s_info));69 ASSERT( Base::isGlobalObject());68 ASSERT(Parent::inherits(&s_info)); 69 ASSERT(Parent::isGlobalObject()); 70 70 init(static_cast<JSGlobalObject*>(this)->globalExec()); 71 71 } 72 72 73 template <class Base>74 void JSCallbackObject< Base>::init(ExecState* exec)73 template <class Parent> 74 void JSCallbackObject<Parent>::init(ExecState* exec) 75 75 { 76 76 ASSERT(exec); … … 101 101 } 102 102 103 template <class Base>104 UString JSCallbackObject< Base>::className() const103 template <class Parent> 104 UString JSCallbackObject<Parent>::className() const 105 105 { 106 106 UString thisClassName = classRef()->className(); … … 108 108 return thisClassName; 109 109 110 return Base::className();111 } 112 113 template <class Base>114 bool JSCallbackObject< Base>::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)110 return Parent::className(); 111 } 112 113 template <class Parent> 114 bool JSCallbackObject<Parent>::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 115 115 { 116 116 JSContextRef ctx = toRef(exec); … … 166 166 } 167 167 168 return Base::getOwnPropertySlot(exec, propertyName, slot);169 } 170 171 template <class Base>172 bool JSCallbackObject< Base>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)168 return Parent::getOwnPropertySlot(exec, propertyName, slot); 169 } 170 171 template <class Parent> 172 bool JSCallbackObject<Parent>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 173 173 { 174 174 PropertySlot slot; … … 185 185 } 186 186 187 return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor);188 } 189 190 template <class Base>191 void JSCallbackObject< Base>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)187 return Parent::getOwnPropertyDescriptor(exec, propertyName, descriptor); 188 } 189 190 template <class Parent> 191 void JSCallbackObject<Parent>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 192 192 { 193 193 JSContextRef ctx = toRef(exec); … … 237 237 if (entry->attributes & kJSPropertyAttributeReadOnly) 238 238 return; 239 JSCallbackObject< Base>::putDirect(exec->globalData(), propertyName, value); // put as override property239 JSCallbackObject<Parent>::putDirect(exec->globalData(), propertyName, value); // put as override property 240 240 return; 241 241 } … … 243 243 } 244 244 245 return Base::put(exec, propertyName, value, slot);246 } 247 248 template <class Base>249 bool JSCallbackObject< Base>::deleteProperty(ExecState* exec, const Identifier& propertyName)245 return Parent::put(exec, propertyName, value, slot); 246 } 247 248 template <class Parent> 249 bool JSCallbackObject<Parent>::deleteProperty(ExecState* exec, const Identifier& propertyName) 250 250 { 251 251 JSContextRef ctx = toRef(exec); … … 286 286 } 287 287 288 return Base::deleteProperty(exec, propertyName);289 } 290 291 template <class Base>292 bool JSCallbackObject< Base>::deleteProperty(ExecState* exec, unsigned propertyName)288 return Parent::deleteProperty(exec, propertyName); 289 } 290 291 template <class Parent> 292 bool JSCallbackObject<Parent>::deleteProperty(ExecState* exec, unsigned propertyName) 293 293 { 294 294 return deleteProperty(exec, Identifier::from(exec, propertyName)); 295 295 } 296 296 297 template <class Base>298 ConstructType JSCallbackObject< Base>::getConstructData(ConstructData& constructData)297 template <class Parent> 298 ConstructType JSCallbackObject<Parent>::getConstructData(ConstructData& constructData) 299 299 { 300 300 for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { … … 307 307 } 308 308 309 template <class Base>310 EncodedJSValue JSCallbackObject< Base>::construct(ExecState* exec)309 template <class Parent> 310 EncodedJSValue JSCallbackObject<Parent>::construct(ExecState* exec) 311 311 { 312 312 JSObject* constructor = exec->callee(); … … 314 314 JSObjectRef constructorRef = toRef(constructor); 315 315 316 for (JSClassRef jsClass = static_cast<JSCallbackObject< Base>*>(constructor)->classRef(); jsClass; jsClass = jsClass->parentClass) {316 for (JSClassRef jsClass = static_cast<JSCallbackObject<Parent>*>(constructor)->classRef(); jsClass; jsClass = jsClass->parentClass) { 317 317 if (JSObjectCallAsConstructorCallback callAsConstructor = jsClass->callAsConstructor) { 318 318 int argumentCount = static_cast<int>(exec->argumentCount()); … … 336 336 } 337 337 338 template <class Base>339 bool JSCallbackObject< Base>::hasInstance(ExecState* exec, JSValue value, JSValue)338 template <class Parent> 339 bool JSCallbackObject<Parent>::hasInstance(ExecState* exec, JSValue value, JSValue) 340 340 { 341 341 JSContextRef execRef = toRef(exec); … … 359 359 } 360 360 361 template <class Base>362 CallType JSCallbackObject< Base>::getCallData(CallData& callData)361 template <class Parent> 362 CallType JSCallbackObject<Parent>::getCallData(CallData& callData) 363 363 { 364 364 for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { … … 371 371 } 372 372 373 template <class Base>374 EncodedJSValue JSCallbackObject< Base>::call(ExecState* exec)373 template <class Parent> 374 EncodedJSValue JSCallbackObject<Parent>::call(ExecState* exec) 375 375 { 376 376 JSContextRef execRef = toRef(exec); … … 378 378 JSObjectRef thisObjRef = toRef(exec->hostThisValue().toThisObject(exec)); 379 379 380 for (JSClassRef jsClass = static_cast<JSCallbackObject< Base>*>(toJS(functionRef))->classRef(); jsClass; jsClass = jsClass->parentClass) {380 for (JSClassRef jsClass = static_cast<JSCallbackObject<Parent>*>(toJS(functionRef))->classRef(); jsClass; jsClass = jsClass->parentClass) { 381 381 if (JSObjectCallAsFunctionCallback callAsFunction = jsClass->callAsFunction) { 382 382 int argumentCount = static_cast<int>(exec->argumentCount()); … … 400 400 } 401 401 402 template <class Base>403 void JSCallbackObject< Base>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)402 template <class Parent> 403 void JSCallbackObject<Parent>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) 404 404 { 405 405 JSContextRef execRef = toRef(exec); … … 435 435 } 436 436 437 Base::getOwnPropertyNames(exec, propertyNames, mode);438 } 439 440 template <class Base>441 double JSCallbackObject< Base>::toNumber(ExecState* exec) const437 Parent::getOwnPropertyNames(exec, propertyNames, mode); 438 } 439 440 template <class Parent> 441 double JSCallbackObject<Parent>::toNumber(ExecState* exec) const 442 442 { 443 443 // We need this check to guard against the case where this object is rhs of … … 467 467 } 468 468 469 return Base::toNumber(exec);470 } 471 472 template <class Base>473 UString JSCallbackObject< Base>::toString(ExecState* exec) const469 return Parent::toNumber(exec); 470 } 471 472 template <class Parent> 473 UString JSCallbackObject<Parent>::toString(ExecState* exec) const 474 474 { 475 475 JSContextRef ctx = toRef(exec); … … 492 492 } 493 493 494 return Base::toString(exec);495 } 496 497 template <class Base>498 void JSCallbackObject< Base>::setPrivate(void* data)494 return Parent::toString(exec); 495 } 496 497 template <class Parent> 498 void JSCallbackObject<Parent>::setPrivate(void* data) 499 499 { 500 500 m_callbackObjectData->privateData = data; 501 501 } 502 502 503 template <class Base>504 void* JSCallbackObject< Base>::getPrivate()503 template <class Parent> 504 void* JSCallbackObject<Parent>::getPrivate() 505 505 { 506 506 return m_callbackObjectData->privateData; 507 507 } 508 508 509 template <class Base>510 bool JSCallbackObject< Base>::inherits(JSClassRef c) const509 template <class Parent> 510 bool JSCallbackObject<Parent>::inherits(JSClassRef c) const 511 511 { 512 512 for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) … … 517 517 } 518 518 519 template <class Base>520 JSValue JSCallbackObject< Base>::getStaticValue(ExecState* exec, const Identifier& propertyName)519 template <class Parent> 520 JSValue JSCallbackObject<Parent>::getStaticValue(ExecState* exec, const Identifier& propertyName) 521 521 { 522 522 JSObjectRef thisRef = toRef(this); … … 546 546 } 547 547 548 template <class Base>549 JSValue JSCallbackObject< Base>::staticFunctionGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)550 { 551 JSCallbackObject* thisObj = asCallbackObject(slot Base);548 template <class Parent> 549 JSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, JSValue slotParent, const Identifier& propertyName) 550 { 551 JSCallbackObject* thisObj = asCallbackObject(slotParent); 552 552 553 553 // Check for cached or override property. 554 554 PropertySlot slot2(thisObj); 555 if (thisObj-> Base::getOwnPropertySlot(exec, propertyName, slot2))555 if (thisObj->Parent::getOwnPropertySlot(exec, propertyName, slot2)) 556 556 return slot2.getValue(exec, propertyName); 557 557 … … 572 572 } 573 573 574 template <class Base>575 JSValue JSCallbackObject< Base>::callbackGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)576 { 577 JSCallbackObject* thisObj = asCallbackObject(slot Base);574 template <class Parent> 575 JSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, JSValue slotParent, const Identifier& propertyName) 576 { 577 JSCallbackObject* thisObj = asCallbackObject(slotParent); 578 578 579 579 JSObjectRef thisRef = toRef(thisObj); -
trunk/Source/JavaScriptCore/ChangeLog
r92635 r92706 1 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add ParentClass typedef in all JSC classes 4 https://bugs.webkit.org/show_bug.cgi?id=65731 5 6 Reviewed by Oliver Hunt. 7 8 Just added the Base typedefs in all the classes that are a subclass of JSCell 9 to point at their parent classes. This is a change to support future changes to the way 10 constructors and destructors are implemented in JS objects, among other things. 11 12 * API/JSCallbackConstructor.h: 13 * API/JSCallbackFunction.h: 14 * API/JSCallbackObject.h: 15 (JSC::JSCallbackObject::createStructure): 16 (JSC::JSCallbackObject::visitChildren): 17 * API/JSCallbackObjectFunctions.h: 18 (JSC::::asCallbackObject): 19 (JSC::::JSCallbackObject): 20 (JSC::::init): 21 (JSC::::className): 22 (JSC::::getOwnPropertySlot): 23 (JSC::::getOwnPropertyDescriptor): 24 (JSC::::put): 25 (JSC::::deleteProperty): 26 (JSC::::getConstructData): 27 (JSC::::construct): 28 (JSC::::hasInstance): 29 (JSC::::getCallData): 30 (JSC::::call): 31 (JSC::::getOwnPropertyNames): 32 (JSC::::toNumber): 33 (JSC::::toString): 34 (JSC::::setPrivate): 35 (JSC::::getPrivate): 36 (JSC::::inherits): 37 (JSC::::getStaticValue): 38 (JSC::::staticFunctionGetter): 39 (JSC::::callbackGetter): 40 * debugger/DebuggerActivation.h: 41 * jsc.cpp: 42 * runtime/Arguments.h: 43 * runtime/ArrayConstructor.h: 44 * runtime/ArrayPrototype.h: 45 * runtime/BooleanConstructor.h: 46 * runtime/BooleanObject.h: 47 * runtime/BooleanPrototype.h: 48 * runtime/DateConstructor.h: 49 * runtime/DateInstance.h: 50 * runtime/DatePrototype.h: 51 * runtime/Error.cpp: 52 * runtime/ErrorConstructor.h: 53 * runtime/ErrorInstance.h: 54 * runtime/ErrorPrototype.h: 55 * runtime/ExceptionHelpers.cpp: 56 * runtime/Executable.h: 57 * runtime/FunctionConstructor.h: 58 * runtime/FunctionPrototype.h: 59 * runtime/GetterSetter.h: 60 * runtime/InternalFunction.h: 61 * runtime/JSAPIValueWrapper.h: 62 * runtime/JSActivation.h: 63 * runtime/JSArray.h: 64 * runtime/JSFunction.h: 65 * runtime/JSGlobalObject.h: 66 * runtime/JSNotAnObject.h: 67 * runtime/JSONObject.h: 68 * runtime/JSObject.h: 69 * runtime/JSPropertyNameIterator.h: 70 * runtime/JSStaticScopeObject.h: 71 * runtime/JSString.h: 72 * runtime/JSVariableObject.h: 73 * runtime/JSWrapperObject.h: 74 * runtime/MathObject.h: 75 * runtime/NativeErrorConstructor.h: 76 * runtime/NativeErrorPrototype.h: 77 * runtime/NumberConstructor.h: 78 * runtime/NumberObject.h: 79 * runtime/NumberPrototype.h: 80 * runtime/ObjectConstructor.h: 81 * runtime/ObjectPrototype.h: 82 * runtime/RegExp.h: 83 * runtime/RegExpConstructor.h: 84 * runtime/RegExpMatchesArray.h: 85 * runtime/RegExpObject.h: 86 (JSC::RegExpObject::create): 87 * runtime/RegExpPrototype.h: 88 * runtime/ScopeChain.h: 89 * runtime/StrictEvalActivation.h: 90 * runtime/StringConstructor.h: 91 * runtime/StringObject.h: 92 * runtime/StringObjectThatMasqueradesAsUndefined.h: 93 * runtime/StringPrototype.h: 94 * runtime/Structure.h: 95 * runtime/StructureChain.h: 96 1 97 2011-08-08 Oliver Hunt <oliver@apple.com> 2 98 -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.h
r91903 r92706 35 35 class DebuggerActivation : public JSNonFinalObject { 36 36 public: 37 typedef JSNonFinalObject Base; 38 37 39 static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object) 38 40 { -
trunk/Source/JavaScriptCore/jsc.cpp
r92555 r92706 149 149 150 150 public: 151 typedef JSGlobalObject Base; 152 151 153 static GlobalObject* create(JSGlobalData& globalData, Structure* structure, const Vector<UString>& arguments) 152 154 { -
trunk/Source/JavaScriptCore/runtime/Arguments.h
r91194 r92706 60 60 class Arguments : public JSNonFinalObject { 61 61 public: 62 typedef JSNonFinalObject Base; 63 62 64 static Arguments* create(JSGlobalData& globalData, CallFrame* callFrame) 63 65 { -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.h
r91194 r92706 29 29 30 30 class ArrayConstructor : public InternalFunction { 31 private:32 ArrayConstructor(ExecState*, JSGlobalObject*, Structure*, ArrayPrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static ArrayConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrPrototype) 36 35 { … … 49 48 50 49 private: 50 ArrayConstructor(ExecState*, JSGlobalObject*, Structure*, ArrayPrototype*); 51 51 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 52 52 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h
r91194 r92706 32 32 33 33 public: 34 typedef JSArray Base; 35 34 36 static ArrayPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 35 37 { -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.h
r91194 r92706 29 29 30 30 class BooleanConstructor : public InternalFunction { 31 private:32 BooleanConstructor(ExecState*, JSGlobalObject*, Structure*, BooleanPrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static BooleanConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, BooleanPrototype* boolPrototype) 36 35 { … … 39 38 40 39 private: 40 BooleanConstructor(ExecState*, JSGlobalObject*, Structure*, BooleanPrototype*); 41 41 virtual ConstructType getConstructData(ConstructData&); 42 42 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/BooleanObject.h
r91194 r92706 31 31 32 32 public: 33 typedef JSWrapperObject Base; 34 33 35 static BooleanObject* create(JSGlobalData& globalData, Structure* structure) 34 36 { -
trunk/Source/JavaScriptCore/runtime/BooleanPrototype.h
r91194 r92706 27 27 28 28 class BooleanPrototype : public BooleanObject { 29 p rivate:30 BooleanPrototype(ExecState*, JSGlobalObject*, Structure*);29 public: 30 typedef BooleanObject Base; 31 31 32 public:33 32 static BooleanPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 34 33 { … … 48 47 49 48 private: 49 BooleanPrototype(ExecState*, JSGlobalObject*, Structure*); 50 50 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 51 51 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); -
trunk/Source/JavaScriptCore/runtime/DateConstructor.h
r91194 r92706 29 29 30 30 class DateConstructor : public InternalFunction { 31 private:32 DateConstructor(ExecState*, JSGlobalObject*, Structure*, DatePrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static DateConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, DatePrototype* datePrototype) 36 35 { … … 49 48 50 49 private: 50 DateConstructor(ExecState*, JSGlobalObject*, Structure*, DatePrototype*); 51 51 virtual ConstructType getConstructData(ConstructData&); 52 52 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/DateInstance.h
r91194 r92706 36 36 37 37 public: 38 typedef JSWrapperObject Base; 39 38 40 static DateInstance* create(ExecState* exec, Structure* structure, double date) 39 41 { -
trunk/Source/JavaScriptCore/runtime/DatePrototype.h
r91194 r92706 33 33 34 34 public: 35 typedef DateInstance Base; 36 35 37 static DatePrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 36 38 { -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r91194 r92706 175 175 176 176 public: 177 typedef InternalFunction Base; 178 177 179 static StrictModeTypeErrorFunction* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& message) 178 180 { -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.h
r91194 r92706 30 30 31 31 class ErrorConstructor : public InternalFunction { 32 p rivate:33 ErrorConstructor(ExecState*, JSGlobalObject*, Structure*, ErrorPrototype*);32 public: 33 typedef InternalFunction Base; 34 34 35 public:36 35 static ErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errPrototype) 37 36 { … … 40 39 41 40 private: 41 ErrorConstructor(ExecState*, JSGlobalObject*, Structure*, ErrorPrototype*); 42 42 virtual ConstructType getConstructData(ConstructData&); 43 43 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.h
r91194 r92706 28 28 class ErrorInstance : public JSNonFinalObject { 29 29 public: 30 typedef JSNonFinalObject Base; 31 30 32 static const ClassInfo s_info; 31 33 -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h
r91194 r92706 29 29 30 30 class ErrorPrototype : public ErrorInstance { 31 p rotected:32 ErrorPrototype(ExecState*, JSGlobalObject*, Structure*);31 public: 32 typedef ErrorInstance Base; 33 33 34 public:35 34 static ErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 36 35 { … … 46 45 47 46 protected: 47 ErrorPrototype(ExecState*, JSGlobalObject*, Structure*); 48 48 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags; 49 49 static const unsigned AnonymousSlotCount = ErrorInstance::AnonymousSlotCount + 1; -
trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
r91194 r92706 50 50 51 51 public: 52 typedef JSNonFinalObject Base; 53 52 54 static InterruptedExecutionError* create(JSGlobalData& globalData) 53 55 { … … 73 75 74 76 public: 77 typedef JSNonFinalObject Base; 78 75 79 static TerminatedExecutionError* create(JSGlobalData& globalData) 76 80 { -
trunk/Source/JavaScriptCore/runtime/Executable.h
r92250 r92706 54 54 static const int NUM_PARAMETERS_NOT_COMPILED = -1; 55 55 56 protected:57 56 ExecutableBase(JSGlobalData& globalData, Structure* structure, int numParameters) 58 57 : JSCell(globalData, structure) … … 67 66 68 67 public: 68 typedef JSCell Base; 69 69 70 static ExecutableBase* create(JSGlobalData& globalData, Structure* structure, int numParameters) 70 71 { … … 169 170 friend class JIT; 170 171 public: 172 typedef ExecutableBase Base; 173 171 174 #if ENABLE(JIT) 172 175 static NativeExecutable* create(JSGlobalData& globalData, MacroAssemblerCodePtr callThunk, NativeFunction function, MacroAssemblerCodePtr constructThunk, NativeFunction constructor) … … 220 223 class ScriptExecutable : public ExecutableBase { 221 224 public: 225 typedef ExecutableBase Base; 226 222 227 ScriptExecutable(Structure* structure, JSGlobalData& globalData, const SourceCode& source, bool isInStrictContext) 223 228 : ExecutableBase(globalData, structure, NUM_PARAMETERS_NOT_COMPILED) … … 278 283 class EvalExecutable : public ScriptExecutable { 279 284 public: 285 typedef ScriptExecutable Base; 280 286 281 287 ~EvalExecutable(); … … 327 333 class ProgramExecutable : public ScriptExecutable { 328 334 public: 335 typedef ScriptExecutable Base; 336 329 337 static ProgramExecutable* create(ExecState* exec, const SourceCode& source) 330 338 { … … 380 388 friend class JIT; 381 389 public: 390 typedef ScriptExecutable Base; 391 382 392 static FunctionExecutable* create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine) 383 393 { -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.h
r91194 r92706 29 29 30 30 class FunctionConstructor : public InternalFunction { 31 private:32 FunctionConstructor(ExecState*, JSGlobalObject*, Structure*, FunctionPrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static FunctionConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, FunctionPrototype* funcPrototype) 36 35 { … … 39 38 40 39 private: 40 FunctionConstructor(ExecState*, JSGlobalObject*, Structure*, FunctionPrototype*); 41 41 virtual ConstructType getConstructData(ConstructData&); 42 42 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h
r91194 r92706 27 27 28 28 class FunctionPrototype : public InternalFunction { 29 p rivate:30 FunctionPrototype(ExecState*, JSGlobalObject*, Structure*);29 public: 30 typedef InternalFunction Base; 31 31 32 public:33 32 static FunctionPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 34 33 { … … 44 43 45 44 private: 45 FunctionPrototype(ExecState*, JSGlobalObject*, Structure*); 46 46 virtual CallType getCallData(CallData&); 47 47 }; -
trunk/Source/JavaScriptCore/runtime/GetterSetter.h
r91194 r92706 45 45 46 46 public: 47 typedef JSCell Base; 48 47 49 static GetterSetter* create(ExecState* exec) 48 50 { -
trunk/Source/JavaScriptCore/runtime/InternalFunction.h
r84052 r92706 34 34 class InternalFunction : public JSObjectWithGlobalObject { 35 35 public: 36 typedef JSObjectWithGlobalObject Base; 37 36 38 static JS_EXPORTDATA const ClassInfo s_info; 37 39 -
trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h
r91194 r92706 33 33 friend JSValue jsAPIValueWrapper(ExecState*, JSValue); 34 34 public: 35 typedef JSCell Base; 36 35 37 JSValue value() const { return m_value.get(); } 36 38 -
trunk/Source/JavaScriptCore/runtime/JSActivation.h
r91194 r92706 42 42 class JSActivation : public JSVariableObject { 43 43 private: 44 typedef JSVariableObject Base;45 44 JSActivation(CallFrame*, FunctionExecutable*); 46 45 47 46 public: 47 typedef JSVariableObject Base; 48 48 49 static JSActivation* create(JSGlobalData& globalData, CallFrame* callFrame, FunctionExecutable* funcExec) 49 50 { -
trunk/Source/JavaScriptCore/runtime/JSArray.h
r91194 r92706 67 67 68 68 public: 69 typedef JSNonFinalObject Base; 70 69 71 JSArray(VPtrStealingHackType); 70 72 virtual ~JSArray(); -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r92498 r92706 47 47 friend class JSGlobalData; 48 48 49 typedef JSObjectWithGlobalObject Base;50 51 49 JSFunction(ExecState*, JSGlobalObject*, Structure*, int length, const Identifier&, NativeFunction); 52 50 JSFunction(ExecState*, JSGlobalObject*, Structure*, int length, const Identifier&, NativeExecutable*); … … 54 52 55 53 public: 54 typedef JSObjectWithGlobalObject Base; 55 56 56 static JSFunction* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, int length, const Identifier& ident, NativeFunction nativeFunc) 57 57 { -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r92250 r92706 143 143 144 144 public: 145 typedef JSVariableObject Base; 146 145 147 static JSGlobalObject* create(JSGlobalData& globalData, Structure* structure) 146 148 { -
trunk/Source/JavaScriptCore/runtime/JSNotAnObject.h
r91194 r92706 45 45 46 46 public: 47 typedef JSNonFinalObject Base; 48 47 49 static JSNotAnObject* create(ExecState* exec) 48 50 { -
trunk/Source/JavaScriptCore/runtime/JSONObject.h
r91194 r92706 34 34 35 35 class JSONObject : public JSObjectWithGlobalObject { 36 p rivate:37 JSONObject(JSGlobalObject*, Structure*);36 public: 37 typedef JSObjectWithGlobalObject Base; 38 38 39 public:40 39 static JSONObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 41 40 { … … 54 53 55 54 private: 55 JSONObject(JSGlobalObject*, Structure*); 56 56 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 57 57 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r92569 r92706 81 81 82 82 public: 83 typedef JSCell Base; 84 83 85 virtual void visitChildren(SlotVisitor&); 84 86 ALWAYS_INLINE void visitChildrenDirect(SlotVisitor&); … … 333 335 334 336 public: 337 typedef JSObject Base; 338 335 339 static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) 336 340 { … … 361 365 362 366 public: 367 typedef JSObject Base; 368 363 369 explicit JSFinalObject(VPtrStealingHackType) 364 370 : JSObject(VPtrStealingHack, m_inlineStorage) -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
r91194 r92706 44 44 45 45 public: 46 typedef JSCell Base; 47 46 48 static JSPropertyNameIterator* create(ExecState*, JSObject*); 47 49 static JSPropertyNameIterator* create(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlot) -
trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
r91903 r92706 33 33 class JSStaticScopeObject : public JSVariableObject { 34 34 public: 35 typedef JSVariableObject Base; 36 35 37 static JSStaticScopeObject* create(ExecState* exec, const Identifier& ident, JSValue value, unsigned attributes) 36 38 { -
trunk/Source/JavaScriptCore/runtime/JSString.h
r91288 r92706 67 67 friend struct ThunkHelpers; 68 68 69 typedef JSCell Base; 70 69 71 class RopeBuilder { 70 72 public: -
trunk/Source/JavaScriptCore/runtime/JSVariableObject.h
r91095 r92706 45 45 46 46 public: 47 typedef JSNonFinalObject Base; 48 47 49 SymbolTable& symbolTable() const { return *m_symbolTable; } 48 50 -
trunk/Source/JavaScriptCore/runtime/JSWrapperObject.h
r84556 r92706 30 30 // Number, Boolean and Date which are wrappers for primitive types. 31 31 class JSWrapperObject : public JSNonFinalObject { 32 p rotected:33 explicit JSWrapperObject(JSGlobalData&, Structure*);32 public: 33 typedef JSNonFinalObject Base; 34 34 35 public:36 35 JSValue internalValue() const; 37 36 void setInternalValue(JSGlobalData&, JSValue); … … 43 42 44 43 protected: 44 explicit JSWrapperObject(JSGlobalData&, Structure*); 45 45 static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags; 46 46 -
trunk/Source/JavaScriptCore/runtime/MathObject.h
r91194 r92706 31 31 32 32 public: 33 typedef JSObjectWithGlobalObject Base; 34 33 35 static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 34 36 { -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
r91194 r92706 31 31 32 32 class NativeErrorConstructor : public InternalFunction { 33 p rivate:34 NativeErrorConstructor(ExecState*, JSGlobalObject*, Structure*, Structure* prototypeStructure, const UString&);33 public: 34 typedef InternalFunction Base; 35 35 36 public:37 36 static NativeErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, Structure* prototypeStructure, const UString& nameAndMessage) 38 37 { … … 50 49 51 50 private: 51 NativeErrorConstructor(ExecState*, JSGlobalObject*, Structure*, Structure* prototypeStructure, const UString&); 52 52 static const unsigned StructureFlags = OverridesVisitChildren | InternalFunction::StructureFlags; 53 53 virtual ConstructType getConstructData(ConstructData&); -
trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h
r91194 r92706 32 32 33 33 public: 34 typedef ErrorPrototype Base; 35 34 36 static NativeErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& nameAndMessage, NativeErrorConstructor* constructor) 35 37 { -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.h
r91194 r92706 29 29 30 30 class NumberConstructor : public InternalFunction { 31 private:32 NumberConstructor(ExecState*, JSGlobalObject*, Structure*, NumberPrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static NumberConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numPrototype) 36 35 { … … 55 54 56 55 private: 56 NumberConstructor(ExecState*, JSGlobalObject*, Structure*, NumberPrototype*); 57 57 virtual ConstructType getConstructData(ConstructData&); 58 58 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/NumberObject.h
r91194 r92706 31 31 32 32 public: 33 typedef JSWrapperObject Base; 34 33 35 static NumberObject* create(JSGlobalData& globalData, Structure* structure) 34 36 { -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.h
r91194 r92706 27 27 28 28 class NumberPrototype : public NumberObject { 29 p rivate:30 NumberPrototype(ExecState*, JSGlobalObject*, Structure*);29 public: 30 typedef NumberObject Base; 31 31 32 public:33 32 static NumberPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 34 33 { … … 48 47 49 48 private: 49 NumberPrototype(ExecState*, JSGlobalObject*, Structure*); 50 50 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 51 51 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h
r91194 r92706 29 29 30 30 class ObjectConstructor : public InternalFunction { 31 private:32 ObjectConstructor(ExecState*, JSGlobalObject*, Structure*, ObjectPrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static ObjectConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objPrototype) 36 35 { … … 52 51 53 52 private: 53 ObjectConstructor(ExecState*, JSGlobalObject*, Structure*, ObjectPrototype*); 54 54 virtual ConstructType getConstructData(ConstructData&); 55 55 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h
r91194 r92706 27 27 28 28 class ObjectPrototype : public JSNonFinalObject { 29 p rivate:30 ObjectPrototype(ExecState*, JSGlobalObject*, Structure*);29 public: 30 typedef JSNonFinalObject Base; 31 31 32 public:33 32 static ObjectPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 34 33 { … … 48 47 49 48 private: 49 ObjectPrototype(ExecState*, JSGlobalObject*, Structure*); 50 50 virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); 51 51 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); -
trunk/Source/JavaScriptCore/runtime/RegExp.h
r91869 r92706 39 39 class RegExp : public JSCell { 40 40 public: 41 typedef JSCell Base; 42 41 43 static RegExp* create(JSGlobalData&, const UString& pattern, RegExpFlags); 42 44 ~RegExp(); -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h
r91194 r92706 57 57 58 58 class RegExpConstructor : public InternalFunction { 59 p rivate:60 RegExpConstructor(ExecState*, JSGlobalObject*, Structure*, RegExpPrototype*);59 public: 60 typedef InternalFunction Base; 61 61 62 public:63 62 static RegExpConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExpPrototype* regExpPrototype) 64 63 { … … 95 94 96 95 private: 96 RegExpConstructor(ExecState*, JSGlobalObject*, Structure*, RegExpPrototype*); 97 97 virtual ConstructType getConstructData(ConstructData&); 98 98 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
r91194 r92706 30 30 31 31 public: 32 typedef JSArray Base; 33 32 34 static RegExpMatchesArray* create(ExecState* exec, RegExpConstructorPrivate* ctorPrivate) 33 35 { -
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r91194 r92706 28 28 29 29 class RegExpObject : public JSObjectWithGlobalObject { 30 p rotected:31 RegExpObject(JSGlobalObject*, Structure*, RegExp*);30 public: 31 typedef JSObjectWithGlobalObject Base; 32 32 33 public:34 33 static RegExpObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp) 35 34 { … … 41 40 return new (allocateCell<RegExpObject>(globalData.heap)) RegExpObject(globalObject, structure, regExp); 42 41 } 43 44 typedef JSObjectWithGlobalObject Base;45 42 46 43 virtual ~RegExpObject(); … … 77 74 78 75 protected: 76 RegExpObject(JSGlobalObject*, Structure*, RegExp*); 79 77 static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | JSObjectWithGlobalObject::StructureFlags; 80 78 -
trunk/Source/JavaScriptCore/runtime/RegExpPrototype.h
r91194 r92706 28 28 29 29 class RegExpPrototype : public RegExpObject { 30 p rotected:31 RegExpPrototype(ExecState*, JSGlobalObject*, Structure*, RegExp*);30 public: 31 typedef RegExpObject Base; 32 32 33 public:34 33 static RegExpPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp) 35 34 { … … 45 44 46 45 protected: 46 RegExpPrototype(ExecState*, JSGlobalObject*, Structure*, RegExp*); 47 47 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | RegExpObject::StructureFlags; 48 48 -
trunk/Source/JavaScriptCore/runtime/ScopeChain.h
r91194 r92706 49 49 50 50 public: 51 typedef JSCell Base; 52 51 53 static ScopeChainNode* create(ExecState* exec, ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis) 52 54 { -
trunk/Source/JavaScriptCore/runtime/StrictEvalActivation.h
r91903 r92706 33 33 class StrictEvalActivation : public JSNonFinalObject { 34 34 public: 35 typedef JSNonFinalObject Base; 36 35 37 static StrictEvalActivation* create(ExecState* exec) 36 38 { -
trunk/Source/JavaScriptCore/runtime/StringConstructor.h
r91194 r92706 29 29 30 30 class StringConstructor : public InternalFunction { 31 private:32 StringConstructor(ExecState*, JSGlobalObject*, Structure*, StringPrototype*);33 34 31 public: 32 typedef InternalFunction Base; 33 35 34 static StringConstructor* create(ExecState* exec, JSGlobalObject* globalObject , Structure* structure, StringPrototype* strPrototype) 36 35 { … … 49 48 50 49 private: 50 StringConstructor(ExecState*, JSGlobalObject*, Structure*, StringPrototype*); 51 51 virtual ConstructType getConstructData(ConstructData&); 52 52 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/StringObject.h
r91194 r92706 28 28 29 29 class StringObject : public JSWrapperObject { 30 protected:31 StringObject(ExecState*, Structure*);32 StringObject(ExecState*, Structure*, const UString&);33 34 30 public: 31 typedef JSWrapperObject Base; 32 35 33 static StringObject* create(ExecState* exec, Structure* structure) 36 34 { … … 62 60 63 61 protected: 62 StringObject(ExecState*, Structure*); 63 StringObject(ExecState*, Structure*, const UString&); 64 64 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSWrapperObject::StructureFlags; 65 65 StringObject(JSGlobalData&, Structure*, JSString*); -
trunk/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
r91194 r92706 31 31 class StringObjectThatMasqueradesAsUndefined : public StringObject { 32 32 public: 33 typedef StringObject Base; 34 33 35 static StringObjectThatMasqueradesAsUndefined* create(ExecState* exec, const UString& string) 34 36 { -
trunk/Source/JavaScriptCore/runtime/StringPrototype.h
r91194 r92706 33 33 34 34 public: 35 typedef StringObject Base; 36 35 37 static StringPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 36 38 { -
trunk/Source/JavaScriptCore/runtime/Structure.h
r92569 r92706 60 60 public: 61 61 friend class StructureTransitionTable; 62 63 typedef JSCell Base; 64 62 65 static Structure* create(JSGlobalData& globalData, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo) 63 66 { -
trunk/Source/JavaScriptCore/runtime/StructureChain.h
r91194 r92706 43 43 44 44 public: 45 typedef JSCell Base; 46 45 47 static StructureChain* create(JSGlobalData& globalData, Structure* head) { return new (allocateCell<StructureChain>(globalData.heap)) StructureChain(globalData, globalData.structureChainStructure.get(), head); } 46 48 WriteBarrier<Structure>* head() { return m_vector.get(); } -
trunk/Source/JavaScriptGlue/ChangeLog
r92432 r92706 1 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add ParentClass typedef in all JSC classes 4 https://bugs.webkit.org/show_bug.cgi?id=65731 5 6 Reviewed by Oliver Hunt. 7 8 Just added the Base typedefs in all the classes that are a subclass of JSCell 9 to point at their parent classes. This is a change to support future changes to the way 10 constructors and destructors are implemented in JS objects, among other things. 11 12 * JSRun.h: 13 * UserObjectImp.h: 14 1 15 2011-08-04 Mark Rowe <mrowe@apple.com> 2 16 -
trunk/Source/JavaScriptGlue/JSRun.h
r91903 r92706 36 36 class JSGlueGlobalObject : public JSGlobalObject { 37 37 public: 38 typedef JSGlobalObject Base; 39 38 40 static JSGlueGlobalObject* create(JSGlobalData& globalData, Structure* structure, JSFlags flags = kJSFlagNone) 39 41 { -
trunk/Source/JavaScriptGlue/UserObjectImp.h
r91903 r92706 37 37 class UserObjectImp : public JSNonFinalObject { 38 38 public: 39 typedef JSNonFinalObject Base; 40 39 41 static UserObjectImp* create(JSGlobalData& globalData, Structure* structure, JSUserObject* userObject) 40 42 { -
trunk/Source/WebCore/ChangeLog
r92699 r92706 1 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add ParentClass typedef in all JSC classes 4 https://bugs.webkit.org/show_bug.cgi?id=65731 5 6 Reviewed by Oliver Hunt. 7 8 No new tests. 9 10 Just added the Base typedefs in all the classes that are a subclass of JSCell 11 to point at their parent classes. This is a change to support future changes to the way 12 constructors and destructors are implemented in JS objects, among other things. 13 14 * bindings/js/JSAudioConstructor.h: 15 * bindings/js/JSImageConstructor.h: 16 * bindings/js/JSOptionConstructor.h: 17 * bindings/scripts/CodeGeneratorJS.pm: 18 (GenerateHeader): 19 (GenerateConstructorDeclaration): 20 * bindings/scripts/test/JS/JSTestInterface.cpp: 21 * bindings/scripts/test/JS/JSTestInterface.h: 22 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 23 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: 24 * bindings/scripts/test/JS/JSTestObj.cpp: 25 * bindings/scripts/test/JS/JSTestObj.h: 26 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 27 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: 28 * bridge/c/CRuntimeObject.h: 29 * bridge/c/c_instance.cpp: 30 * bridge/jni/jsc/JavaInstanceJSC.cpp: 31 * bridge/jni/jsc/JavaRuntimeObject.h: 32 * bridge/objc/ObjCRuntimeObject.h: 33 * bridge/objc/objc_runtime.h: 34 * bridge/qt/qt_instance.cpp: 35 * bridge/qt/qt_pixmapruntime.cpp: 36 * bridge/qt/qt_runtime.h: 37 * bridge/runtime_array.h: 38 * bridge/runtime_method.h: 39 * bridge/runtime_object.h: 40 * bridge/testqtbindings.cpp: 41 (Global::className): 42 1 43 2011-08-09 Alexei Svitkine <asvitkine@chromium.org> 2 44 -
trunk/Source/WebCore/bindings/js/JSAudioConstructor.h
r91790 r92706 37 37 class JSAudioConstructor : public DOMConstructorWithDocument { 38 38 public: 39 typedef DOMConstructorWithDocument Base; 40 39 41 static JSAudioConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 40 42 { -
trunk/Source/WebCore/bindings/js/JSImageConstructor.h
r91790 r92706 28 28 class JSImageConstructor : public DOMConstructorWithDocument { 29 29 public: 30 typedef DOMConstructorWithDocument Base; 31 30 32 static JSImageConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 31 33 { -
trunk/Source/WebCore/bindings/js/JSOptionConstructor.h
r91790 r92706 29 29 class JSOptionConstructor : public DOMConstructorWithDocument { 30 30 public: 31 typedef DOMConstructorWithDocument Base; 32 31 33 static JSOptionConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 32 34 { -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r92313 r92706 698 698 # Class declaration 699 699 push(@headerContent, "class $className : public $parentClassName {\n"); 700 push(@headerContent, " typedef $parentClassName Base;\n");701 700 702 701 # Static create methods 703 702 push(@headerContent, "public:\n"); 703 push(@headerContent, " typedef $parentClassName Base;\n"); 704 704 if ($interfaceName eq "DOMWindow") { 705 705 push(@headerContent, " static $className* create(JSC::JSGlobalData& globalData, JSC::Structure* structure, PassRefPtr<$implType> impl, JSDOMWindowShell* windowShell)\n"); … … 996 996 %structureFlags = (); 997 997 push(@headerContent, "class ${className}Prototype : public JSC::JSObjectWithGlobalObject {\n"); 998 push(@headerContent, "public:\n"); 998 999 push(@headerContent, " typedef JSC::JSObjectWithGlobalObject Base;\n"); 999 push(@headerContent, "public:\n");1000 1000 if ($interfaceName ne "DOMWindow" && !$dataNode->extendedAttributes->{"IsWorkerContext"}) { 1001 1001 push(@headerContent, " static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);\n"); … … 3067 3067 3068 3068 push(@$outputArray, "public:\n"); 3069 push(@$outputArray, " typedef DOMConstructorObject Base;\n"); 3069 3070 push(@$outputArray, " static $constructorClassName* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)\n"); 3070 3071 push(@$outputArray, " {\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r91790 r92706 68 68 69 69 public: 70 typedef DOMConstructorObject Base; 70 71 static JSTestInterfaceConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 71 72 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r91790 r92706 33 33 34 34 class JSTestInterface : public JSDOMWrapper { 35 public: 35 36 typedef JSDOMWrapper Base; 36 public:37 37 static JSTestInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestInterface> impl) 38 38 { … … 64 64 65 65 class JSTestInterfacePrototype : public JSC::JSObjectWithGlobalObject { 66 public: 66 67 typedef JSC::JSObjectWithGlobalObject Base; 67 public:68 68 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 69 69 static JSTestInterfacePrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r91790 r92706 69 69 70 70 public: 71 typedef DOMConstructorObject Base; 71 72 static JSTestMediaQueryListListenerConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 72 73 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
r91790 r92706 31 31 32 32 class JSTestMediaQueryListListener : public JSDOMWrapper { 33 public: 33 34 typedef JSDOMWrapper Base; 34 public:35 35 static JSTestMediaQueryListListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestMediaQueryListListener> impl) 36 36 { … … 62 62 63 63 class JSTestMediaQueryListListenerPrototype : public JSC::JSObjectWithGlobalObject { 64 public: 64 65 typedef JSC::JSObjectWithGlobalObject Base; 65 public:66 66 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 67 67 static JSTestMediaQueryListListenerPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r91790 r92706 148 148 149 149 public: 150 typedef DOMConstructorObject Base; 150 151 static JSTestObjConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 151 152 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r91790 r92706 31 31 32 32 class JSTestObj : public JSDOMWrapper { 33 public: 33 34 typedef JSDOMWrapper Base; 34 public:35 35 static JSTestObj* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl) 36 36 { … … 71 71 72 72 class JSTestObjPrototype : public JSC::JSObjectWithGlobalObject { 73 public: 73 74 typedef JSC::JSObjectWithGlobalObject Base; 74 public:75 75 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 76 76 static JSTestObjPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r91790 r92706 70 70 71 71 public: 72 typedef DOMConstructorObject Base; 72 73 static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 73 74 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
r91790 r92706 33 33 34 34 class JSTestSerializedScriptValueInterface : public JSDOMWrapper { 35 public: 35 36 typedef JSDOMWrapper Base; 36 public:37 37 static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl) 38 38 { … … 64 64 65 65 class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSObjectWithGlobalObject { 66 public: 66 67 typedef JSC::JSObjectWithGlobalObject Base; 67 public:68 68 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 69 69 static JSTestSerializedScriptValueInterfacePrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) -
trunk/Source/WebCore/bridge/c/CRuntimeObject.h
r91903 r92706 38 38 class CRuntimeObject : public RuntimeObject { 39 39 public: 40 typedef RuntimeObject Base; 41 40 42 static CRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<CInstance> instance) 41 43 { -
trunk/Source/WebCore/bridge/c/c_instance.cpp
r91903 r92706 112 112 class CRuntimeMethod : public RuntimeMethod { 113 113 public: 114 typedef RuntimeMethod Base; 115 114 116 static CRuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list) 115 117 { -
trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
r92693 r92706 117 117 class JavaRuntimeMethod : public RuntimeMethod { 118 118 public: 119 typedef RuntimeMethod Base; 120 119 121 static JavaRuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list) 120 122 { -
trunk/Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.h
r91903 r92706 36 36 class JavaRuntimeObject : public RuntimeObject { 37 37 public: 38 typedef RuntimeObject Base; 39 38 40 static JavaRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<JavaInstance> javaInst) 39 41 { -
trunk/Source/WebCore/bridge/objc/ObjCRuntimeObject.h
r91903 r92706 36 36 class ObjCRuntimeObject : public RuntimeObject { 37 37 public: 38 typedef RuntimeObject Base; 39 38 40 static ObjCRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<ObjcInstance> inst) 39 41 { -
trunk/Source/WebCore/bridge/objc/objc_runtime.h
r91903 r92706 93 93 class ObjcFallbackObjectImp : public JSObjectWithGlobalObject { 94 94 public: 95 typedef JSObjectWithGlobalObject Base; 96 95 97 static ObjcFallbackObjectImp* create(ExecState* exec, JSGlobalObject* globalObject, ObjcInstance* instance, const Identifier& propertyName) 96 98 { -
trunk/Source/WebCore/bridge/qt/qt_instance.cpp
r91903 r92706 51 51 class QtRuntimeObject : public RuntimeObject { 52 52 public: 53 typedef RuntimeObject Base; 54 53 55 static QtRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<Instance> instance) 54 56 { -
trunk/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp
r91903 r92706 199 199 class QtPixmapRuntimeObject : public RuntimeObject { 200 200 public: 201 typedef RuntimeObject Base; 202 201 203 static QtPixmapRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<Instance> instance) 202 204 { -
trunk/Source/WebCore/bridge/qt/qt_runtime.h
r91903 r92706 126 126 class QtRuntimeMethod : public InternalFunction { 127 127 public: 128 typedef InternalFunction Base; 129 128 130 virtual ~QtRuntimeMethod(); 129 131 … … 151 153 { 152 154 public: 155 typedef QtRuntimeMethod Base; 156 153 157 static QtRuntimeMetaMethod* create(ExecState* exec, const Identifier& n, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature, bool allowPrivate) 154 158 { … … 176 180 177 181 class QtConnectionObject; 178 class QtRuntimeConnectionMethod : public QtRuntimeMethod 179 { 180 public: 182 class QtRuntimeConnectionMethod : public QtRuntimeMethod { 183 public: 184 typedef QtRuntimeMethod Base; 185 181 186 static QtRuntimeConnectionMethod* create(ExecState* exec, const Identifier& n, bool isConnect, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature) 182 187 { -
trunk/Source/WebCore/bridge/runtime_array.h
r91790 r92706 34 34 class RuntimeArray : public JSArray { 35 35 public: 36 typedef JSArray Base; 37 36 38 static RuntimeArray* create(ExecState* exec, Bindings::Array* array) 37 39 { -
trunk/Source/WebCore/bridge/runtime_method.h
r91903 r92706 36 36 class RuntimeMethod : public InternalFunction { 37 37 public: 38 typedef InternalFunction Base; 39 38 40 static RuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& methodList) 39 41 { -
trunk/Source/WebCore/bridge/runtime_object.h
r91790 r92706 36 36 class RuntimeObject : public JSObjectWithGlobalObject { 37 37 public: 38 typedef JSObjectWithGlobalObject Base; 39 38 40 static RuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance) 39 41 { -
trunk/Source/WebCore/bridge/testqtbindings.cpp
r79988 r92706 77 77 class Global : public JSNonFinalObject { 78 78 public: 79 virtual UString className() const { return "global"; } 79 typedef JSNonFinalObject Base; 80 81 virtual UString className() const { return "global"; } 80 82 }; 81 83 -
trunk/Source/WebKit/mac/ChangeLog
r92651 r92706 1 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add ParentClass typedef in all JSC classes 4 https://bugs.webkit.org/show_bug.cgi?id=65731 5 6 Reviewed by Oliver Hunt. 7 8 Just added the Base typedefs in all the classes that are a subclass of JSCell 9 to point at their parent classes. This is a change to support future changes to the way 10 constructors and destructors are implemented in JS objects, among other things. 11 12 * Plugins/Hosted/ProxyInstance.mm: 13 * Plugins/Hosted/ProxyRuntimeObject.h: 14 1 15 2011-08-08 Chris Marrin <cmarrin@apple.com> 2 16 -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
r91903 r92706 180 180 class ProxyRuntimeMethod : public RuntimeMethod { 181 181 public: 182 typedef RuntimeMethod Base; 183 182 184 static ProxyRuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list) 183 185 { -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
r91903 r92706 37 37 class ProxyRuntimeObject : public JSC::Bindings::RuntimeObject { 38 38 public: 39 typedef JSC::Bindings::RuntimeObject Base; 40 39 41 static ProxyRuntimeObject* create(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject, PassRefPtr<ProxyInstance> instance) 40 42 { -
trunk/Source/WebKit2/ChangeLog
r92697 r92706 1 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add ParentClass typedef in all JSC classes 4 https://bugs.webkit.org/show_bug.cgi?id=65731 5 6 Reviewed by Oliver Hunt. 7 8 Just added the Base typedefs in all the classes that are a subclass of JSCell 9 to point at their parent classes. This is a change to support future changes to the way 10 constructors and destructors are implemented in JS objects, among other things. 11 12 * WebProcess/Plugins/Netscape/JSNPMethod.h: 13 * WebProcess/Plugins/Netscape/JSNPObject.h: 14 1 15 2011-08-08 Adrienne Walker <enne@google.com> 2 16 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.h
r91903 r92706 36 36 class JSNPMethod : public JSC::InternalFunction { 37 37 public: 38 typedef JSC::InternalFunction Base; 39 38 40 static JSNPMethod* create(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject, const JSC::Identifier& ident, NPIdentifier npIdent) 39 41 { -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h
r91903 r92706 40 40 class JSNPObject : public JSC::JSObjectWithGlobalObject { 41 41 public: 42 typedef JSC::JSObjectWithGlobalObject Base; 43 42 44 static JSNPObject* create(JSC::JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject) 43 45 {
Note: See TracChangeset
for help on using the changeset viewer.