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


Ignore:
Timestamp:
Nov 23, 2002, 4:04:08 PM (23 years ago)
Author:
mjs
Message:

Numerous collector changes for a net gain of 3% on JS ibench:

  • Replaced per-block bitmap with free list.
  • Increased number of empty blocks kept around to 2.
  • Doubled block size.
  • When scanning heap in collector, skip scanning the rest of a block as soon as we see as many live cells as the the number of used cells it had originally.

Also the following collector changes unrelated to performance:

  • Made constants const int' instead of static const int'.
  • Miscellaneous code cleanup.
  • kjs/collector.cpp:
  • Added debugging mode enabled by defining DEBUG_GC which asserts when a destroyed ValueImp
  • kjs/internal.cpp: (ContextImp::mark):
  • kjs/value.cpp: (Value::Value):
  • kjs/value.h:
  • kjs/config.h:
File:
1 edited

Legend:

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

    r2791 r2845  
    202202{
    203203  rep = v;
     204#if DEBUG_COLLECTOR
     205  assert (!(rep && !SimpleNumber::is(rep) && *((uint32_t *)rep) == 0 ));
     206  assert (!(rep && !SimpleNumber::is(rep) && rep->_flags & VI_MARKED));
     207#endif
    204208  if (v)
    205209  {
     
    213217{
    214218  rep = v.imp();
     219#if DEBUG_COLLECTOR
     220  assert (!(rep && !SimpleNumber::is(rep) && *((uint32_t *)rep) == 0 ));
     221  assert (!(rep && !SimpleNumber::is(rep) && rep->_flags & VI_MARKED));
     222#endif
    215223  if (rep)
    216224  {
Note: See TracChangeset for help on using the changeset viewer.