Commit Graph

40 Commits

Author SHA1 Message Date
Terrence Cole
57e9e92ec2 Bug 763636 - Do not OOM after rekeying a HashTable; r=luke
This makes the overloaded case fixup after a rekey infallible by rehashing into
the existing table, rather than allocating a new one.
2012-06-15 13:21:24 -07:00
Terrence Cole
7155386bfe Backed out changeset 35c79f50d85f 2012-06-14 17:06:01 -07:00
Terrence Cole
6fb1229ba0 Bug 763636 - Do not OOM after rekeying a HashTable; r=luke
This makes the overloaded case fixup after a rekey infallible by rehashing into
the existing table, rather than allocating a new one.
2012-06-14 16:05:57 -07:00
Terrence Cole
500bb4e179 Bug 759991 - Fix infinite loop in rekeyFront with fully collided Table; r=luke
This hooks up the same path to putNew, because it is slightly more efficient and
fixes an OOM failure introduced in c9024bcb8da0.
2012-06-06 16:40:56 -07:00
Phil Ringnalda
89ce6e86e6 Back out ecbe3c75551d (bug 759991) to investigate the effects on TestStartupCache bustage on a CLOSED TREE 2012-06-11 17:38:08 -07:00
Terrence Cole
e2deee1107 Bug 759991 - Fix infinite loop in rekeyFront with fully collided Table; r=luke
This hooks up the same path to putNew, because it is slightly more efficient and
fixes an OOM failure introduced in c9024bcb8da0.
2012-06-06 16:40:56 -07:00
Nicholas Nethercote
737a73a263 Bug 760337 - Add JS_ASSERT(table) where appropriate in HashTable.h. r=luke. 2012-06-04 00:00:24 -07:00
Terrence Cole
816de10c5e Bug 760342 - Check explicitly for mis-use of HashTable::Enum; r=luke
If a user does removeFront or rekeyFront on an Enum, then continues to use it,
it will fail, potentially randomly. This patch makes the failure explicit in
debug builds.
2012-06-01 15:41:27 -07:00
Matt Brubeck
3024f60165 Back out bug 760342 for Windows build error, bug 755070 for Android crashes, and bug 760458 because it depends on 755070 2012-06-01 17:45:02 -07:00
Terrence Cole
182d257235 Bug 760342 - Check explicitly for mis-use of HashTable::Enum; r=luke
If a user does removeFront or rekeyFront on an Enum, then continues to use it,
it will fail, potentially randomly. This patch makes the failure explicit in
debug builds.
2012-06-01 15:41:27 -07:00
Gervase Markham
cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Terrence Cole
15c2def1d0 Bug 753479 - Make HashTable::Enum::rekeyFront take a separate Lookup; r=luke 2012-05-04 14:18:28 -07:00
Terrence Cole
0fa242d073 Bug 752604 - Ergonomics improvements for HashTable::rekeyFront; r=luke 2012-05-07 12:46:28 -07:00
Tom Schuster
f38eb6ed65 Bug 735036 - Check for OOM in debug only method. r=luke 2012-04-24 20:03:48 +02:00
Terrence Cole
9ed6718124 Bug 744052 - Restructure HashTable::checkOverflow for easier reading; r=luke
When I added this function, I just copied the existing logical structure.  It
makes more sense here to check overflowed and return early, since we can do this
now.
2012-04-10 09:51:48 -07:00
Terrence Cole
4648e9c9ff Bug 743885 - Fix OOM handling regression in HashTable; r=luke
Introduced by me in bug 722946.
2012-04-09 19:07:11 -07:00
Daniel Holbert
b716a481a2 Bug 742438: Fix straggling bool-vs-NULL comparison after HashSet::put return-type change. r=terrence 2012-04-04 11:18:18 -07:00
Terrence Cole
5c384426b8 Bug 740153 - Don't expose Entry directly through HashMap; r=luke
HashMap and HashSet only expose Entries through Ptr and Range, except for one
variant of put. They also don't expose the default size they use if you call
init() without an argument. These weirdnesses seem to be interface carried over
from the old jsdhash.

The first oddness is unused and can be removed, the second should simply get
exposed to make it easier to wrap HashMap and HashSet.
2012-03-30 11:01:58 -07:00
Terrence Cole
c1e130b40d Bug 722946 - Add method to HashTable::Enum for inline rekeying; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet. For generational and compacting GC, we will need to move
these objects in memory. This means we will need to remove and re-insert these
keys in a new location, during GC. Because we cannot safely allocate memory for
this, we need a specialized algorithm inside the HashTable itself.
2012-03-14 13:48:59 -07:00
Ehsan Akhgari
4e1861131c Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds 2012-03-14 14:29:58 -04:00
Terrence Cole
61bf49b700 Bug 722946 - Add method to HashTable for inline rekeying/removal; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet.  For generational and compacting GC, we will need to move
these objects in memory.  This means we will need to remove and re-insert these
keys in a new location, during GC.  Because we cannot safely allocate memory
for this, we need a specialized algorithm inside the HashTable itself.
2012-02-03 15:43:34 -08:00
Jason Orendorff
a3b5f66ae9 Add static assertions as requested in bug 726298 comment 2 and 4. 2012-03-01 12:48:47 -06:00
Nicholas Nethercote
c1dd090b4c Bug 715453 - Remove computedSize from nsMallocSizeOfFun. r=jlebar,bhackett. 2012-01-25 00:52:51 -08:00
Bill McCloskey
1690fffa6b Bug 720853 - Add read barrier for atom table (r=luke) 2012-01-24 18:32:56 -08:00
Jeff Walden
833fc08689 Bug 714264 - Move declarations around such that it's possible to include jsprvtd.h before Vector.h or HashTable.h. r=luke 2012-01-02 16:34:25 -06:00
Brian Hackett
3f04eff01e Backed out changeset 4282a285d381 (bug 707049 backout). 2011-12-31 07:32:04 -07:00
Ms2ger
4928f1e7af Backout 0d642e4e08cf (bug 707049); requested by evilpie. 2011-12-31 15:13:01 +01:00
Brian Hackett
67b426655e Add dynamic analysis for identifying moving GC hazards, autorooter classes, some VM rooters, bug 707049. r=billm 2011-12-30 20:12:45 -07:00
Jeff Walden
e6939e74e2 Use < rather than != when comparing a bunch of pointers to sentinel end-pointer values, as a small hedge against things going awry and skipping past the sentinel. No bug, r=firebot 2011-12-29 15:50:33 -06:00
Hub Figuière
2c8f71d8ae Bug 714169 - Fix warning in HashTable.h by using |continue;| instead of |;|. r=jwalden 2011-12-29 13:37:04 -08:00
Jeff Walden
12e010ddeb Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin 2011-12-08 22:54:10 -05:00
Brian Hackett
aea9a5df6e Merge MC -> JM 2011-11-30 12:45:27 -08:00
Brian Hackett
dafe329f88 Add about:memory reporters for per compartment shape tables, bug 704372. 2011-11-21 20:29:05 -05:00
Nicholas Nethercote
c0681f567c Bug 698968 - Add mallocSizeOf functions and start using them. r=jlebar,bhackett,jfkthame, sr=bz. 2011-11-27 19:03:14 -08:00
Bill McCloskey
267d9855a3 Bug 641027 - Add snapshot-at-the-beginning write barriers for incremental GC (r=luke,bhackett) 2011-10-25 16:07:42 -07:00
Nicholas Nethercote
0bd2559c8a Bug 699724 - Shrink js::HashTable. r=luke. 2011-11-08 21:02:11 -08:00
Nicholas Nethercote
1f66eab735 Bug 684800 - Measure slop in TI-related JS memory reporters. r=bhackett. 2011-11-01 21:59:43 -07:00
Nicholas Nethercote
fa48881fb1 Bug 697933 - Allow HashTables to have a capacity as small as four. r=luke. 2011-10-30 16:12:48 -07:00
Nicholas Nethercote
055ecf50db Bug 697931 - Remove KidHashes when possible. r=luke. 2011-10-27 23:06:17 -07:00
Luke Wagner
f6e92fa08c 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) 2011-10-04 15:33:00 -07:00