Changeset 95936 in webkit
- Timestamp:
- Sep 26, 2011 12:05:28 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 84 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackConstructor.cpp
r94875 r95936 37 37 namespace JSC { 38 38 39 const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSNonFinalObject::s_info, 0, 0 };39 const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackConstructor) }; 40 40 41 41 JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) -
trunk/Source/JavaScriptCore/API/JSCallbackFunction.cpp
r95108 r95936 41 41 ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction); 42 42 43 const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0 };43 const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackFunction) }; 44 44 45 45 JSCallbackFunction::JSCallbackFunction(JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback) -
trunk/Source/JavaScriptCore/API/JSCallbackObject.cpp
r94701 r95936 37 37 38 38 // Define the two types of JSCallbackObjects we support. 39 template <> const ClassInfo JSCallbackObject<JSNonFinalObject>::s_info = { "CallbackObject", &JSNonFinalObject::s_info, 0, 0 };40 template <> const ClassInfo JSCallbackObject<JSGlobalObject>::s_info = { "CallbackGlobalObject", &JSGlobalObject::s_info, 0, 0 };39 template <> const ClassInfo JSCallbackObject<JSNonFinalObject>::s_info = { "CallbackObject", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackObject) }; 40 template <> const ClassInfo JSCallbackObject<JSGlobalObject>::s_info = { "CallbackGlobalObject", &JSGlobalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackObject) }; 41 41 42 42 void JSCallbackObjectData::finalize(Handle<Unknown> handle, void* context) -
trunk/Source/JavaScriptCore/ChangeLog
r95934 r95936 1 2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add custom vtable struct to ClassInfo struct 4 https://bugs.webkit.org/show_bug.cgi?id=68567 5 6 Reviewed by Oliver Hunt. 7 8 Declared/defined the MethodTable struct and added it to the ClassInfo struct. 9 Also defined the CREATE_METHOD_TABLE macro to generate these method tables 10 succinctly where they need to be defined. 11 12 Also added to it the first function to use this macro, visitChildren. 13 14 This is part of the process of getting rid of all C++ virtual methods in JSCell. 15 Eventually all virtual functions in JSCell that can't easily be converted to 16 non-virtual functions will be put into this custom vtable structure. 17 * runtime/ClassInfo.h: 18 19 Added the CREATE_METHOD_TABLE macro call as the last argument to each of the 20 ClassInfo structs declared in these classes. This saves us from having to visit 21 each s_info definition in the future when we add more methods to the MethodTable. 22 * API/JSCallbackConstructor.cpp: 23 * API/JSCallbackFunction.cpp: 24 * API/JSCallbackObject.cpp: 25 * JavaScriptCore.exp: 26 * runtime/Arguments.cpp: 27 * runtime/ArrayConstructor.cpp: 28 * runtime/ArrayPrototype.cpp: 29 * runtime/BooleanObject.cpp: 30 * runtime/BooleanPrototype.cpp: 31 * runtime/DateConstructor.cpp: 32 * runtime/DateInstance.cpp: 33 * runtime/DatePrototype.cpp: 34 * runtime/ErrorInstance.cpp: 35 * runtime/ErrorPrototype.cpp: 36 * runtime/ExceptionHelpers.cpp: 37 * runtime/Executable.cpp: 38 * runtime/GetterSetter.cpp: 39 * runtime/InternalFunction.cpp: 40 * runtime/JSAPIValueWrapper.cpp: 41 * runtime/JSActivation.cpp: 42 * runtime/JSArray.cpp: 43 * runtime/JSByteArray.cpp: 44 * runtime/JSFunction.cpp: 45 * runtime/JSGlobalObject.cpp: 46 * runtime/JSONObject.cpp: 47 * runtime/JSObject.cpp: 48 * runtime/JSPropertyNameIterator.cpp: 49 * runtime/JSString.cpp: 50 * runtime/MathObject.cpp: 51 * runtime/NativeErrorConstructor.cpp: 52 * runtime/NumberConstructor.cpp: 53 * runtime/NumberObject.cpp: 54 * runtime/NumberPrototype.cpp: 55 * runtime/ObjectConstructor.cpp: 56 * runtime/ObjectPrototype.cpp: 57 * runtime/RegExp.cpp: 58 * runtime/RegExpConstructor.cpp: 59 * runtime/RegExpObject.cpp: 60 * runtime/RegExpPrototype.cpp: 61 * runtime/ScopeChain.cpp: 62 * runtime/StringConstructor.cpp: 63 * runtime/StringObject.cpp: 64 * runtime/StringPrototype.cpp: 65 * runtime/Structure.cpp: 66 * runtime/StructureChain.cpp: 67 68 Had to make visitChildren and visitChildrenVirtual protected instead of private 69 because some of the subclasses of JSWrapperObject need access to JSWrapperObject's 70 visitChildren function pointer in their vtable since they don't provide their own 71 implementation. Same for RegExpObject. 72 * runtime/JSWrapperObject.h: 73 * runtime/RegExpObject.h: 74 1 75 2011-09-25 Adam Barth <abarth@webkit.org> 2 76 -
trunk/Source/JavaScriptCore/JavaScriptCore.exp
r95893 r95936 274 274 __ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE 275 275 __ZN3JSC6RegExpD1Ev 276 __ZN3JSC7JSArray13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE 276 277 __ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE 277 278 __ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE -
trunk/Source/JavaScriptCore/runtime/Arguments.cpp
r95849 r95936 36 36 ASSERT_CLASS_FITS_IN_CELL(Arguments); 37 37 38 const ClassInfo Arguments::s_info = { "Arguments", &JSNonFinalObject::s_info, 0, 0 };38 const ClassInfo Arguments::s_info = { "Arguments", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(Arguments) }; 39 39 40 40 Arguments::~Arguments() -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
r95108 r95936 42 42 namespace JSC { 43 43 44 const ClassInfo ArrayConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::arrayConstructorTable };44 const ClassInfo ArrayConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::arrayConstructorTable, CREATE_METHOD_TABLE(ArrayConstructor) }; 45 45 46 46 /* Source for ArrayConstructor.lut.h -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r95787 r95936 86 86 // ------------------------------ ArrayPrototype ---------------------------- 87 87 88 const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecState::arrayPrototypeTable };88 const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecState::arrayPrototypeTable, CREATE_METHOD_TABLE(ArrayPrototype)}; 89 89 90 90 /* Source for ArrayPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/BooleanObject.cpp
r94875 r95936 26 26 ASSERT_CLASS_FITS_IN_CELL(BooleanObject); 27 27 28 const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0, 0 };28 const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(BooleanObject) }; 29 29 30 30 BooleanObject::BooleanObject(JSGlobalData& globalData, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp
r95108 r95936 39 39 namespace JSC { 40 40 41 const ClassInfo BooleanPrototype::s_info = { "Boolean", &BooleanObject::s_info, 0, ExecState::booleanPrototypeTable };41 const ClassInfo BooleanPrototype::s_info = { "Boolean", &BooleanObject::s_info, 0, ExecState::booleanPrototypeTable, CREATE_METHOD_TABLE(BooleanPrototype) }; 42 42 43 43 /* Source for BooleanPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/ClassInfo.h
r95115 r95936 30 30 class HashEntry; 31 31 struct HashTable; 32 33 struct MethodTable { 34 typedef void (*VisitChildrenFunctionPtr)(JSCell*, SlotVisitor&); 35 VisitChildrenFunctionPtr visitChildrenFunctionPtr; 36 }; 37 38 #define CREATE_METHOD_TABLE(ClassName) { \ 39 &ClassName::visitChildren \ 40 } 32 41 33 42 struct ClassInfo { … … 65 74 typedef const HashTable* (*ClassPropHashTableGetterFunction)(ExecState*); 66 75 const ClassPropHashTableGetterFunction classPropHashTableGetterFunction; 76 77 MethodTable methodTable; 67 78 }; 68 79 -
trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp
r95108 r95936 62 62 namespace JSC { 63 63 64 const ClassInfo DateConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::dateConstructorTable };64 const ClassInfo DateConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::dateConstructorTable, CREATE_METHOD_TABLE(DateConstructor) }; 65 65 66 66 /* Source for DateConstructor.lut.h -
trunk/Source/JavaScriptCore/runtime/DateInstance.cpp
r94875 r95936 33 33 namespace JSC { 34 34 35 const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0 };35 const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(DateInstance)}; 36 36 37 37 DateInstance::DateInstance(ExecState* exec, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r95108 r95936 376 376 } 377 377 378 const ClassInfo DatePrototype::s_info = {"Date", &DateInstance::s_info, 0, ExecState::dateTable };378 const ClassInfo DatePrototype::s_info = {"Date", &DateInstance::s_info, 0, ExecState::dateTable, CREATE_METHOD_TABLE(DatePrototype)}; 379 379 380 380 /* Source for DatePrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp
r94364 r95936 24 24 namespace JSC { 25 25 26 const ClassInfo ErrorInstance::s_info = { "Error", &JSNonFinalObject::s_info, 0, 0 };26 const ClassInfo ErrorInstance::s_info = { "Error", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ErrorInstance) }; 27 27 28 28 ErrorInstance::ErrorInstance(JSGlobalData& globalData, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp
r94929 r95936 41 41 namespace JSC { 42 42 43 const ClassInfo ErrorPrototype::s_info = { "Error", &ErrorInstance::s_info, 0, ExecState::errorPrototypeTable };43 const ClassInfo ErrorPrototype::s_info = { "Error", &ErrorInstance::s_info, 0, ExecState::errorPrototypeTable, CREATE_METHOD_TABLE(ErrorPrototype) }; 44 44 45 45 /* Source for ErrorPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
r95901 r95936 42 42 namespace JSC { 43 43 44 const ClassInfo InterruptedExecutionError::s_info = { "InterruptedExecutionError", &Base::s_info, 0, 0 };44 const ClassInfo InterruptedExecutionError::s_info = { "InterruptedExecutionError", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(InterruptedExecutionError) }; 45 45 46 46 UString InterruptedExecutionError::toString(ExecState*) const … … 65 65 66 66 67 const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", &Base::s_info, 0, 0 };67 const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(TerminatedExecutionError) }; 68 68 69 69 UString TerminatedExecutionError::toString(ExecState*) const -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r95901 r95936 37 37 namespace JSC { 38 38 39 const ClassInfo ExecutableBase::s_info = { "Executable", 0, 0, 0 };39 const ClassInfo ExecutableBase::s_info = { "Executable", 0, 0, 0, CREATE_METHOD_TABLE(ExecutableBase) }; 40 40 41 41 void ExecutableBase::clearCode() … … 72 72 } 73 73 74 const ClassInfo NativeExecutable::s_info = { "NativeExecutable", &ExecutableBase::s_info, 0, 0 };74 const ClassInfo NativeExecutable::s_info = { "NativeExecutable", &ExecutableBase::s_info, 0, 0, CREATE_METHOD_TABLE(NativeExecutable) }; 75 75 76 76 NativeExecutable::~NativeExecutable() … … 99 99 #endif 100 100 101 const ClassInfo ScriptExecutable::s_info = { "ScriptExecutable", &ExecutableBase::s_info, 0, 0 };102 103 const ClassInfo EvalExecutable::s_info = { "EvalExecutable", &ScriptExecutable::s_info, 0, 0 };101 const ClassInfo ScriptExecutable::s_info = { "ScriptExecutable", &ExecutableBase::s_info, 0, 0, CREATE_METHOD_TABLE(ScriptExecutable) }; 102 103 const ClassInfo EvalExecutable::s_info = { "EvalExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(EvalExecutable) }; 104 104 105 105 EvalExecutable::EvalExecutable(ExecState* exec, const SourceCode& source, bool inStrictContext) … … 112 112 } 113 113 114 const ClassInfo ProgramExecutable::s_info = { "ProgramExecutable", &ScriptExecutable::s_info, 0, 0 };114 const ClassInfo ProgramExecutable::s_info = { "ProgramExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(ProgramExecutable) }; 115 115 116 116 ProgramExecutable::ProgramExecutable(ExecState* exec, const SourceCode& source) … … 123 123 } 124 124 125 const ClassInfo FunctionExecutable::s_info = { "FunctionExecutable", &ScriptExecutable::s_info, 0, 0 };125 const ClassInfo FunctionExecutable::s_info = { "FunctionExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionExecutable) }; 126 126 127 127 FunctionExecutable::FunctionExecutable(JSGlobalData& globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool inStrictContext) -
trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp
r95849 r95936 29 29 namespace JSC { 30 30 31 const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0 };31 const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(GetterSetter) }; 32 32 33 33 void GetterSetter::visitChildrenVirtual(SlotVisitor& visitor) -
trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp
r94875 r95936 35 35 ASSERT_CLASS_FITS_IN_CELL(InternalFunction); 36 36 37 const ClassInfo InternalFunction::s_info = { "Function", &JSNonFinalObject::s_info, 0, 0 };37 const ClassInfo InternalFunction::s_info = { "Function", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(InternalFunction) }; 38 38 39 39 InternalFunction::InternalFunction(VPtrStealingHackType) -
trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.cpp
r95901 r95936 29 29 namespace JSC { 30 30 31 const ClassInfo JSAPIValueWrapper::s_info = { "API Wrapper", 0, 0, 0 };31 const ClassInfo JSAPIValueWrapper::s_info = { "API Wrapper", 0, 0, 0, CREATE_METHOD_TABLE(JSAPIValueWrapper) }; 32 32 33 33 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r95901 r95936 38 38 ASSERT_CLASS_FITS_IN_CELL(JSActivation); 39 39 40 const ClassInfo JSActivation::s_info = { "JSActivation", &Base::s_info, 0, 0 };40 const ClassInfo JSActivation::s_info = { "JSActivation", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSActivation) }; 41 41 42 42 JSActivation::JSActivation(CallFrame* callFrame, FunctionExecutable* functionExecutable) -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r95849 r95936 93 93 static const unsigned minDensityMultiplier = 8; 94 94 95 const ClassInfo JSArray::s_info = {"Array", &JSNonFinalObject::s_info, 0, 0 };95 const ClassInfo JSArray::s_info = {"Array", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSArray)}; 96 96 97 97 // We keep track of the size of the last array after it was grown. We use this -
trunk/Source/JavaScriptCore/runtime/JSByteArray.cpp
r95901 r95936 34 34 namespace JSC { 35 35 36 const ClassInfo JSByteArray::s_defaultInfo = { "ByteArray", &Base::s_info, 0, 0 };36 const ClassInfo JSByteArray::s_defaultInfo = { "ByteArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) }; 37 37 38 38 JSByteArray::JSByteArray(ExecState* exec, Structure* structure, ByteArray* storage) -
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r95849 r95936 51 51 ASSERT_CLASS_FITS_IN_CELL(JSFunction); 52 52 53 const ClassInfo JSFunction::s_info = { "Function", &Base::s_info, 0, 0 };53 const ClassInfo JSFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSFunction) }; 54 54 55 55 bool JSFunction::isHostFunctionNonInline() const -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r95849 r95936 75 75 namespace JSC { 76 76 77 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &JSVariableObject::s_info, 0, ExecState::globalObjectTable };77 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &JSVariableObject::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) }; 78 78 79 79 /* Source for JSGlobalObject.lut.h -
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r95901 r95936 589 589 // ------------------------------ JSONObject -------------------------------- 590 590 591 const ClassInfo JSONObject::s_info = { "JSON", &JSNonFinalObject::s_info, 0, ExecState::jsonTable };591 const ClassInfo JSONObject::s_info = { "JSON", &JSNonFinalObject::s_info, 0, ExecState::jsonTable, CREATE_METHOD_TABLE(JSONObject) }; 592 592 593 593 /* Source for JSONObject.lut.h -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r95849 r95936 48 48 const char* StrictModeReadonlyPropertyWriteError = "Attempted to assign to readonly property."; 49 49 50 const ClassInfo JSObject::s_info = { "Object", 0, 0, 0 };50 const ClassInfo JSObject::s_info = { "Object", 0, 0, 0, CREATE_METHOD_TABLE(JSObject) }; 51 51 52 52 static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode) -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
r95901 r95936 36 36 ASSERT_CLASS_FITS_IN_CELL(JSPropertyNameIterator); 37 37 38 const ClassInfo JSPropertyNameIterator::s_info = { "JSPropertyNameIterator", 0, 0, 0 };38 const ClassInfo JSPropertyNameIterator::s_info = { "JSPropertyNameIterator", 0, 0, 0, CREATE_METHOD_TABLE(JSPropertyNameIterator) }; 39 39 40 40 inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlots) -
trunk/Source/JavaScriptCore/runtime/JSString.cpp
r94875 r95936 35 35 static const unsigned substringFromRopeCutoff = 4; 36 36 37 const ClassInfo JSString::s_info = { "string", 0, 0, 0 };37 const ClassInfo JSString::s_info = { "string", 0, 0, 0, CREATE_METHOD_TABLE(JSString) }; 38 38 39 39 void JSString::resolveRope(ExecState* exec) const -
trunk/Source/JavaScriptCore/runtime/JSWrapperObject.h
r95849 r95936 45 45 static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags; 46 46 47 private:48 47 virtual void visitChildrenVirtual(SlotVisitor&); 49 48 static void visitChildren(JSCell*, SlotVisitor&); 50 49 50 private: 51 51 WriteBarrier<Unknown> m_internalValue; 52 52 }; -
trunk/Source/JavaScriptCore/runtime/MathObject.cpp
r94875 r95936 60 60 namespace JSC { 61 61 62 const ClassInfo MathObject::s_info = { "Math", &JSNonFinalObject::s_info, 0, ExecState::mathTable };62 const ClassInfo MathObject::s_info = { "Math", &JSNonFinalObject::s_info, 0, ExecState::mathTable, CREATE_METHOD_TABLE(MathObject) }; 63 63 64 64 /* Source for MathObject.lut.h -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r95849 r95936 31 31 ASSERT_CLASS_FITS_IN_CELL(NativeErrorConstructor); 32 32 33 const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0 };33 const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(NativeErrorConstructor) }; 34 34 35 35 NativeErrorConstructor::NativeErrorConstructor(JSGlobalObject* globalObject, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r95108 r95936 43 43 namespace JSC { 44 44 45 const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::numberConstructorTable };45 const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::numberConstructorTable, CREATE_METHOD_TABLE(NumberConstructor) }; 46 46 47 47 /* Source for NumberConstructor.lut.h -
trunk/Source/JavaScriptCore/runtime/NumberObject.cpp
r95893 r95936 30 30 ASSERT_CLASS_FITS_IN_CELL(NumberObject); 31 31 32 const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0 };32 const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(NumberObject) }; 33 33 34 34 NumberObject::NumberObject(JSGlobalData& globalData, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp
r95108 r95936 56 56 namespace JSC { 57 57 58 const ClassInfo NumberPrototype::s_info = { "Number", &NumberObject::s_info, 0, ExecState::numberPrototypeTable };58 const ClassInfo NumberPrototype::s_info = { "Number", &NumberObject::s_info, 0, ExecState::numberPrototypeTable, CREATE_METHOD_TABLE(NumberPrototype) }; 59 59 60 60 /* Source for NumberPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r95108 r95936 56 56 namespace JSC { 57 57 58 const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::objectConstructorTable };58 const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::objectConstructorTable, CREATE_METHOD_TABLE(ObjectConstructor) }; 59 59 60 60 /* Source for ObjectConstructor.lut.h -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r94929 r95936 45 45 namespace JSC { 46 46 47 const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, ExecState::objectPrototypeTable };47 const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, ExecState::objectPrototypeTable, CREATE_METHOD_TABLE(ObjectPrototype) }; 48 48 49 49 /* Source for ObjectPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/RegExp.cpp
r94981 r95936 39 39 namespace JSC { 40 40 41 const ClassInfo RegExp::s_info = { "RegExp", 0, 0, 0 };41 const ClassInfo RegExp::s_info = { "RegExp", 0, 0, 0, CREATE_METHOD_TABLE(RegExp) }; 42 42 43 43 RegExpFlags regExpFlags(const UString& string) -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r95108 r95936 68 68 ASSERT_CLASS_FITS_IN_CELL(RegExpConstructor); 69 69 70 const ClassInfo RegExpConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::regExpConstructorTable };70 const ClassInfo RegExpConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::regExpConstructorTable, CREATE_METHOD_TABLE(RegExpConstructor) }; 71 71 72 72 /* Source for RegExpConstructor.lut.h -
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r95849 r95936 51 51 ASSERT_CLASS_FITS_IN_CELL(RegExpObject); 52 52 53 const ClassInfo RegExpObject::s_info = { "RegExp", &JSNonFinalObject::s_info, 0, ExecState::regExpTable };53 const ClassInfo RegExpObject::s_info = { "RegExp", &JSNonFinalObject::s_info, 0, ExecState::regExpTable, CREATE_METHOD_TABLE(RegExpObject) }; 54 54 55 55 /* Source for RegExpObject.lut.h -
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r95849 r95936 82 82 static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | Base::StructureFlags; 83 83 84 private:85 84 virtual void visitChildrenVirtual(SlotVisitor&); 86 85 static void visitChildren(JSCell*, SlotVisitor&); 87 86 87 private: 88 88 bool match(ExecState*); 89 89 -
trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp
r95108 r95936 50 50 namespace JSC { 51 51 52 const ClassInfo RegExpPrototype::s_info = { "RegExp", &RegExpObject::s_info, 0, ExecState::regExpPrototypeTable };52 const ClassInfo RegExpPrototype::s_info = { "RegExp", &RegExpObject::s_info, 0, ExecState::regExpPrototypeTable, CREATE_METHOD_TABLE(RegExpPrototype) }; 53 53 54 54 /* Source for RegExpPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/ScopeChain.cpp
r95849 r95936 52 52 #endif 53 53 54 const ClassInfo ScopeChainNode::s_info = { "ScopeChainNode", 0, 0, 0 };54 const ClassInfo ScopeChainNode::s_info = { "ScopeChainNode", 0, 0, 0, CREATE_METHOD_TABLE(ScopeChainNode) }; 55 55 56 56 int ScopeChainNode::localDepth() -
trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp
r95108 r95936 38 38 namespace JSC { 39 39 40 const ClassInfo StringConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::stringConstructorTable };40 const ClassInfo StringConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::stringConstructorTable, CREATE_METHOD_TABLE(StringConstructor) }; 41 41 42 42 /* Source for StringConstructor.lut.h -
trunk/Source/JavaScriptCore/runtime/StringObject.cpp
r94875 r95936 28 28 ASSERT_CLASS_FITS_IN_CELL(StringObject); 29 29 30 const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0 };30 const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(StringObject) }; 31 31 32 32 StringObject::StringObject(JSGlobalData& globalData, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp
r95787 r95936 86 86 namespace JSC { 87 87 88 const ClassInfo StringPrototype::s_info = { "String", &StringObject::s_info, 0, ExecState::stringTable };88 const ClassInfo StringPrototype::s_info = { "String", &StringObject::s_info, 0, ExecState::stringTable, CREATE_METHOD_TABLE(StringPrototype) }; 89 89 90 90 /* Source for StringPrototype.lut.h -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r95901 r95936 176 176 } 177 177 178 const ClassInfo Structure::s_info = { "Structure", 0, 0, 0 };178 const ClassInfo Structure::s_info = { "Structure", 0, 0, 0, CREATE_METHOD_TABLE(Structure) }; 179 179 180 180 Structure::Structure(JSGlobalData& globalData) -
trunk/Source/JavaScriptCore/runtime/StructureChain.cpp
r95901 r95936 33 33 namespace JSC { 34 34 35 ClassInfo StructureChain::s_info = { "StructureChain", 0, 0, 0 };35 ClassInfo StructureChain::s_info = { "StructureChain", 0, 0, 0, CREATE_METHOD_TABLE(StructureChain) }; 36 36 37 37 StructureChain::StructureChain(JSGlobalData& globalData, Structure* structure) -
trunk/Source/JavaScriptGlue/ChangeLog
r95849 r95936 1 2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add custom vtable struct to ClassInfo struct 4 https://bugs.webkit.org/show_bug.cgi?id=68567 5 6 Reviewed by Oliver Hunt. 7 8 Added CREATE_METHOD_TABLE macro to generate the custom vtable for the 9 specified class in its ClassInfo. Also added to it the first function to use 10 this macro, visitChildren. This is part of the process of getting rid of all 11 C++ virtual methods in JSCell. Eventually all virtual functions in JSCell 12 that can't easily be converted to non-virtual functions will be put into 13 this custom vtable structure. 14 15 * UserObjectImp.cpp: 16 1 17 2011-09-23 Mark Hahnenberg <mhahnenberg@apple.com> 2 18 -
trunk/Source/JavaScriptGlue/UserObjectImp.cpp
r95849 r95936 33 33 #include <JavaScriptCore/PropertyNameArray.h> 34 34 35 const ClassInfo UserObjectImp::s_info = { "UserObject", &JSNonFinalObject::s_info, 0, 0 };35 const ClassInfo UserObjectImp::s_info = { "UserObject", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(UserObjectImp) }; 36 36 37 37 UserObjectImp::UserObjectImp(JSGlobalData& globalData, Structure* structure, JSUserObject* userObject) -
trunk/Source/WebCore/ChangeLog
r95935 r95936 1 2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add custom vtable struct to ClassInfo struct 4 https://bugs.webkit.org/show_bug.cgi?id=68567 5 6 Reviewed by Oliver Hunt. 7 8 No new tests. 9 10 Added CREATE_METHOD_TABLE macro to generate the custom vtable for the 11 specified class in its ClassInfo. Also added to it the first function to use 12 this macro, visitChildren. This is part of the process of getting rid of all 13 C++ virtual methods in JSCell. Eventually all virtual functions in JSCell 14 that can't easily be converted to non-virtual functions will be put into 15 this custom vtable structure. 16 17 * bindings/js/JSAudioConstructor.cpp: 18 * bindings/js/JSDOMGlobalObject.cpp: 19 * bindings/js/JSDOMWindowBase.cpp: 20 * bindings/js/JSDOMWindowShell.cpp: 21 * bindings/js/JSImageConstructor.cpp: 22 * bindings/js/JSImageDataCustom.cpp: 23 (WebCore::toJS): 24 * bindings/js/JSOptionConstructor.cpp: 25 * bindings/js/JSWorkerContextBase.cpp: 26 27 Changed the bindings generator to add the call to the CREATE_METHOD_TABLE macro where 28 necessary. 29 * bindings/scripts/CodeGeneratorJS.pm: 30 (GenerateImplementation): 31 (GenerateConstructorDefinition): 32 * bindings/scripts/test/JS/JSTestInterface.cpp: 33 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 34 * bindings/scripts/test/JS/JSTestObj.cpp: 35 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 36 * bridge/c/CRuntimeObject.cpp: 37 * bridge/c/c_instance.cpp: 38 * bridge/jni/jsc/JavaInstanceJSC.cpp: 39 * bridge/jni/jsc/JavaRuntimeObject.cpp: 40 * bridge/objc/ObjCRuntimeObject.mm: 41 * bridge/objc/objc_instance.mm: 42 * bridge/objc/objc_runtime.mm: 43 * bridge/qt/qt_instance.cpp: 44 * bridge/qt/qt_pixmapruntime.cpp: 45 * bridge/qt/qt_runtime.cpp: 46 * bridge/runtime_array.cpp: 47 * bridge/runtime_method.cpp: 48 * bridge/runtime_object.cpp: 49 1 50 2011-09-25 Eunmi Lee <eunmi15.lee@samsung.com> 2 51 -
trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp
r95250 r95936 38 38 namespace WebCore { 39 39 40 const ClassInfo JSAudioConstructor::s_info = { "AudioConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };40 const ClassInfo JSAudioConstructor::s_info = { "AudioConstructor", &DOMConstructorWithDocument::s_info, 0, 0, CREATE_METHOD_TABLE(JSAudioConstructor) }; 41 41 42 42 JSAudioConstructor::JSAudioConstructor(Structure* structure, JSDOMGlobalObject* globalObject) -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
r95849 r95936 41 41 namespace WebCore { 42 42 43 const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", &JSGlobalObject::s_info, 0, 0 };43 const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", &JSGlobalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSDOMGlobalObject) }; 44 44 45 45 JSDOMGlobalObject::JSDOMGlobalObject(JSGlobalData& globalData, Structure* structure, PassRefPtr<DOMWrapperWorld> world) -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
r95250 r95936 42 42 namespace WebCore { 43 43 44 const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, 0 };44 const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) }; 45 45 46 46 JSDOMWindowBase::JSDOMWindowBase(JSGlobalData& globalData, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell) -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
r95901 r95936 42 42 ASSERT_CLASS_FITS_IN_CELL(JSDOMWindowShell); 43 43 44 const ClassInfo JSDOMWindowShell::s_info = { "JSDOMWindowShell", &Base::s_info, 0, 0 };44 const ClassInfo JSDOMWindowShell::s_info = { "JSDOMWindowShell", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSDOMWindowShell) }; 45 45 46 46 JSDOMWindowShell::JSDOMWindowShell(Structure* structure, DOMWrapperWorld* world) -
trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp
r95250 r95936 33 33 ASSERT_CLASS_FITS_IN_CELL(JSImageConstructor); 34 34 35 const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };35 const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", &DOMConstructorWithDocument::s_info, 0, 0, CREATE_METHOD_TABLE(JSImageConstructor) }; 36 36 37 37 JSImageConstructor::JSImageConstructor(Structure* structure, JSDOMGlobalObject* globalObject) -
trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp
r95901 r95936 48 48 wrapper = CREATE_DOM_WRAPPER(exec, globalObject, ImageData, imageData); 49 49 Identifier dataName(exec, "data"); 50 static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::Base::s_info, 0, 0 };50 static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) }; 51 51 Structure* cpaStructure = getCachedDOMStructure(globalObject, &cpaClassInfo); 52 52 if (!cpaStructure) -
trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp
r95250 r95936 34 34 ASSERT_CLASS_FITS_IN_CELL(JSOptionConstructor); 35 35 36 const ClassInfo JSOptionConstructor::s_info = { "OptionConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };36 const ClassInfo JSOptionConstructor::s_info = { "OptionConstructor", &DOMConstructorWithDocument::s_info, 0, 0, CREATE_METHOD_TABLE(JSOptionConstructor) }; 37 37 38 38 JSOptionConstructor::JSOptionConstructor(Structure* structure, JSDOMGlobalObject* globalObject) -
trunk/Source/WebCore/bindings/js/JSWorkerContextBase.cpp
r95250 r95936 47 47 ASSERT_CLASS_FITS_IN_CELL(JSWorkerContextBase); 48 48 49 const ClassInfo JSWorkerContextBase::s_info = { "WorkerContext", &JSDOMGlobalObject::s_info, 0, 0 };49 const ClassInfo JSWorkerContextBase::s_info = { "WorkerContext", &JSDOMGlobalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSWorkerContextBase) }; 50 50 51 51 JSWorkerContextBase::JSWorkerContextBase(JSC::JSGlobalData& globalData, JSC::Structure* structure, PassRefPtr<WorkerContext> impl) -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r95849 r95936 1422 1422 push(@implContent, " return getHashTableForGlobalData(exec->globalData(), &${className}PrototypeTable);\n"); 1423 1423 push(@implContent, "}\n\n"); 1424 push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSNonFinalObject::s_info, 0, get${className}PrototypeTable };\n\n");1424 push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSNonFinalObject::s_info, 0, get${className}PrototypeTable, CREATE_METHOD_TABLE(${className}Prototype) };\n\n"); 1425 1425 } else { 1426 push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSNonFinalObject::s_info, &${className}PrototypeTable, 0 };\n\n");1426 push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSNonFinalObject::s_info, &${className}PrototypeTable, 0, CREATE_METHOD_TABLE(${className}Prototype) };\n\n"); 1427 1427 } 1428 1428 if ($interfaceName ne "DOMWindow" && !$dataNode->extendedAttributes->{"IsWorkerContext"}) { … … 1501 1501 push(@implContent, ", 0 "); 1502 1502 } 1503 push(@implContent, " };\n\n");1503 push(@implContent, ", CREATE_METHOD_TABLE($className) };\n\n"); 1504 1504 1505 1505 my $implType = $implClassName; … … 3180 3180 my $numberOfconstructParameters = $dataNode->extendedAttributes->{"ConstructorParameters"}; 3181 3181 3182 push(@$outputArray, "const ClassInfo ${constructorClassName}::s_info = { \"${visibleClassName}Constructor\", &DOMConstructorObject::s_info, &${constructorClassName}Table, 0 };\n\n");3182 push(@$outputArray, "const ClassInfo ${constructorClassName}::s_info = { \"${visibleClassName}Constructor\", &DOMConstructorObject::s_info, &${constructorClassName}Table, 0, CREATE_METHOD_TABLE($constructorClassName) };\n\n"); 3183 3183 3184 3184 push(@$outputArray, "${constructorClassName}::${constructorClassName}(Structure* structure, JSDOMGlobalObject* globalObject)\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r95901 r95936 100 100 }; 101 101 102 const ClassInfo JSTestInterfaceConstructor::s_info = { "TestInterfaceConstructor", &DOMConstructorObject::s_info, &JSTestInterfaceConstructorTable, 0 };102 const ClassInfo JSTestInterfaceConstructor::s_info = { "TestInterfaceConstructor", &DOMConstructorObject::s_info, &JSTestInterfaceConstructorTable, 0, CREATE_METHOD_TABLE(JSTestInterfaceConstructor) }; 103 103 104 104 JSTestInterfaceConstructor::JSTestInterfaceConstructor(Structure* structure, JSDOMGlobalObject* globalObject) … … 157 157 #undef THUNK_GENERATOR 158 158 static JSC_CONST_HASHTABLE HashTable JSTestInterfacePrototypeTable = { 1, 0, JSTestInterfacePrototypeTableValues, 0 }; 159 const ClassInfo JSTestInterfacePrototype::s_info = { "TestInterfacePrototype", &JSC::JSNonFinalObject::s_info, &JSTestInterfacePrototypeTable, 0 };159 const ClassInfo JSTestInterfacePrototype::s_info = { "TestInterfacePrototype", &JSC::JSNonFinalObject::s_info, &JSTestInterfacePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestInterfacePrototype) }; 160 160 161 161 JSObject* JSTestInterfacePrototype::self(ExecState* exec, JSGlobalObject* globalObject) … … 164 164 } 165 165 166 const ClassInfo JSTestInterface::s_info = { "TestInterface", &JSDOMWrapper::s_info, &JSTestInterfaceTable, 0 };166 const ClassInfo JSTestInterface::s_info = { "TestInterface", &JSDOMWrapper::s_info, &JSTestInterfaceTable, 0 , CREATE_METHOD_TABLE(JSTestInterface) }; 167 167 168 168 JSTestInterface::JSTestInterface(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestInterface> impl) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r95901 r95936 99 99 }; 100 100 101 const ClassInfo JSTestMediaQueryListListenerConstructor::s_info = { "TestMediaQueryListListenerConstructor", &DOMConstructorObject::s_info, &JSTestMediaQueryListListenerConstructorTable, 0 };101 const ClassInfo JSTestMediaQueryListListenerConstructor::s_info = { "TestMediaQueryListListenerConstructor", &DOMConstructorObject::s_info, &JSTestMediaQueryListListenerConstructorTable, 0, CREATE_METHOD_TABLE(JSTestMediaQueryListListenerConstructor) }; 102 102 103 103 JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor(Structure* structure, JSDOMGlobalObject* globalObject) … … 143 143 #undef THUNK_GENERATOR 144 144 static JSC_CONST_HASHTABLE HashTable JSTestMediaQueryListListenerPrototypeTable = { 2, 1, JSTestMediaQueryListListenerPrototypeTableValues, 0 }; 145 const ClassInfo JSTestMediaQueryListListenerPrototype::s_info = { "TestMediaQueryListListenerPrototype", &JSC::JSNonFinalObject::s_info, &JSTestMediaQueryListListenerPrototypeTable, 0 };145 const ClassInfo JSTestMediaQueryListListenerPrototype::s_info = { "TestMediaQueryListListenerPrototype", &JSC::JSNonFinalObject::s_info, &JSTestMediaQueryListListenerPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestMediaQueryListListenerPrototype) }; 146 146 147 147 JSObject* JSTestMediaQueryListListenerPrototype::self(ExecState* exec, JSGlobalObject* globalObject) … … 160 160 } 161 161 162 const ClassInfo JSTestMediaQueryListListener::s_info = { "TestMediaQueryListListener", &JSDOMWrapper::s_info, &JSTestMediaQueryListListenerTable, 0 };162 const ClassInfo JSTestMediaQueryListListener::s_info = { "TestMediaQueryListListener", &JSDOMWrapper::s_info, &JSTestMediaQueryListListenerTable, 0 , CREATE_METHOD_TABLE(JSTestMediaQueryListListener) }; 163 163 164 164 JSTestMediaQueryListListener::JSTestMediaQueryListListener(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestMediaQueryListListener> impl) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r95901 r95936 201 201 }; 202 202 203 const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", &DOMConstructorObject::s_info, &JSTestObjConstructorTable, 0 };203 const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", &DOMConstructorObject::s_info, &JSTestObjConstructorTable, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) }; 204 204 205 205 JSTestObjConstructor::JSTestObjConstructor(Structure* structure, JSDOMGlobalObject* globalObject) … … 300 300 #undef THUNK_GENERATOR 301 301 static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 137, 127, JSTestObjPrototypeTableValues, 0 }; 302 const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", &JSC::JSNonFinalObject::s_info, &JSTestObjPrototypeTable, 0 };302 const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", &JSC::JSNonFinalObject::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) }; 303 303 304 304 JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject) … … 317 317 } 318 318 319 const ClassInfo JSTestObj::s_info = { "TestObj", &JSDOMWrapper::s_info, &JSTestObjTable, 0 };319 const ClassInfo JSTestObj::s_info = { "TestObj", &JSDOMWrapper::s_info, &JSTestObjTable, 0 , CREATE_METHOD_TABLE(JSTestObj) }; 320 320 321 321 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r95901 r95936 100 100 }; 101 101 102 const ClassInfo JSTestSerializedScriptValueInterfaceConstructor::s_info = { "TestSerializedScriptValueInterfaceConstructor", &DOMConstructorObject::s_info, &JSTestSerializedScriptValueInterfaceConstructorTable, 0 };102 const ClassInfo JSTestSerializedScriptValueInterfaceConstructor::s_info = { "TestSerializedScriptValueInterfaceConstructor", &DOMConstructorObject::s_info, &JSTestSerializedScriptValueInterfaceConstructorTable, 0, CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterfaceConstructor) }; 103 103 104 104 JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor(Structure* structure, JSDOMGlobalObject* globalObject) … … 143 143 #undef THUNK_GENERATOR 144 144 static JSC_CONST_HASHTABLE HashTable JSTestSerializedScriptValueInterfacePrototypeTable = { 1, 0, JSTestSerializedScriptValueInterfacePrototypeTableValues, 0 }; 145 const ClassInfo JSTestSerializedScriptValueInterfacePrototype::s_info = { "TestSerializedScriptValueInterfacePrototype", &JSC::JSNonFinalObject::s_info, &JSTestSerializedScriptValueInterfacePrototypeTable, 0 };145 const ClassInfo JSTestSerializedScriptValueInterfacePrototype::s_info = { "TestSerializedScriptValueInterfacePrototype", &JSC::JSNonFinalObject::s_info, &JSTestSerializedScriptValueInterfacePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterfacePrototype) }; 146 146 147 147 JSObject* JSTestSerializedScriptValueInterfacePrototype::self(ExecState* exec, JSGlobalObject* globalObject) … … 150 150 } 151 151 152 const ClassInfo JSTestSerializedScriptValueInterface::s_info = { "TestSerializedScriptValueInterface", &JSDOMWrapper::s_info, &JSTestSerializedScriptValueInterfaceTable, 0 };152 const ClassInfo JSTestSerializedScriptValueInterface::s_info = { "TestSerializedScriptValueInterface", &JSDOMWrapper::s_info, &JSTestSerializedScriptValueInterfaceTable, 0 , CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterface) }; 153 153 154 154 JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl) -
trunk/Source/WebCore/bridge/c/CRuntimeObject.cpp
r95901 r95936 36 36 namespace Bindings { 37 37 38 const ClassInfo CRuntimeObject::s_info = { "CRuntimeObject", &RuntimeObject::s_info, 0, 0 };38 const ClassInfo CRuntimeObject::s_info = { "CRuntimeObject", &RuntimeObject::s_info, 0, 0, CREATE_METHOD_TABLE(CRuntimeObject) }; 39 39 40 40 CRuntimeObject::CRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<CInstance> instance) -
trunk/Source/WebCore/bridge/c/c_instance.cpp
r95250 r95936 145 145 }; 146 146 147 const ClassInfo CRuntimeMethod::s_info = { "CRuntimeMethod", &RuntimeMethod::s_info, 0, 0 };147 const ClassInfo CRuntimeMethod::s_info = { "CRuntimeMethod", &RuntimeMethod::s_info, 0, 0, CREATE_METHOD_TABLE(CRuntimeMethod) }; 148 148 149 149 JSValue CInstance::getMethod(ExecState* exec, const Identifier& propertyName) -
trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
r95250 r95936 149 149 }; 150 150 151 const ClassInfo JavaRuntimeMethod::s_info = { "JavaRuntimeMethod", &RuntimeMethod::s_info, 0, 0 };151 const ClassInfo JavaRuntimeMethod::s_info = { "JavaRuntimeMethod", &RuntimeMethod::s_info, 0, 0, CREATE_METHOD_TABLE(JavaRuntimeMethod) }; 152 152 153 153 JSValue JavaInstance::getMethod(ExecState* exec, const Identifier& propertyName) -
trunk/Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.cpp
r95901 r95936 34 34 namespace Bindings { 35 35 36 const ClassInfo JavaRuntimeObject::s_info = { "JavaRuntimeObject", &RuntimeObject::s_info, 0, 0 };36 const ClassInfo JavaRuntimeObject::s_info = { "JavaRuntimeObject", &RuntimeObject::s_info, 0, 0, CREATE_METHOD_TABLE(JavaRuntimeObject) }; 37 37 38 38 JavaRuntimeObject::JavaRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<JavaInstance> instance) -
trunk/Source/WebCore/bridge/objc/ObjCRuntimeObject.mm
r95901 r95936 34 34 namespace Bindings { 35 35 36 const ClassInfo ObjCRuntimeObject::s_info = { "ObjCRuntimeObject", &RuntimeObject::s_info, 0, 0 };36 const ClassInfo ObjCRuntimeObject::s_info = { "ObjCRuntimeObject", &RuntimeObject::s_info, 0, 0, CREATE_METHOD_TABLE(ObjCRuntimeObject) }; 37 37 38 38 ObjCRuntimeObject::ObjCRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<ObjcInstance> instance, Structure* structure) -
trunk/Source/WebCore/bridge/objc/objc_instance.mm
r95675 r95936 205 205 }; 206 206 207 const ClassInfo ObjCRuntimeMethod::s_info = { "ObjCRuntimeMethod", &RuntimeMethod::s_info, 0, 0 };207 const ClassInfo ObjCRuntimeMethod::s_info = { "ObjCRuntimeMethod", &RuntimeMethod::s_info, 0, 0, CREATE_METHOD_TABLE(ObjCRuntimeMethod) }; 208 208 209 209 JSValue ObjcInstance::getMethod(ExecState* exec, const Identifier& propertyName) -
trunk/Source/WebCore/bridge/objc/objc_runtime.mm
r95675 r95936 191 191 } 192 192 193 const ClassInfo ObjcFallbackObjectImp::s_info = { "ObjcFallbackObject", &JSNonFinalObject::s_info, 0, 0 };193 const ClassInfo ObjcFallbackObjectImp::s_info = { "ObjcFallbackObject", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ObjcFallbackObjectImp) }; 194 194 195 195 ObjcFallbackObjectImp::ObjcFallbackObjectImp(JSGlobalObject* globalObject, Structure* structure, ObjcInstance* i, const Identifier& propertyName) -
trunk/Source/WebCore/bridge/qt/qt_instance.cpp
r95849 r95936 89 89 }; 90 90 91 const ClassInfo QtRuntimeObject::s_info = { "QtRuntimeObject", &RuntimeObject::s_info, 0, 0 };91 const ClassInfo QtRuntimeObject::s_info = { "QtRuntimeObject", &RuntimeObject::s_info, 0, 0, CREATE_METHOD_TABLE(QtRuntimeObject) }; 92 92 93 93 QtRuntimeObject::QtRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance) -
trunk/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp
r95901 r95936 229 229 } 230 230 231 const ClassInfo QtPixmapRuntimeObject::s_info = { "QtPixmapRuntimeObject", &RuntimeObject::s_info, 0, 0 };231 const ClassInfo QtPixmapRuntimeObject::s_info = { "QtPixmapRuntimeObject", &RuntimeObject::s_info, 0, 0, CREATE_METHOD_TABLE(QtPixmapRuntimeObject) }; 232 232 233 233 QtPixmapClass::QtPixmapClass() -
trunk/Source/WebCore/bridge/qt/qt_runtime.cpp
r95849 r95936 1005 1005 #define QW_DS(Class,Instance) Class##Data* d = Instance->d_func() 1006 1006 1007 const ClassInfo QtRuntimeMethod::s_info = { "QtRuntimeMethod", &InternalFunction::s_info, 0, 0 };1007 const ClassInfo QtRuntimeMethod::s_info = { "QtRuntimeMethod", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(QtRuntimeMethod) }; 1008 1008 1009 1009 QtRuntimeMethod::QtRuntimeMethod(QtRuntimeMethodData* dd, ExecState* exec, Structure* structure, const Identifier& identifier) -
trunk/Source/WebCore/bridge/runtime_array.cpp
r94875 r95936 36 36 namespace JSC { 37 37 38 const ClassInfo RuntimeArray::s_info = { "RuntimeArray", &JSArray::s_info, 0, 0 };38 const ClassInfo RuntimeArray::s_info = { "RuntimeArray", &JSArray::s_info, 0, 0, CREATE_METHOD_TABLE(RuntimeArray) }; 39 39 40 40 RuntimeArray::RuntimeArray(ExecState* exec, Structure* structure) -
trunk/Source/WebCore/bridge/runtime_method.cpp
r95108 r95936 42 42 ASSERT_CLASS_FITS_IN_CELL(RuntimeMethod); 43 43 44 const ClassInfo RuntimeMethod::s_info = { "RuntimeMethod", &InternalFunction::s_info, 0, 0 };44 const ClassInfo RuntimeMethod::s_info = { "RuntimeMethod", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(RuntimeMethod) }; 45 45 46 46 RuntimeMethod::RuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& m) -
trunk/Source/WebCore/bridge/runtime_object.cpp
r94875 r95936 36 36 namespace Bindings { 37 37 38 const ClassInfo RuntimeObject::s_info = { "RuntimeObject", &JSNonFinalObject::s_info, 0, 0 };38 const ClassInfo RuntimeObject::s_info = { "RuntimeObject", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(RuntimeObject) }; 39 39 40 40 RuntimeObject::RuntimeObject(ExecState*, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance) -
trunk/Source/WebKit/mac/ChangeLog
r95919 r95936 1 2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add custom vtable struct to ClassInfo struct 4 https://bugs.webkit.org/show_bug.cgi?id=68567 5 6 Reviewed by Oliver Hunt. 7 8 Added CREATE_METHOD_TABLE macro to generate the custom vtable for the 9 specified class in its ClassInfo. Also added to it the first function to use 10 this macro, visitChildren. This is part of the process of getting rid of all 11 C++ virtual methods in JSCell. Eventually all virtual functions in JSCell 12 that can't easily be converted to non-virtual functions will be put into 13 this custom vtable structure. 14 15 * Plugins/Hosted/ProxyInstance.mm: 16 * Plugins/Hosted/ProxyRuntimeObject.mm: 17 1 18 2011-09-24 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
r95901 r95936 212 212 }; 213 213 214 const ClassInfo ProxyRuntimeMethod::s_info = { "ProxyRuntimeMethod", &RuntimeMethod::s_info, 0, 0 };214 const ClassInfo ProxyRuntimeMethod::s_info = { "ProxyRuntimeMethod", &RuntimeMethod::s_info, 0, 0, CREATE_METHOD_TABLE(ProxyRuntimeMethod) }; 215 215 216 216 JSValue ProxyInstance::getMethod(JSC::ExecState* exec, const JSC::Identifier& propertyName) -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm
r95901 r95936 35 35 36 36 37 const ClassInfo ProxyRuntimeObject::s_info = { "ProxyRuntimeObject", &RuntimeObject::s_info, 0, 0 };37 const ClassInfo ProxyRuntimeObject::s_info = { "ProxyRuntimeObject", &RuntimeObject::s_info, 0, 0, CREATE_METHOD_TABLE(ProxyRuntimeObject) }; 38 38 39 39 ProxyRuntimeObject::ProxyRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<ProxyInstance> instance) -
trunk/Source/WebKit2/ChangeLog
r95934 r95936 1 2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 Add custom vtable struct to ClassInfo struct 4 https://bugs.webkit.org/show_bug.cgi?id=68567 5 6 Reviewed by Oliver Hunt. 7 8 Added CREATE_METHOD_TABLE macro to generate the custom vtable for the 9 specified class in its ClassInfo. Also added to it the first function to use 10 this macro, visitChildren. This is part of the process of getting rid of all 11 C++ virtual methods in JSCell. Eventually all virtual functions in JSCell 12 that can't easily be converted to non-virtual functions will be put into 13 this custom vtable structure. 14 15 * WebProcess/Plugins/Netscape/JSNPMethod.cpp: 16 * WebProcess/Plugins/Netscape/JSNPObject.cpp: 17 1 18 2011-09-25 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp
r95901 r95936 40 40 namespace WebKit { 41 41 42 const ClassInfo JSNPMethod::s_info = { "NPMethod", &InternalFunction::s_info, 0, 0 };42 const ClassInfo JSNPMethod::s_info = { "NPMethod", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(JSNPMethod) }; 43 43 44 44 JSNPMethod::JSNPMethod(JSGlobalObject* globalObject, Structure* structure, NPIdentifier npIdentifier) -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
r95901 r95936 49 49 } 50 50 51 const ClassInfo JSNPObject::s_info = { "NPObject", &JSNonFinalObject::s_info, 0, 0 };51 const ClassInfo JSNPObject::s_info = { "NPObject", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSNPObject) }; 52 52 53 53 JSNPObject::JSNPObject(JSGlobalObject* globalObject, Structure* structure, NPRuntimeObjectMap* objectMap, NPObject* npObject)
Note: See TracChangeset
for help on using the changeset viewer.