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/JSObjectRef.cpp

    r37175 r37215  
    7474{
    7575    ExecState* exec = toJS(ctx);
    76     exec->globalData().heap->registerThread();
     76    exec->globalData().heap.registerThread();
    7777    JSLock lock(exec);
    7878
     
    9090{
    9191    ExecState* exec = toJS(ctx);
    92     exec->globalData().heap->registerThread();
     92    exec->globalData().heap.registerThread();
    9393    JSLock lock(exec);
    9494
     
    101101{
    102102    ExecState* exec = toJS(ctx);
    103     exec->globalData().heap->registerThread();
     103    exec->globalData().heap.registerThread();
    104104    JSLock lock(exec);
    105105
     
    116116{
    117117    ExecState* exec = toJS(ctx);
    118     exec->globalData().heap->registerThread();
     118    exec->globalData().heap.registerThread();
    119119    JSLock lock(exec);
    120120
     
    139139{
    140140    ExecState* exec = toJS(ctx);
    141     exec->globalData().heap->registerThread();
     141    exec->globalData().heap.registerThread();
    142142    JSLock lock(exec);
    143143
     
    165165{
    166166    ExecState* exec = toJS(ctx);
    167     exec->globalData().heap->registerThread();
     167    exec->globalData().heap.registerThread();
    168168    JSLock lock(exec);
    169169
     
    186186{
    187187    ExecState* exec = toJS(ctx);
    188     exec->globalData().heap->registerThread();
     188    exec->globalData().heap.registerThread();
    189189    JSLock lock(exec);
    190190
     
    207207{
    208208    ExecState* exec = toJS(ctx);
    209     exec->globalData().heap->registerThread();
     209    exec->globalData().heap.registerThread();
    210210    JSLock lock(exec);
    211211
     
    242242{
    243243    ExecState* exec = toJS(ctx);
    244     exec->globalData().heap->registerThread();
     244    exec->globalData().heap.registerThread();
    245245    JSLock lock(exec);
    246246
     
    253253{
    254254    ExecState* exec = toJS(ctx);
    255     exec->globalData().heap->registerThread();
     255    exec->globalData().heap.registerThread();
    256256    JSLock lock(exec);
    257257
     
    270270{
    271271    ExecState* exec = toJS(ctx);
    272     exec->globalData().heap->registerThread();
     272    exec->globalData().heap.registerThread();
    273273    JSLock lock(exec);
    274274
     
    294294{
    295295    ExecState* exec = toJS(ctx);
    296     exec->globalData().heap->registerThread();
     296    exec->globalData().heap.registerThread();
    297297    JSLock lock(exec);
    298298
     
    312312{
    313313    ExecState* exec = toJS(ctx);
    314     exec->globalData().heap->registerThread();
     314    exec->globalData().heap.registerThread();
    315315    JSLock lock(exec);
    316316
     
    329329{
    330330    ExecState* exec = toJS(ctx);
    331     exec->globalData().heap->registerThread();
     331    exec->globalData().heap.registerThread();
    332332    JSLock lock(exec);
    333333
     
    379379{
    380380    ExecState* exec = toJS(ctx);
    381     exec->globalData().heap->registerThread();
     381    exec->globalData().heap.registerThread();
    382382    JSLock lock(exec);
    383383
     
    417417{
    418418    ExecState* exec = toJS(ctx);
    419     exec->globalData().heap->registerThread();
     419    exec->globalData().heap.registerThread();
    420420    JSLock lock(exec);
    421421
     
    456456    JSObject* jsObject = toJS(object);
    457457    ExecState* exec = toJS(ctx);
    458     exec->globalData().heap->registerThread();
     458    exec->globalData().heap.registerThread();
    459459    JSLock lock(exec);
    460460
     
    501501    PropertyNameArray* propertyNames = toJS(array);
    502502
    503     propertyNames->globalData()->heap->registerThread();
     503    propertyNames->globalData()->heap.registerThread();
    504504    JSLock lock(propertyNames->globalData()->isSharedInstance);
    505505
Note: See TracChangeset for help on using the changeset viewer.