Changeset 59055 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
May 9, 2010, 4:18:25 AM (15 years ago)
Author:
[email protected]
Message:

2010-05-09 Maciej Stachowiak <[email protected]>

Fixed version of: "Optimized o[s] where o is a cell and s is a string"
https://bugs.webkit.org/show_bug.cgi?id=38815


Fixed the previous patch for this from Geoff Garen.


The two problems were a missing exception check and a PropertySlot
initialized improperly, leading to crashes and failures in the case
of getters accessed with bracket syntax.

Previous patch:

Optimized o[s] where o is a cell and s is a string, removing some old
code that wasn't really tuned for the JIT.


SunSpider says 0.8% faster.

  • jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
  • runtime/JSCell.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSCell.h

    r58995 r59055  
    112112        void setVPtr(void* vptr) { *reinterpret_cast<void**>(this) = vptr; }
    113113
     114        // FIXME: Rename getOwnPropertySlot to virtualGetOwnPropertySlot, and
     115        // fastGetOwnPropertySlot to getOwnPropertySlot. Callers should always
     116        // call this function, not its slower virtual counterpart. (For integer
     117        // property names, we want a similar interface with appropriate optimizations.)
     118        bool fastGetOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
     119
    114120    protected:
    115121        static const unsigned AnonymousSlotCount = 0;
     
    117123    private:
    118124        // Base implementation; for non-object classes implements getPropertySlot.
    119         bool fastGetOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
    120125        virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
    121126        virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
Note: See TracChangeset for help on using the changeset viewer.