Changeset 94930 in webkit


Ignore:
Timestamp:
Sep 11, 2011 2:45:40 PM (13 years ago)
Author:
weinig@apple.com
Message:

De-virtualize JSCell::isGetterSetter, type information is available for it
https://bugs.webkit.org/show_bug.cgi?id=67902

Reviewed by Dan Bernstein.

  • runtime/GetterSetter.cpp:
  • runtime/GetterSetter.h:

Remove override of isGetterSetter.

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

De-virtualize and remove silly base implementation.

  • runtime/Structure.h:

(JSC::JSCell::isGetterSetter):
Use type info to determine getter-setter-hood.

Location:
trunk/Source/JavaScriptCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r94929 r94930  
     12011-09-10  Sam Weinig  <sam@webkit.org>
     2
     3        De-virtualize JSCell::isGetterSetter, type information is available for it
     4        https://bugs.webkit.org/show_bug.cgi?id=67902
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * runtime/GetterSetter.cpp:
     9        * runtime/GetterSetter.h:
     10        Remove override of isGetterSetter.
     11
     12        * runtime/JSCell.cpp:
     13        * runtime/JSCell.h:
     14        De-virtualize and remove silly base implementation.
     15
     16        * runtime/Structure.h:
     17        (JSC::JSCell::isGetterSetter):
     18        Use type info to determine getter-setter-hood.
     19
    1202011-09-09  Oliver Hunt  <oliver@apple.com>
    221
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r94929 r94930  
    559559__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
    560560__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
    561 __ZNK3JSC6JSCell14isGetterSetterEv
    562561__ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE
    563562__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def

    r94929 r94930  
    237237    ?isDataDescriptor@PropertyDescriptor@JSC@@QBE_NXZ
    238238    ?isDynamicScope@JSGlobalObject@JSC@@UBE_NAA_N@Z
    239     ?isGetterSetter@JSCell@JSC@@UBE_NXZ
    240239    ?isHostFunctionNonInline@JSFunction@JSC@@ABE_NXZ
    241240    ?isMainThread@WTF@@YA_NXZ
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp

    r86499 r94930  
    4343}
    4444
    45 bool GetterSetter::isGetterSetter() const
    46 {
    47     return true;
    48 }
    49 
    5045} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.h

    r94929 r94930  
    6868
    6969    private:
    70         virtual bool isGetterSetter() const;
    71 
    7270        WriteBarrier<JSObject> m_getter;
    7371        WriteBarrier<JSObject> m_setter; 
  • trunk/Source/JavaScriptCore/runtime/JSCell.cpp

    r94919 r94930  
    118118}
    119119
    120 bool JSCell::isGetterSetter() const
    121 {
    122     return false;
    123 }
    124 
    125120JSValue JSCell::toPrimitive(ExecState*, PreferredPrimitiveType) const
    126121{
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r94929 r94930  
    8888        bool isString() const;
    8989        bool isObject() const;
    90         virtual bool isGetterSetter() const;
     90        bool isGetterSetter() const;
    9191        bool inherits(const ClassInfo*) const;
    9292        virtual bool isAPIValueWrapper() const { return false; }
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r94929 r94930  
    313313    }
    314314
     315    inline bool JSCell::isGetterSetter() const
     316    {
     317        return m_structure->typeInfo().type() == GetterSetterType;
     318    }
     319
    315320    inline const ClassInfo* JSCell::classInfo() const
    316321    {
Note: See TracChangeset for help on using the changeset viewer.