Commit 3e084662 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Add custom vtable struct to ClassInfo struct

https://bugs.webkit.org/show_bug.cgi?id=68567

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Declared/defined the MethodTable struct and added it to the ClassInfo struct.
Also defined the CREATE_METHOD_TABLE macro to generate these method tables
succinctly where they need to be defined.

Also added to it the first function to use this macro, visitChildren.

This is part of the process of getting rid of all C++ virtual methods in JSCell.
Eventually all virtual functions in JSCell that can't easily be converted to
non-virtual functions will be put into this custom vtable structure.
* runtime/ClassInfo.h:

Added the CREATE_METHOD_TABLE macro call as the last argument to each of the
ClassInfo structs declared in these classes.  This saves us from having to visit
each s_info definition in the future when we add more methods to the MethodTable.
* API/JSCallbackConstructor.cpp:
* API/JSCallbackFunction.cpp:
* API/JSCallbackObject.cpp:
* JavaScriptCore.exp:
* runtime/Arguments.cpp:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/BooleanObject.cpp:
* runtime/BooleanPrototype.cpp:
* runtime/DateConstructor.cpp:
* runtime/DateInstance.cpp:
* runtime/DatePrototype.cpp:
* runtime/ErrorInstance.cpp:
* runtime/ErrorPrototype.cpp:
* runtime/ExceptionHelpers.cpp:
* runtime/Executable.cpp:
* runtime/GetterSetter.cpp:
* runtime/InternalFunction.cpp:
* runtime/JSAPIValueWrapper.cpp:
* runtime/JSActivation.cpp:
* runtime/JSArray.cpp:
* runtime/JSByteArray.cpp:
* runtime/JSFunction.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSONObject.cpp:
* runtime/JSObject.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSString.cpp:
* runtime/MathObject.cpp:
* runtime/NativeErrorConstructor.cpp:
* runtime/NumberConstructor.cpp:
* runtime/NumberObject.cpp:
* runtime/NumberPrototype.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectPrototype.cpp:
* runtime/RegExp.cpp:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpObject.cpp:
* runtime/RegExpPrototype.cpp:
* runtime/ScopeChain.cpp:
* runtime/StringConstructor.cpp:
* runtime/StringObject.cpp:
* runtime/StringPrototype.cpp:
* runtime/Structure.cpp:
* runtime/StructureChain.cpp:

Had to make visitChildren and visitChildrenVirtual protected instead of private
because some of the subclasses of JSWrapperObject need access to JSWrapperObject's
visitChildren function pointer in their vtable since they don't provide their own
implementation. Same for RegExpObject.
* runtime/JSWrapperObject.h:
* runtime/RegExpObject.h:

Source/JavaScriptGlue:

Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
specified class in its ClassInfo.  Also added to it the first function to use
this macro, visitChildren.  This is part of the process of getting rid of all
C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
that can't easily be converted to non-virtual functions will be put into
this custom vtable structure.

* UserObjectImp.cpp:

Source/WebCore:

No new tests.

Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
specified class in its ClassInfo.  Also added to it the first function to use
this macro, visitChildren.  This is part of the process of getting rid of all
C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
that can't easily be converted to non-virtual functions will be put into
this custom vtable structure.

* bindings/js/JSAudioConstructor.cpp:
* bindings/js/JSDOMGlobalObject.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSImageConstructor.cpp:
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSOptionConstructor.cpp:
* bindings/js/JSWorkerContextBase.cpp:

Changed the bindings generator to add the call to the CREATE_METHOD_TABLE macro where
necessary.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateConstructorDefinition):
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bridge/c/CRuntimeObject.cpp:
* bridge/c/c_instance.cpp:
* bridge/jni/jsc/JavaInstanceJSC.cpp:
* bridge/jni/jsc/JavaRuntimeObject.cpp:
* bridge/objc/ObjCRuntimeObject.mm:
* bridge/objc/objc_instance.mm:
* bridge/objc/objc_runtime.mm:
* bridge/qt/qt_instance.cpp:
* bridge/qt/qt_pixmapruntime.cpp:
* bridge/qt/qt_runtime.cpp:
* bridge/runtime_array.cpp:
* bridge/runtime_method.cpp:
* bridge/runtime_object.cpp:

Source/WebKit/mac:

Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
specified class in its ClassInfo.  Also added to it the first function to use
this macro, visitChildren.  This is part of the process of getting rid of all
C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
that can't easily be converted to non-virtual functions will be put into
this custom vtable structure.

* Plugins/Hosted/ProxyInstance.mm:
* Plugins/Hosted/ProxyRuntimeObject.mm:

Source/WebKit2:

Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
specified class in its ClassInfo.  Also added to it the first function to use
this macro, visitChildren.  This is part of the process of getting rid of all
C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
that can't easily be converted to non-virtual functions will be put into
this custom vtable structure.

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dd2555de
......@@ -36,7 +36,7 @@
namespace JSC {
const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSNonFinalObject::s_info, 0, 0 };
const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackConstructor) };
JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback)
: JSNonFinalObject(globalObject->globalData(), structure)
......
......@@ -40,7 +40,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction);
const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0 };
const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackFunction) };
JSCallbackFunction::JSCallbackFunction(JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback)
: InternalFunction(globalObject, globalObject->callbackFunctionStructure())
......
......@@ -36,8 +36,8 @@ ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSNonFinalObject>);
ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSGlobalObject>);
// Define the two types of JSCallbackObjects we support.
template <> const ClassInfo JSCallbackObject<JSNonFinalObject>::s_info = { "CallbackObject", &JSNonFinalObject::s_info, 0, 0 };
template <> const ClassInfo JSCallbackObject<JSGlobalObject>::s_info = { "CallbackGlobalObject", &JSGlobalObject::s_info, 0, 0 };
template <> const ClassInfo JSCallbackObject<JSNonFinalObject>::s_info = { "CallbackObject", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackObject) };
template <> const ClassInfo JSCallbackObject<JSGlobalObject>::s_info = { "CallbackGlobalObject", &JSGlobalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackObject) };
void JSCallbackObjectData::finalize(Handle<Unknown> handle, void* context)
{
......
2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com>
Add custom vtable struct to ClassInfo struct
https://bugs.webkit.org/show_bug.cgi?id=68567
Reviewed by Oliver Hunt.
Declared/defined the MethodTable struct and added it to the ClassInfo struct.
Also defined the CREATE_METHOD_TABLE macro to generate these method tables
succinctly where they need to be defined.
Also added to it the first function to use this macro, visitChildren.
This is part of the process of getting rid of all C++ virtual methods in JSCell.
Eventually all virtual functions in JSCell that can't easily be converted to
non-virtual functions will be put into this custom vtable structure.
* runtime/ClassInfo.h:
Added the CREATE_METHOD_TABLE macro call as the last argument to each of the
ClassInfo structs declared in these classes. This saves us from having to visit
each s_info definition in the future when we add more methods to the MethodTable.
* API/JSCallbackConstructor.cpp:
* API/JSCallbackFunction.cpp:
* API/JSCallbackObject.cpp:
* JavaScriptCore.exp:
* runtime/Arguments.cpp:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/BooleanObject.cpp:
* runtime/BooleanPrototype.cpp:
* runtime/DateConstructor.cpp:
* runtime/DateInstance.cpp:
* runtime/DatePrototype.cpp:
* runtime/ErrorInstance.cpp:
* runtime/ErrorPrototype.cpp:
* runtime/ExceptionHelpers.cpp:
* runtime/Executable.cpp:
* runtime/GetterSetter.cpp:
* runtime/InternalFunction.cpp:
* runtime/JSAPIValueWrapper.cpp:
* runtime/JSActivation.cpp:
* runtime/JSArray.cpp:
* runtime/JSByteArray.cpp:
* runtime/JSFunction.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSONObject.cpp:
* runtime/JSObject.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSString.cpp:
* runtime/MathObject.cpp:
* runtime/NativeErrorConstructor.cpp:
* runtime/NumberConstructor.cpp:
* runtime/NumberObject.cpp:
* runtime/NumberPrototype.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectPrototype.cpp:
* runtime/RegExp.cpp:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpObject.cpp:
* runtime/RegExpPrototype.cpp:
* runtime/ScopeChain.cpp:
* runtime/StringConstructor.cpp:
* runtime/StringObject.cpp:
* runtime/StringPrototype.cpp:
* runtime/Structure.cpp:
* runtime/StructureChain.cpp:
Had to make visitChildren and visitChildrenVirtual protected instead of private
because some of the subclasses of JSWrapperObject need access to JSWrapperObject's
visitChildren function pointer in their vtable since they don't provide their own
implementation. Same for RegExpObject.
* runtime/JSWrapperObject.h:
* runtime/RegExpObject.h:
2011-09-25 Adam Barth <abarth@webkit.org>
Finish removing PLATFORM(BREWMP) by removing associated code
......@@ -273,6 +273,7 @@ __ZN3JSC6JSLockC1EPNS_9ExecStateE
__ZN3JSC6RegExp5matchERNS_12JSGlobalDataERKNS_7UStringEiPN3WTF6VectorIiLm32EEE
__ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
__ZN3JSC6RegExpD1Ev
__ZN3JSC7JSArray13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
__ZN3JSC7JSArray15setSubclassDataEPv
......
......@@ -35,7 +35,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(Arguments);
const ClassInfo Arguments::s_info = { "Arguments", &JSNonFinalObject::s_info, 0, 0 };
const ClassInfo Arguments::s_info = { "Arguments", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(Arguments) };
Arguments::~Arguments()
{
......
......@@ -41,7 +41,7 @@ static EncodedJSValue JSC_HOST_CALL arrayConstructorIsArray(ExecState*);
namespace JSC {
const ClassInfo ArrayConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::arrayConstructorTable };
const ClassInfo ArrayConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::arrayConstructorTable, CREATE_METHOD_TABLE(ArrayConstructor) };
/* Source for ArrayConstructor.lut.h
@begin arrayConstructorTable
......
......@@ -85,7 +85,7 @@ static inline bool isNumericCompareFunction(ExecState* exec, CallType callType,
// ------------------------------ ArrayPrototype ----------------------------
const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecState::arrayPrototypeTable};
const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecState::arrayPrototypeTable, CREATE_METHOD_TABLE(ArrayPrototype)};
/* Source for ArrayPrototype.lut.h
@begin arrayPrototypeTable 16
......
......@@ -25,7 +25,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(BooleanObject);
const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0, 0 };
const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(BooleanObject) };
BooleanObject::BooleanObject(JSGlobalData& globalData, Structure* structure)
: JSWrapperObject(globalData, structure)
......
......@@ -38,7 +38,7 @@ static EncodedJSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState*);
namespace JSC {
const ClassInfo BooleanPrototype::s_info = { "Boolean", &BooleanObject::s_info, 0, ExecState::booleanPrototypeTable };
const ClassInfo BooleanPrototype::s_info = { "Boolean", &BooleanObject::s_info, 0, ExecState::booleanPrototypeTable, CREATE_METHOD_TABLE(BooleanPrototype) };
/* Source for BooleanPrototype.lut.h
@begin booleanPrototypeTable
......
......@@ -30,6 +30,15 @@ namespace JSC {
class HashEntry;
struct HashTable;
struct MethodTable {
typedef void (*VisitChildrenFunctionPtr)(JSCell*, SlotVisitor&);
VisitChildrenFunctionPtr visitChildrenFunctionPtr;
};
#define CREATE_METHOD_TABLE(ClassName) { \
&ClassName::visitChildren \
}
struct ClassInfo {
/**
* A string denoting the class name. Example: "Window".
......@@ -64,6 +73,8 @@ namespace JSC {
const HashTable* staticPropHashTable;
typedef const HashTable* (*ClassPropHashTableGetterFunction)(ExecState*);
const ClassPropHashTableGetterFunction classPropHashTableGetterFunction;
MethodTable methodTable;
};
} // namespace JSC
......
......@@ -61,7 +61,7 @@ static EncodedJSValue JSC_HOST_CALL dateUTC(ExecState*);
namespace JSC {
const ClassInfo DateConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::dateConstructorTable };
const ClassInfo DateConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::dateConstructorTable, CREATE_METHOD_TABLE(DateConstructor) };
/* Source for DateConstructor.lut.h
@begin dateConstructorTable
......
......@@ -32,7 +32,7 @@ using namespace WTF;
namespace JSC {
const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0};
const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(DateInstance)};
DateInstance::DateInstance(ExecState* exec, Structure* structure)
: JSWrapperObject(exec->globalData(), structure)
......
......@@ -375,7 +375,7 @@ static bool fillStructuresUsingDateArgs(ExecState *exec, int maxArgs, double *ms
return ok;
}
const ClassInfo DatePrototype::s_info = {"Date", &DateInstance::s_info, 0, ExecState::dateTable};
const ClassInfo DatePrototype::s_info = {"Date", &DateInstance::s_info, 0, ExecState::dateTable, CREATE_METHOD_TABLE(DatePrototype)};
/* Source for DatePrototype.lut.h
@begin dateTable
......
......@@ -23,7 +23,7 @@
namespace JSC {
const ClassInfo ErrorInstance::s_info = { "Error", &JSNonFinalObject::s_info, 0, 0 };
const ClassInfo ErrorInstance::s_info = { "Error", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ErrorInstance) };
ErrorInstance::ErrorInstance(JSGlobalData& globalData, Structure* structure)
: JSNonFinalObject(globalData, structure)
......
......@@ -40,7 +40,7 @@ static EncodedJSValue JSC_HOST_CALL errorProtoFuncToString(ExecState*);
namespace JSC {
const ClassInfo ErrorPrototype::s_info = { "Error", &ErrorInstance::s_info, 0, ExecState::errorPrototypeTable };
const ClassInfo ErrorPrototype::s_info = { "Error", &ErrorInstance::s_info, 0, ExecState::errorPrototypeTable, CREATE_METHOD_TABLE(ErrorPrototype) };
/* Source for ErrorPrototype.lut.h
@begin errorPrototypeTable
......
......@@ -41,7 +41,7 @@
namespace JSC {
const ClassInfo InterruptedExecutionError::s_info = { "InterruptedExecutionError", &Base::s_info, 0, 0 };
const ClassInfo InterruptedExecutionError::s_info = { "InterruptedExecutionError", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(InterruptedExecutionError) };
UString InterruptedExecutionError::toString(ExecState*) const
{
......@@ -64,7 +64,7 @@ bool isInterruptedExecutionException(JSValue value)
}
const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", &Base::s_info, 0, 0 };
const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(TerminatedExecutionError) };
UString TerminatedExecutionError::toString(ExecState*) const
{
......
......@@ -36,7 +36,7 @@
namespace JSC {
const ClassInfo ExecutableBase::s_info = { "Executable", 0, 0, 0 };
const ClassInfo ExecutableBase::s_info = { "Executable", 0, 0, 0, CREATE_METHOD_TABLE(ExecutableBase) };
void ExecutableBase::clearCode()
{
......@@ -71,7 +71,7 @@ WeakHandleOwner* ExecutableBase::executableFinalizer()
return &finalizer;
}
const ClassInfo NativeExecutable::s_info = { "NativeExecutable", &ExecutableBase::s_info, 0, 0 };
const ClassInfo NativeExecutable::s_info = { "NativeExecutable", &ExecutableBase::s_info, 0, 0, CREATE_METHOD_TABLE(NativeExecutable) };
NativeExecutable::~NativeExecutable()
{
......@@ -98,9 +98,9 @@ static void jettisonCodeBlock(JSGlobalData& globalData, OwnPtr<T>& codeBlock)
}
#endif
const ClassInfo ScriptExecutable::s_info = { "ScriptExecutable", &ExecutableBase::s_info, 0, 0 };
const ClassInfo ScriptExecutable::s_info = { "ScriptExecutable", &ExecutableBase::s_info, 0, 0, CREATE_METHOD_TABLE(ScriptExecutable) };
const ClassInfo EvalExecutable::s_info = { "EvalExecutable", &ScriptExecutable::s_info, 0, 0 };
const ClassInfo EvalExecutable::s_info = { "EvalExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(EvalExecutable) };
EvalExecutable::EvalExecutable(ExecState* exec, const SourceCode& source, bool inStrictContext)
: ScriptExecutable(exec->globalData().evalExecutableStructure.get(), exec, source, inStrictContext)
......@@ -111,7 +111,7 @@ EvalExecutable::~EvalExecutable()
{
}
const ClassInfo ProgramExecutable::s_info = { "ProgramExecutable", &ScriptExecutable::s_info, 0, 0 };
const ClassInfo ProgramExecutable::s_info = { "ProgramExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(ProgramExecutable) };
ProgramExecutable::ProgramExecutable(ExecState* exec, const SourceCode& source)
: ScriptExecutable(exec->globalData().programExecutableStructure.get(), exec, source, false)
......@@ -122,7 +122,7 @@ ProgramExecutable::~ProgramExecutable()
{
}
const ClassInfo FunctionExecutable::s_info = { "FunctionExecutable", &ScriptExecutable::s_info, 0, 0 };
const ClassInfo FunctionExecutable::s_info = { "FunctionExecutable", &ScriptExecutable::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionExecutable) };
FunctionExecutable::FunctionExecutable(JSGlobalData& globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool inStrictContext)
: ScriptExecutable(globalData.functionExecutableStructure.get(), globalData, source, inStrictContext)
......
......@@ -28,7 +28,7 @@
namespace JSC {
const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0 };
const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(GetterSetter) };
void GetterSetter::visitChildrenVirtual(SlotVisitor& visitor)
{
......
......@@ -34,7 +34,7 @@ void InternalFunction::vtableAnchor() {}
ASSERT_CLASS_FITS_IN_CELL(InternalFunction);
const ClassInfo InternalFunction::s_info = { "Function", &JSNonFinalObject::s_info, 0, 0 };
const ClassInfo InternalFunction::s_info = { "Function", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(InternalFunction) };
InternalFunction::InternalFunction(VPtrStealingHackType)
: JSNonFinalObject(VPtrStealingHack)
......
......@@ -28,6 +28,6 @@
namespace JSC {
const ClassInfo JSAPIValueWrapper::s_info = { "API Wrapper", 0, 0, 0 };
const ClassInfo JSAPIValueWrapper::s_info = { "API Wrapper", 0, 0, 0, CREATE_METHOD_TABLE(JSAPIValueWrapper) };
} // namespace JSC
......@@ -37,7 +37,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(JSActivation);
const ClassInfo JSActivation::s_info = { "JSActivation", &Base::s_info, 0, 0 };
const ClassInfo JSActivation::s_info = { "JSActivation", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSActivation) };
JSActivation::JSActivation(CallFrame* callFrame, FunctionExecutable* functionExecutable)
: Base(callFrame->globalData(), callFrame->globalData().activationStructure.get(), functionExecutable->symbolTable(), callFrame->registers())
......
......@@ -92,7 +92,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSArray);
// as long as it is 1/8 full. If more sparse than that, we use a map.
static const unsigned minDensityMultiplier = 8;
const ClassInfo JSArray::s_info = {"Array", &JSNonFinalObject::s_info, 0, 0};
const ClassInfo JSArray::s_info = {"Array", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSArray)};
// We keep track of the size of the last array after it was grown. We use this
// as a simple heuristic for as the value to grow the next array from size 0.
......
......@@ -33,7 +33,7 @@ using namespace WTF;
namespace JSC {
const ClassInfo JSByteArray::s_defaultInfo = { "ByteArray", &Base::s_info, 0, 0 };
const ClassInfo JSByteArray::s_defaultInfo = { "ByteArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
JSByteArray::JSByteArray(ExecState* exec, Structure* structure, ByteArray* storage)
: JSNonFinalObject(exec->globalData(), structure)
......
......@@ -50,7 +50,7 @@ EncodedJSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState* exec)
ASSERT_CLASS_FITS_IN_CELL(JSFunction);
const ClassInfo JSFunction::s_info = { "Function", &Base::s_info, 0, 0 };
const ClassInfo JSFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSFunction) };
bool JSFunction::isHostFunctionNonInline() const
{
......
......@@ -74,7 +74,7 @@
namespace JSC {
const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &JSVariableObject::s_info, 0, ExecState::globalObjectTable };
const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &JSVariableObject::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };
/* Source for JSGlobalObject.lut.h
@begin globalObjectTable
......
......@@ -588,7 +588,7 @@ bool Stringifier::Holder::appendNextProperty(Stringifier& stringifier, UStringBu
// ------------------------------ JSONObject --------------------------------
const ClassInfo JSONObject::s_info = { "JSON", &JSNonFinalObject::s_info, 0, ExecState::jsonTable };
const ClassInfo JSONObject::s_info = { "JSON", &JSNonFinalObject::s_info, 0, ExecState::jsonTable, CREATE_METHOD_TABLE(JSONObject) };
/* Source for JSONObject.lut.h
@begin jsonTable
......
......@@ -47,7 +47,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSFinalObject);
const char* StrictModeReadonlyPropertyWriteError = "Attempted to assign to readonly property.";
const ClassInfo JSObject::s_info = { "Object", 0, 0, 0 };
const ClassInfo JSObject::s_info = { "Object", 0, 0, 0, CREATE_METHOD_TABLE(JSObject) };
static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode)
{
......
......@@ -35,7 +35,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(JSPropertyNameIterator);
const ClassInfo JSPropertyNameIterator::s_info = { "JSPropertyNameIterator", 0, 0, 0 };
const ClassInfo JSPropertyNameIterator::s_info = { "JSPropertyNameIterator", 0, 0, 0, CREATE_METHOD_TABLE(JSPropertyNameIterator) };
inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlots)
: JSCell(exec->globalData(), exec->globalData().propertyNameIteratorStructure.get())
......
......@@ -34,7 +34,7 @@ namespace JSC {
static const unsigned substringFromRopeCutoff = 4;
const ClassInfo JSString::s_info = { "string", 0, 0, 0 };
const ClassInfo JSString::s_info = { "string", 0, 0, 0, CREATE_METHOD_TABLE(JSString) };
void JSString::resolveRope(ExecState* exec) const
{
......
......@@ -44,10 +44,10 @@ namespace JSC {
explicit JSWrapperObject(JSGlobalData&, Structure*);
static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags;
private:
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
private:
WriteBarrier<Unknown> m_internalValue;
};
......
......@@ -59,7 +59,7 @@ static EncodedJSValue JSC_HOST_CALL mathProtoFuncTan(ExecState*);
namespace JSC {
const ClassInfo MathObject::s_info = { "Math", &JSNonFinalObject::s_info, 0, ExecState::mathTable };
const ClassInfo MathObject::s_info = { "Math", &JSNonFinalObject::s_info, 0, ExecState::mathTable, CREATE_METHOD_TABLE(MathObject) };
/* Source for MathObject.lut.h
@begin mathTable
......
......@@ -30,7 +30,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(NativeErrorConstructor);
const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0 };
const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(NativeErrorConstructor) };
NativeErrorConstructor::NativeErrorConstructor(JSGlobalObject* globalObject, Structure* structure)
: InternalFunction(globalObject, structure)
......
......@@ -42,7 +42,7 @@ static JSValue numberConstructorMinValue(ExecState*, JSValue, const Identifier&)
namespace JSC {
const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::numberConstructorTable };
const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::numberConstructorTable, CREATE_METHOD_TABLE(NumberConstructor) };
/* Source for NumberConstructor.lut.h
@begin numberConstructorTable
......
......@@ -29,7 +29,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(NumberObject);
const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0 };
const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(NumberObject) };
NumberObject::NumberObject(JSGlobalData& globalData, Structure* structure)
: JSWrapperObject(globalData, structure)
......
......@@ -55,7 +55,7 @@ static EncodedJSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState*);
namespace JSC {
const ClassInfo NumberPrototype::s_info = { "Number", &NumberObject::s_info, 0, ExecState::numberPrototypeTable };
const ClassInfo NumberPrototype::s_info = { "Number", &NumberObject::s_info, 0, ExecState::numberPrototypeTable, CREATE_METHOD_TABLE(NumberPrototype) };
/* Source for NumberPrototype.lut.h
@begin numberPrototypeTable
......
......@@ -55,7 +55,7 @@ static EncodedJSValue JSC_HOST_CALL objectConstructorIsExtensible(ExecState*);
namespace JSC {
const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::objectConstructorTable };
const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::objectConstructorTable, CREATE_METHOD_TABLE(ObjectConstructor) };
/* Source for ObjectConstructor.lut.h
@begin objectConstructorTable
......
......@@ -44,7 +44,7 @@ static EncodedJSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState*);
namespace JSC {
const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, ExecState::objectPrototypeTable };
const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, ExecState::objectPrototypeTable, CREATE_METHOD_TABLE(ObjectPrototype) };
/* Source for ObjectPrototype.lut.h
@begin objectPrototypeTable
......
......@@ -38,7 +38,7 @@
namespace JSC {
const ClassInfo RegExp::s_info = { "RegExp", 0, 0, 0 };
const ClassInfo RegExp::s_info = { "RegExp", 0, 0, 0, CREATE_METHOD_TABLE(RegExp) };
RegExpFlags regExpFlags(const UString& string)
{
......
......@@ -67,7 +67,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(RegExpConstructor);
const ClassInfo RegExpConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::regExpConstructorTable };
const ClassInfo RegExpConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::regExpConstructorTable, CREATE_METHOD_TABLE(RegExpConstructor) };
/* Source for RegExpConstructor.lut.h
@begin regExpConstructorTable
......
......@@ -50,7 +50,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(RegExpObject);
const ClassInfo RegExpObject::s_info = { "RegExp", &JSNonFinalObject::s_info, 0, ExecState::regExpTable };
const ClassInfo RegExpObject::s_info = { "RegExp", &JSNonFinalObject::s_info, 0, ExecState::regExpTable, CREATE_METHOD_TABLE(RegExpObject) };
/* Source for RegExpObject.lut.h
@begin regExpTable
......
......@@ -81,10 +81,10 @@ namespace JSC {
void finishCreation(JSGlobalObject*);
static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | Base::StructureFlags;
private:
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
private:
bool match(ExecState*);
struct RegExpObjectData {
......
......@@ -49,7 +49,7 @@ static EncodedJSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState*);
namespace JSC {
const ClassInfo RegExpPrototype::s_info = { "RegExp", &RegExpObject::s_info, 0, ExecState::regExpPrototypeTable };
const ClassInfo RegExpPrototype::s_info = { "RegExp", &RegExpObject::s_info, 0, ExecState::regExpPrototypeTable, CREATE_METHOD_TABLE(RegExpPrototype) };
/* Source for RegExpPrototype.lut.h
@begin regExpPrototypeTable
......
......@@ -51,7 +51,7 @@ void ScopeChainNode::print()
#endif
const ClassInfo ScopeChainNode::s_info = { "ScopeChainNode", 0, 0, 0 };
const ClassInfo ScopeChainNode::s_info = { "ScopeChainNode", 0, 0, 0, CREATE_METHOD_TABLE(ScopeChainNode) };
int ScopeChainNode::localDepth()
{
......
......@@ -37,7 +37,7 @@ static EncodedJSValue JSC_HOST_CALL stringFromCharCode(ExecState*);
namespace JSC {
const ClassInfo StringConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::stringConstructorTable };
const ClassInfo StringConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::stringConstructorTable, CREATE_METHOD_TABLE(StringConstructor) };
/* Source for StringConstructor.lut.h
@begin stringConstructorTable
......
......@@ -27,7 +27,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(StringObject);
const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0 };
const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(StringObject) };
StringObject::StringObject(JSGlobalData& globalData, Structure* structure)
: JSWrapperObject(globalData, structure)
......
......@@ -85,7 +85,7 @@ static EncodedJSValue JSC_HOST_CALL stringProtoFuncTrimRight(ExecState*);
namespace JSC {
const ClassInfo StringPrototype::s_info = { "String", &StringObject::s_info, 0, ExecState::stringTable };
const ClassInfo StringPrototype::s_info = { "String", &StringObject::s_info, 0, ExecState::stringTable, CREATE_METHOD_TABLE(StringPrototype) };
/* Source for StringPrototype.lut.h
@begin stringTable 26
......
......@@ -175,7 +175,7 @@ Structure::Structure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSV
{
}
const ClassInfo Structure::s_info = { "Structure", 0, 0, 0 };
const ClassInfo Structure::s_info = { "Structure", 0, 0, 0, CREATE_METHOD_TABLE(Structure) };
Structure::Structure(JSGlobalData& globalData)
: JSCell(CreatingEarlyCell)
......
......@@ -32,7 +32,7 @@
namespace JSC {
ClassInfo StructureChain::s_info = { "StructureChain", 0, 0, 0 };
ClassInfo StructureChain::s_info = { "StructureChain", 0, 0, 0, CREATE_METHOD_TABLE(StructureChain) };
StructureChain::StructureChain(JSGlobalData& globalData, Structure* structure)
: JSCell(globalData, structure)
......