Changeset 96630 in webkit
- Timestamp:
- Oct 4, 2011 12:22:00 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r96629 r96630 1 2011-10-04 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add static ClassInfo structs to classes that override JSCell::getCallData 4 https://bugs.webkit.org/show_bug.cgi?id=69311 5 6 Reviewed by Darin Adler. 7 8 Added ClassInfo structs to each class that defined its own getCallData 9 function but did not already have its own ClassInfo struct. This is a 10 necessary addition for when we switch over to looking up getCallData from 11 the MethodTable in ClassInfo rather than doing the virtual call (which we 12 are removing). These new ClassInfo structs are public because we often 13 use these structs in other areas of the code to uniquely identify JSC classes and 14 to enforce runtime invariants based on those class identities using ASSERTs. 15 16 * runtime/BooleanConstructor.cpp: 17 * runtime/BooleanConstructor.h: 18 19 getCallData was not marked as static is StrictModeTypeErrorFunction. 20 * runtime/Error.cpp: 21 (JSC::StrictModeTypeErrorFunction::getCallDataVirtual): 22 (JSC::StrictModeTypeErrorFunction::getCallData): 23 * runtime/ErrorConstructor.cpp: 24 * runtime/ErrorConstructor.h: 25 * runtime/FunctionConstructor.cpp: 26 * runtime/FunctionConstructor.h: 27 * runtime/FunctionPrototype.cpp: 28 * runtime/FunctionPrototype.h: 29 1 30 2011-10-04 Ryosuke Niwa <rniwa@webkit.org> 2 31 -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp
r96164 r96630 28 28 29 29 ASSERT_CLASS_FITS_IN_CELL(BooleanConstructor); 30 31 const ClassInfo BooleanConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(BooleanConstructor) }; 30 32 31 33 BooleanConstructor::BooleanConstructor(JSGlobalObject* globalObject, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.h
r96164 r96630 39 39 } 40 40 41 static const ClassInfo s_info; 42 41 43 protected: 42 44 void finishCreation(ExecState*, BooleanPrototype*); -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r96164 r96630 202 202 } 203 203 204 CallType getCallDataVirtual(CallData& callData)204 virtual CallType getCallDataVirtual(CallData& callData) 205 205 { 206 206 return getCallData(this, callData); 207 207 } 208 208 209 CallType getCallData(JSCell*, CallData& callData)209 static CallType getCallData(JSCell*, CallData& callData) 210 210 { 211 211 callData.native.function = callThrowTypeError; 212 212 return CallTypeHost; 213 213 } 214 215 static const ClassInfo s_info; 214 216 215 217 private: … … 219 221 ASSERT_CLASS_FITS_IN_CELL(StrictModeTypeErrorFunction); 220 222 223 const ClassInfo StrictModeTypeErrorFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(StrictModeTypeErrorFunction) }; 224 221 225 JSValue createTypeErrorFunction(ExecState* exec, const UString& message) 222 226 { -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r96164 r96630 29 29 30 30 ASSERT_CLASS_FITS_IN_CELL(ErrorConstructor); 31 32 const ClassInfo ErrorConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(ErrorConstructor) }; 31 33 32 34 ErrorConstructor::ErrorConstructor(JSGlobalObject* globalObject, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.h
r96164 r96630 40 40 } 41 41 42 static const ClassInfo s_info; 43 42 44 protected: 43 45 void finishCreation(ExecState*, ErrorPrototype*); -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r96164 r96630 37 37 38 38 ASSERT_CLASS_FITS_IN_CELL(FunctionConstructor); 39 40 const ClassInfo FunctionConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionConstructor) }; 39 41 40 42 FunctionConstructor::FunctionConstructor(JSGlobalObject* globalObject, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.h
r96164 r96630 39 39 } 40 40 41 static const ClassInfo s_info; 42 41 43 private: 42 44 FunctionConstructor(JSGlobalObject*, Structure*); -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r96164 r96630 39 39 static EncodedJSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*); 40 40 static EncodedJSValue JSC_HOST_CALL functionProtoFuncBind(ExecState*); 41 42 const ClassInfo FunctionPrototype::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionPrototype) }; 41 43 42 44 FunctionPrototype::FunctionPrototype(JSGlobalObject* globalObject, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h
r96164 r96630 44 44 } 45 45 46 static const ClassInfo s_info; 47 46 48 protected: 47 49 void finishCreation(ExecState*, const Identifier& name); -
trunk/Source/WebCore/ChangeLog
r96628 r96630 1 2011-10-04 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add static ClassInfo structs to classes that override JSCell::getCallData 4 https://bugs.webkit.org/show_bug.cgi?id=69311 5 6 Reviewed by Darin Adler. 7 8 No new tests. 9 10 Added ClassInfo structs to each class that defined its own getCallData 11 function but did not already have its own ClassInfo struct. This is a 12 necessary addition for when we switch over to looking up getCallData from 13 the MethodTable in ClassInfo rather than doing the virtual call (which we 14 are removing). These new ClassInfo structs are public because we often 15 use these structs in other areas of the code to uniquely identify JSC classes and 16 to enforce runtime invariants based on those class identities using ASSERTs. 17 18 * bridge/qt/qt_runtime.cpp: 19 * bridge/qt/qt_runtime.h: 20 1 21 2011-10-04 Ryosuke Niwa <rniwa@webkit.org> 2 22 -
trunk/Source/WebCore/bridge/qt/qt_runtime.cpp
r96346 r96630 1426 1426 } 1427 1427 1428 const ClassInfo QtRuntimeMetaMethod::s_info = { "QtRuntimeMethod", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(QtRuntimeMetaMethod) }; 1429 1428 1430 QtRuntimeMetaMethod::QtRuntimeMetaMethod(ExecState* exec, Structure* structure, const Identifier& identifier) 1429 1431 : QtRuntimeMethod (new QtRuntimeMetaMethodData(), exec, structure, identifier) … … 1580 1582 1581 1583 QMultiMap<QObject*, QtConnectionObject*> QtRuntimeConnectionMethod::connections; 1584 1585 const ClassInfo QtRuntimeConnectionMethod::s_info = { "QtRuntimeMethod", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(QtRuntimeConnectionMethod) }; 1582 1586 1583 1587 QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, Structure* structure, const Identifier& identifier) -
trunk/Source/WebCore/bridge/qt/qt_runtime.h
r96346 r96630 171 171 static void visitChildren(JSCell*, SlotVisitor&); 172 172 173 static const ClassInfo s_info; 174 173 175 protected: 174 176 QtRuntimeMetaMethodData* d_func() const {return reinterpret_cast<QtRuntimeMetaMethodData*>(d_ptr);} … … 202 204 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); 203 205 virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); 206 207 static const ClassInfo s_info; 204 208 205 209 protected:
Note: See TracChangeset
for help on using the changeset viewer.