Ignore:
Timestamp:
Oct 2, 2008, 4:48:47 PM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-10-02 Darin Adler <Darin Adler>

Reviewed by Geoff Garen.

1.019x as fast on SunSpider.

  • API/JSBase.cpp: (JSEvaluateScript): Use heap. instead of heap-> to work with the heap. (JSCheckScriptSyntax): Ditto. (JSGarbageCollect): Ditto. (JSReportExtraMemoryCost): Ditto.
  • API/JSContextRef.cpp: (JSGlobalContextRetain): Ditto. (JSGlobalContextRelease): Destroy the heap with the destroy function instead of the delete operator. (JSContextGetGlobalObject): Use heap. instead of heap-> to work with the heap.
  • API/JSObjectRef.cpp: (JSObjectMake): Use heap. instead of heap-> to work with the heap. (JSObjectMakeFunctionWithCallback): Ditto. (JSObjectMakeConstructor): Ditto. (JSObjectMakeFunction): Ditto. (JSObjectMakeArray): Ditto. (JSObjectMakeDate): Ditto. (JSObjectMakeError): Ditto. (JSObjectMakeRegExp): Ditto. (JSObjectHasProperty): Ditto. (JSObjectGetProperty): Ditto. (JSObjectSetProperty): Ditto. (JSObjectGetPropertyAtIndex): Ditto. (JSObjectSetPropertyAtIndex): Ditto. (JSObjectDeleteProperty): Ditto. (JSObjectCallAsFunction): Ditto. (JSObjectCallAsConstructor): Ditto. (JSObjectCopyPropertyNames): Ditto. (JSPropertyNameAccumulatorAddName): Ditto.
  • API/JSValueRef.cpp: (JSValueIsEqual): Ditto. (JSValueIsInstanceOfConstructor): Ditto. (JSValueMakeNumber): Ditto. (JSValueMakeString): Ditto. (JSValueToNumber): Ditto. (JSValueToStringCopy): Ditto. (JSValueToObject): Ditto. (JSValueProtect): Ditto. (JSValueUnprotect): Ditto.
  • kjs/ExecState.h: (JSC::ExecState::heap): Update to use the & operator.
  • kjs/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): Update to initialize a heap member instead of calling new to make a heap. (JSC::JSGlobalData::~JSGlobalData): Destroy the heap with the destroy function instead of the delete operator.
  • kjs/JSGlobalData.h: Change from Heap* to a Heap.
  • kjs/JSGlobalObject.cpp: (JSC::JSGlobalObject::mark): Use the & operator here. (JSC::JSGlobalObject::operator new): Use heap. instead of heap-> to work with the heap.

WebCore:

2008-10-02 Darin Adler <Darin Adler>

Reviewed by Geoff Garen.

  • bindings/js/GCController.cpp: (WebCore::collect): Use heap. instead of heap-> to work with the heap. (WebCore::GCController::gcTimerFired): Ditto. (WebCore::GCController::garbageCollectNow): Ditto.
  • bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::operator new): Ditto.
  • storage/Database.cpp: (WebCore::Database::Database): Ditto.

WebKit/mac:

2008-10-02 Darin Adler <Darin Adler>

Reviewed by Geoff Garen.

  • Misc/WebCoreStatistics.mm: (+[WebCoreStatistics javaScriptObjectsCount]): Use heap. instead of heap-> to work with the heap. (+[WebCoreStatistics javaScriptGlobalObjectsCount]): Ditto. (+[WebCoreStatistics javaScriptProtectedObjectsCount]): Ditto. (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): Ditto. (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Ditto. (+[WebCoreStatistics javaScriptReferencedObjectsCount]): Ditto.

WebKit/win:

2008-10-02 Darin Adler <Darin Adler>

  • WebCoreStatistics.cpp: (WebCoreStatistics::javaScriptObjectsCount): Use heap. instead of heap-> to work with the heap. (WebCoreStatistics::javaScriptGlobalObjectsCount): Ditto. (WebCoreStatistics::javaScriptProtectedObjectsCount): Ditto. (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): Ditto. (WebCoreStatistics::javaScriptProtectedObjectTypeCounts): Ditto.
  • WebJavaScriptCollector.cpp: (WebJavaScriptCollector::objectCount): Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSValueRef.cpp

    r36766 r37215  
    113113{
    114114    ExecState* exec = toJS(ctx);
    115     exec->globalData().heap->registerThread();
     115    exec->globalData().heap.registerThread();
    116116    JSLock lock(exec);
    117117
     
    140140{
    141141    ExecState* exec = toJS(ctx);
    142     exec->globalData().heap->registerThread();
     142    exec->globalData().heap.registerThread();
    143143    JSLock lock(exec);
    144144
     
    174174{
    175175    ExecState* exec = toJS(ctx);
    176     exec->globalData().heap->registerThread();
     176    exec->globalData().heap.registerThread();
    177177    JSLock lock(exec);
    178178
     
    183183{
    184184    ExecState* exec = toJS(ctx);
    185     exec->globalData().heap->registerThread();
     185    exec->globalData().heap.registerThread();
    186186    JSLock lock(exec);
    187187
     
    199199{
    200200    ExecState* exec = toJS(ctx);
    201     exec->globalData().heap->registerThread();
     201    exec->globalData().heap.registerThread();
    202202    JSLock lock(exec);
    203203
     
    217217{
    218218    ExecState* exec = toJS(ctx);
    219     exec->globalData().heap->registerThread();
     219    exec->globalData().heap.registerThread();
    220220    JSLock lock(exec);
    221221
     
    235235{
    236236    ExecState* exec = toJS(ctx);
    237     exec->globalData().heap->registerThread();
     237    exec->globalData().heap.registerThread();
    238238    JSLock lock(exec);
    239239
     
    253253{
    254254    ExecState* exec = toJS(ctx);
    255     exec->globalData().heap->registerThread();
     255    exec->globalData().heap.registerThread();
    256256    JSLock lock(exec);
    257257
     
    263263{
    264264    ExecState* exec = toJS(ctx);
    265     exec->globalData().heap->registerThread();
     265    exec->globalData().heap.registerThread();
    266266    JSLock lock(exec);
    267267
Note: See TracChangeset for help on using the changeset viewer.