Changeset 9003 in webkit for trunk/JavaScriptCore/kjs/context.h


Ignore:
Timestamp:
Apr 12, 2005, 3:18:35 PM (20 years ago)
Author:
mjs
Message:

Reviewed by John.

<rdar://problem/4086819> Avoid using protect count hash table so much for 5.6% JS iBench speedup

  • Avoid using protected values hash for the two most common cases
  • Bump up ListImp high water mark, new testing shows 508 ListImps are created during JS iBench.

Net result is a 5.6% speedup on JavaScript iBench

  • kjs/collector.cpp: (KJS::Collector::collect): mark protected lists as appropriate.
  • kjs/context.h:
  • kjs/list.cpp: (KJS::ListImp::markValues): Moved implementation from List::markValues (KJS::List::markProtectedLists): Implemented - scan pool and overflow list. (KJS::allocateListImp): link lists outside the pool into a separate doubly linked list to be able to mark protected lists (KJS::deallocateListImp): do the corresponding delinking (KJS::List::derefValues): do nothing in conservative GC mode (KJS::List::refValues): do nothing in conservative GC mode (KJS::List::markValues): call ListImp version (KJS::List::append):
  • kjs/list.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/context.h

    r6452 r9003  
    6060    FunctionImp *_function;
    6161    const List *_arguments;
    62     ProtectedObject activation;
     62    // because ContextImp is always allocated on the stack,
     63    // there is no need to protect various pointers from conservative
     64    // GC since they will be caught by the conservative sweep anyway!
     65    Object activation;
    6366   
    6467    ScopeChain scope;
    65     ProtectedObject variable;
    66     ProtectedObject thisVal;
     68    Object variable;
     69    Object thisVal;
    6770
    6871    LabelStack ls;
Note: See TracChangeset for help on using the changeset viewer.