In order to maintain more control over exactly how JS objects are laid out, we need to remove the C++ virtual functions from JS object implementations due to the freedom that C++ compilers are given with how they lay out objects with vtable pointers. We can also save a little bit of memory due to the lack of vtable pointer in each object. The methods in JSCell that either need to be made non-virtual or removed are the following: isGetterSetter isAPIValueWrapper isPropertyNameIterator getCallData getConstructData getUInt32 toPrimitive getPrimitive toBoolean toNumber toString toObject visitChildren put(ExecState*, const Identifier&, JSValue, PutPropertySlot&) put(ExecState*, unsigned, JSValue) deleteProperty(ExecState*, const Identifier&) deleteProperty(ExecState*, unsigned) toThisObject getJSNumber getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&) getOwnPropertySlot(ExecState*, unsigned, PropertySlot&) Destructors will be taken care of by Oliver :-) There will be a patch for each function, roughly. This will serve as the tracking bug for this task.
Sam helped me out a little bit and de-virtualized isGetterSetter, isAPIValueWrapper, and killed isPropertyNameIterator :-)
Except the virtual destructor, which will remain for a while longer until we get around to replacing virtual destructors with finalizers, there are no longer any virtual functions in JSCell. Closing this bug.