Ignore:
Timestamp:
Nov 9, 2011, 2:18:04 AM (14 years ago)
Author:
[email protected]
Message:

De-virtualize JSObject::defineOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=71429

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Added defineOwnProperty to the MethodTable, changed all the virtual
implementations of defineOwnProperty to static ones, and replaced
all call sites with corresponding lookups in the MethodTable.

(JSC::Arguments::createStrictModeCallerIfNecessary):
(JSC::Arguments::createStrictModeCalleeIfNecessary):

  • runtime/ClassInfo.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::defineOwnProperty):

  • runtime/JSCell.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::defineOwnProperty):

  • runtime/JSObject.h:
  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorDefineProperty):
(JSC::defineProperties):

Source/WebCore:

No new tests.

Added defineOwnProperty to the MethodTable, changed all the virtual
implementations of defineOwnProperty to static ones, and replaced
all call sites with corresponding lookups in the MethodTable.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::defineOwnProperty):

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::defineOwnProperty):

  • bindings/js/JSDOMWindowShell.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r99497 r99675  
    186186        JSValue lookupGetter(ExecState*, const Identifier& propertyName);
    187187        JSValue lookupSetter(ExecState*, const Identifier& propertyName);
    188         virtual bool defineOwnProperty(ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
     188        static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
    189189
    190190        bool isGlobalObject() const;
Note: See TracChangeset for help on using the changeset viewer.