Ignore:
Timestamp:
Jun 26, 2008, 11:59:26 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Maciej.

Make JSGlobalData per-thread.

No change on SunSpider total.

  • wtf/ThreadSpecific.h: Re-enabled the actual implementation.
  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::~JSGlobalObject): Re-added a JSLock-related assertion. We'll probably want to preserve these somehow to keep legacy behavior in working condition. (KJS::JSGlobalObject::init): Initialize globalData pointer earlier, so that it is ready when updating JSGlobalObject linked list.
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::head): Changed head() to be non-static, and to use JSGlobalData associated with the current object.
  • kjs/InitializeThreading.cpp: (KJS::initializeThreadingOnce): Removed a no longer needed Heap::registerAsMainThread() call.
  • kjs/JSGlobalData.h: Removed a lying lie comment - parserObjectExtraRefCounts is not transient, and while newParserObjects may conceptually be such, there is still some node manipulation going on outside Parser::parse which touches it.
  • kjs/JSGlobalData.cpp: (KJS::JSGlobalData::~JSGlobalData): Delete recently added members. (KJS::JSGlobalData::sharedInstance): Actually use a separate instance.
  • kjs/collector.cpp: (KJS::Heap::Heap): (KJS::Heap::~Heap): Added a destructor, which unconditionally deletes everything. (KJS::Heap::sweep): Removed code related to "collect on main thread only" logic. (KJS::Heap::collect): Ditto. (KJS::Heap::globalObjectCount): Explicitly use per-thread instance of JSGlobalObject linked list now that JSGlobalObject::head() is not static. Curently, WebCoreStatistics methods only work with the main thread currently anyway. (KJS::Heap::protectedGlobalObjectCount): Ditto.
  • kjs/collector.h: Removed code related to "collect on main thread only" logic.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSGlobalData.cpp

    r34792 r34810  
    9090{
    9191#if USE(MULTIPLE_THREADS)
     92    delete heap;
     93
     94    delete machine;
     95
    9296    delete[] arrayTable->table;
    9397    delete[] dateTable->table;
     
    110114    delete propertyNames;
    111115    deleteIdentifierTable(identifierTable);
     116
     117    delete newParserObjects;
     118    delete parserObjectExtraRefCounts;
    112119#endif
    113120}
     
    126133JSGlobalData& JSGlobalData::sharedInstance()
    127134{
    128     return threadInstance();
    129 /*
    130135#if USE(MULTIPLE_THREADS)
    131136    AtomicallyInitializedStatic(JSGlobalData, sharedInstance);
     
    134139#endif
    135140    return sharedInstance;
    136 */
    137141}
    138142
Note: See TracChangeset for help on using the changeset viewer.