Changeset 1789 in webkit for trunk/JavaScriptCore/kjs/value.cpp


Ignore:
Timestamp:
Aug 9, 2002, 4:24:41 PM (23 years ago)
Author:
mjs
Message:
  • fixed 2948835 - JavaScriptCore locking is too fine grained, makes it too slow
  • kjs/collector.cpp: (Collector::allocate): (Collector::collect): (Collector::finalCheck): (Collector::numInterpreters): (Collector::numGCNotAllowedObjects): (Collector::numReferencedObjects):
  • kjs/collector.h:
  • kjs/internal.cpp: (initializeInterpreterLock): (lockInterpreter): (unlockInterpreter): (Parser::parse): (InterpreterImp::InterpreterImp): (InterpreterImp::clear): (InterpreterImp::evaluate):
  • kjs/value.cpp: (ValueImp::ValueImp): (ValueImp::setGcAllowed):
File:
1 edited

Legend:

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

    r1623 r1789  
    4242// ----------------------------- ValueImp -------------------------------------
    4343
    44 #if APPLE_CHANGES
    45 ValueImp::ValueImp() :
    46   refcount(0)
    47 {
    48   // Tell the garbage collector that this memory block corresponds to a real object now
    49   Collector::lock();
    50   _flags = VI_CREATED;
    51   //fprintf(stderr,"ValueImp::ValueImp %p\n",(void*)this);
    52   Collector::unlock();
    53 }
    54 #else
    5544ValueImp::ValueImp() :
    5645  refcount(0),
     
    6049  //fprintf(stderr,"ValueImp::ValueImp %p\n",(void*)this);
    6150}
    62 #endif
    6351
    6452ValueImp::~ValueImp()
     
    8169void ValueImp::setGcAllowed()
    8270{
    83 #ifdef APPLE_CHANGES
    84   Collector::lock();
    85 #endif
    8671  //fprintf(stderr,"ValueImp::setGcAllowed %p\n",(void*)this);
    8772  _flags |= VI_GCALLOWED;
    88 #ifdef APPLE_CHANGES
    89   Collector::unlock();
    90 #endif
    9173}
    9274
Note: See TracChangeset for help on using the changeset viewer.