-
darin@apple.com authored
2008-10-02 Darin Adler <darin@apple.com> Reviewed by Geoff Garen. - https://bugs.webkit.org/show_bug.cgi?id=21321 Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData 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@apple.com> Reviewed by Geoff Garen. - https://bugs.webkit.org/show_bug.cgi?id=21321 Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData * 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@apple.com> Reviewed by Geoff Garen. - https://bugs.webkit.org/show_bug.cgi?id=21321 Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData * 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@apple.com> - https://bugs.webkit.org/show_bug.cgi?id=21321 Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData * 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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
b6295d46