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/kjs/JSGlobalObject.cpp

    r37213 r37215  
    360360    RegisterFile& registerFile = globalData()->machine->registerFile();
    361361    if (registerFile.globalObject() == this)
    362         registerFile.markGlobals(globalData()->heap);
     362        registerFile.markGlobals(&globalData()->heap);
    363363
    364364    markIfNeeded(d()->globalExec->exception());
     
    449449{
    450450#ifdef JAVASCRIPTCORE_BUILDING_ALL_IN_ONE_FILE
    451     return globalData->heap->inlineAllocate(size);
     451    return globalData->heap.inlineAllocate(size);
    452452#else
    453     return globalData->heap->allocate(size);
     453    return globalData->heap.allocate(size);
    454454#endif
    455455}
Note: See TracChangeset for help on using the changeset viewer.