Ignore:
Timestamp:
Apr 20, 2012, 3:52:53 PM (13 years ago)
Author:
[email protected]
Message:

Inline the JSArray constructor
https://bugs.webkit.org/show_bug.cgi?id=84416

Patch by Benjamin Poulain <[email protected]> on 2012-04-20
Reviewed by Geoffrey Garen.

The constructor is trivial, no reason to jump for it.

This makes the creation of array ~5% faster (on non-trivial cases, no empty arrays).

  • runtime/JSArray.cpp:

(JSC):

  • runtime/JSArray.h:

(JSC::JSArray::JSArray):

File:
1 edited

Legend:

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

    r114539 r114793  
    140140
    141141    protected:
    142         JS_EXPORT_PRIVATE explicit JSArray(JSGlobalData&, Structure*);
     142        explicit JSArray(JSGlobalData& globalData, Structure* structure)
     143            : JSNonFinalObject(globalData, structure)
     144            , m_indexBias(0)
     145            , m_storage(0)
     146            , m_sparseValueMap(0)
     147        {
     148        }
    143149
    144150        JS_EXPORT_PRIVATE void finishCreation(JSGlobalData&, unsigned initialLength = 0);
Note: See TracChangeset for help on using the changeset viewer.