Ignore:
Timestamp:
Nov 20, 2002, 1:12:14 PM (23 years ago)
Author:
darin
Message:
  • decrease ref/deref -- 5% speedup in iBench
  • JavaScriptCore.pbproj/project.pbxproj: Added array_instance.h
  • kjs/array_instance.h: Added so it can be shared by function.h.
  • kjs/array_object.cpp:
  • kjs/array_object.h:
  • kjs/bool_object.cpp:
  • kjs/bool_object.h:
  • kjs/collector.cpp:
  • kjs/date_object.cpp:
  • kjs/date_object.h:
  • kjs/error_object.cpp:
  • kjs/function.cpp:
  • kjs/function.h:
  • kjs/function_object.cpp:
  • kjs/internal.cpp:
  • kjs/internal.h:
  • kjs/math_object.cpp:
  • kjs/nodes.cpp:
  • kjs/number_object.cpp:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/object_object.cpp:
  • kjs/property_map.cpp:
  • kjs/reference.cpp:
  • kjs/reference.h:
  • kjs/regexp_object.cpp:
  • kjs/string_object.cpp:
  • kjs/string_object.h:
  • kjs/value.cpp:
  • kjs/value.h: Switched lots of interfaces so they don't require ref/deref.
File:
1 edited

Legend:

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

    r2781 r2783  
    100100    heap.oversizeCells[heap.usedOversizeCells] = (CollectorCell *)newCell;
    101101    heap.usedOversizeCells++;
     102    heap.numLiveObjects++;
    102103   
    103104    return (void *)newCell;
     
    141142          targetBlock->bitmap[wordInBitmap] |= (1 << bitInWord);
    142143          targetBlock->usedCells++;
     144          heap.numLiveObjects++;
    143145          return (void *)(targetBlock->cells + cellPos);
    144146        }
     
    293295
    294296#if APPLE_CHANGES
     297
    295298int Collector::numInterpreters()
    296299{
     
    343346       
    344347        if ((word & (1 << bitInWord)) &&
    345             imp->refcount == 0) {
     348            imp->refcount != 0) {
    346349          ++count;
    347350        }
     
    352355  for (int cell = 0; cell < heap.usedOversizeCells; cell++) {
    353356    ValueImp *imp = (ValueImp *)heap.oversizeCells[cell];
    354       if (imp->refcount == 0) {
     357      if (imp->refcount != 0) {
    355358        ++count;
    356359      }
     
    360363}
    361364
     365// FIXME: Rename. Root object classes are more useful than live object classes.
    362366CFSetRef Collector::liveObjectClasses()
    363367{
     
    370374        ValueImp *imp = (ValueImp *)(heap.blocks[block]->cells + BITS_PER_WORD * wordInBitmap + bitInWord);
    371375       
    372         if (word & (1 << bitInWord)) {
     376        if (word & (1 << bitInWord)
     377                && ((imp->_flags & ValueImp::VI_GCALLOWED) == 0 || imp->refcount != 0)) {
    373378          const char *mangled_name = typeid(*imp).name();
    374379          int status;
     
    386391  for (int cell = 0; cell < heap.usedOversizeCells; cell++) {
    387392    ValueImp *imp = (ValueImp *)heap.oversizeCells[cell];
    388 
    389     const char *mangled_name = typeid(*imp).name();
    390     int status;
    391     char *demangled_name = __cxxabiv1::__cxa_demangle (mangled_name, NULL, NULL, &status);
    392    
    393     CFStringRef className = CFStringCreateWithCString(NULL, demangled_name, kCFStringEncodingASCII);
    394     free(demangled_name);
    395     CFSetAddValue(classes, className);
    396     CFRelease(className);
     393   
     394    if ((imp->_flags & ValueImp::VI_GCALLOWED) == 0 || imp->refcount != 0) {
     395        const char *mangled_name = typeid(*imp).name();
     396        int status;
     397        char *demangled_name = __cxxabiv1::__cxa_demangle (mangled_name, NULL, NULL, &status);
     398       
     399        CFStringRef className = CFStringCreateWithCString(NULL, demangled_name, kCFStringEncodingASCII);
     400        free(demangled_name);
     401        CFSetAddValue(classes, className);
     402        CFRelease(className);
     403    }
    397404  }
    398405
     
    400407}
    401408
    402 #endif
     409#endif // APPLE_CHANGES
Note: See TracChangeset for help on using the changeset viewer.