Commit e3313a55 authored by benjamin@webkit.org's avatar benjamin@webkit.org

Inline the JSArray constructor

https://bugs.webkit.org/show_bug.cgi?id=84416

Patch by Benjamin Poulain <bpoulain@apple.com> 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):
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e54bedc4
2012-04-20 Benjamin Poulain <bpoulain@apple.com>
Inline the JSArray constructor
https://bugs.webkit.org/show_bug.cgi?id=84416
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):
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2012-04-20 Mark Hahnenberg <mhahnenberg@apple.com>
Heap should cancel GC timer at the start of the collection
......@@ -9,7 +9,6 @@ EXPORTS
??0DropAllLocks@JSLock@JSC@@QAE@W4JSLockBehavior@2@@Z
??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z
??0InternalFunction@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@@Z
??0JSArray@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z
??0JSByteArray@JSC@@AAE@PAVExecState@1@PAVStructure@1@PAVByteArray@WTF@@@Z
??0JSLock@JSC@@QAE@PAVExecState@1@@Z
??0MD5@WTF@@QAE@XZ
......
......@@ -125,14 +125,6 @@ inline void JSArray::checkConsistency(ConsistencyCheckType)
#endif
JSArray::JSArray(JSGlobalData& globalData, Structure* structure)
: JSNonFinalObject(globalData, structure)
, m_indexBias(0)
, m_storage(0)
, m_sparseValueMap(0)
{
}
void JSArray::finishCreation(JSGlobalData& globalData, unsigned initialLength)
{
Base::finishCreation(globalData);
......
......@@ -139,7 +139,13 @@ namespace JSC {
friend class JIT;
protected:
JS_EXPORT_PRIVATE explicit JSArray(JSGlobalData&, Structure*);
explicit JSArray(JSGlobalData& globalData, Structure* structure)
: JSNonFinalObject(globalData, structure)
, m_indexBias(0)
, m_storage(0)
, m_sparseValueMap(0)
{
}
JS_EXPORT_PRIVATE void finishCreation(JSGlobalData&, unsigned initialLength = 0);
JS_EXPORT_PRIVATE JSArray* tryFinishCreationUninitialized(JSGlobalData&, unsigned initialLength);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment