Changeset 52178 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Dec 15, 2009, 3:33:40 PM (15 years ago)
Author:
[email protected]
Message:

Inlined JSCell's operator new.

Reviewed by Beth Dakin.

3.7% speedup on bench-allocate-nonretained.js.

(JSC::JSCell::operator new):

Location:
trunk/JavaScriptCore/runtime
Files:
2 edited

Legend:

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

    r51801 r52178  
    7777#endif // !(defined NAN && defined INFINITY)
    7878
    79 void* JSCell::operator new(size_t size, ExecState* exec)
    80 {
    81     return exec->heap()->allocate(size);
    82 }
    83 
    8479bool JSCell::getUInt32(uint32_t&) const
    8580{
  • trunk/JavaScriptCore/runtime/JSCell.h

    r52176 r52178  
    162162    }
    163163
     164    inline void* JSCell::operator new(size_t size, ExecState* exec)
     165    {
     166        return exec->heap()->allocate(size);
     167    }
     168
    164169    // --- JSValue inlines ----------------------------
    165170
Note: See TracChangeset for help on using the changeset viewer.