Bug 70960 - De-virtualize JSObject
Summary: De-virtualize JSObject
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on: 70968 70986 71034 71134 71146 71303 71304 71305 71306 71307 71428 71429 71430 71523 71716
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-26 13:16 PDT by Mark Hahnenberg
Modified: 2011-11-09 14:28 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2011-10-26 13:16:38 PDT
In order to eliminate the vtable pointer in most (if not all) of the JSObjects in the runtime we first need to eliminate those virtual methods rooted in JSObject.  This will be the tracking bug for this effort.  As of now, the functions that require de-virtualizing in JSObject are:

virtual UString className() const;
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putWithAttributes(JSGlobalData*, const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot);
virtual void putWithAttributes(JSGlobalData*, const Identifier& propertyName, JSValue value, unsigned attributes);
virtual void putWithAttributes(JSGlobalData*, unsigned propertyName, JSValue value, unsigned attributes);
virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot);
virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes);
virtual void putWithAttributes(ExecState*, unsigned propertyName, JSValue value, unsigned attributes);
virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const;
virtual bool hasInstance(ExecState*, JSValue, JSValue prototypeProperty);
virtual void getPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual JSObject* unwrappedObject();
virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes = 0);
virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes = 0);
virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName);
virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName);
virtual bool defineOwnProperty(ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
virtual bool isGlobalObject() const;
virtual bool isVariableObject() const;
virtual bool isActivationObject() const;
virtual bool isErrorInstance() const;
Comment 1 Mark Hahnenberg 2011-11-09 14:28:52 PST
All of the virtual functions in JSObject except for the artificial vtableAnchor have been removed.  Closing bug.