Commit Graph

6 Commits

Author SHA1 Message Date
Boris Zbarsky
01bc3713f0 Bug 696233. Switch the nth-index cache to having a single hashtable per selector type (from end vs from start and of-type vs not-of-type). Gives somewhat better cache locality on some workloads and makes entry addition much cheaper because we no longer need to initialize all the new memory when the hashtable store is resized; we just initialize the parts of it we need as we need them. r=smaug 2011-10-26 15:34:20 -04:00
Boris Zbarsky
c9c4456454 Bug 662489. Reorganize the code flow for determining nth-index values. r=smaug
There are two changes here.  The first is that the aCheckEdgeOnly case is factored out into a separate branch so as to avoid branching on aCheckEdgeOnly inside the sibling loop.  This also allows us to reuse the IndexDetermined code for both aIsFromEnd and !aIsFromEnd cases.  In particular, when aIsFromEnd we start by walking backwards and hoping for a cached index on a previous sibling and only walking forwards if that fails.  For short child lists there's not that much of a difference, but for long ones this is a win.
2011-10-26 15:33:40 -04:00
Luke Wagner
c7d3e6785c Bug 689362 - Create js/public (with the intention that its contents will eventually be the only INSTALLED_HEADERS), move Vector and HashTable to js/public and some dependencies (r=billm,sr=dmandelin)
--HG--
rename : js/src/jshashtable.h => js/public/HashTable.h
rename : js/src/jsvector.h => js/public/Vector.h
rename : js/src/mfbt/InlineMap.h => js/src/ds/InlineMap.h
extra : rebase_source : 818639b74653667b7a572bc1234398c0e4559a60
2011-10-04 15:33:00 -07:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Paul Biggar
43b850291d Bug 643548: Remove mozalloc_undef_macro_wrappers hack from JS engine. (r=luke,rs=brendan)
mozalloc_undef_macro_wrappers are brittle and have side-effects that are hard
to debug and fix. The alternative is the just stick an underscore on the end of
malloc, free, etc, which is a comparatively small burden.
2011-03-31 01:14:12 -07:00
Boris Zbarsky
ed28ec7565 Bug 598832 part 5. Move caching of nth-index stuff to the TreeMatchContext. r=dbaron 2011-03-29 13:29:21 -04:00