Commit Graph

132 Commits

Author SHA1 Message Date
Matt Brubeck
1f99b61afd 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
b266d6fe3f 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
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Terrence Cole
549398c8a4 Bug 753479 - Make HashTable::Enum::rekeyFront take a separate Lookup; r=luke
--HG--
extra : rebase_source : 7f8b2cda64f34c60f702182f64e370a73a593934
2012-05-04 14:18:28 -07:00
Terrence Cole
1194eebfb8 Bug 752604 - Ergonomics improvements for HashTable::rekeyFront; r=luke
--HG--
extra : rebase_source : 9764f2db38844106ac13f5281d85464f0b2aff80
2012-05-07 12:46:28 -07:00
Tom Schuster
9d15dfd22d Bug 735036 - Check for OOM in debug only method. r=luke 2012-04-24 20:03:48 +02:00
Terrence Cole
dfd9f312e5 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
9a178239bc 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
5d8052de2c 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
9eae5154cd 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.

--HG--
extra : rebase_source : e1432a9af189229f379158ba0529956ddbf5f234
2012-03-30 11:01:58 -07:00
Terrence Cole
0d9d3bda35 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
83186bf501 Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds 2012-03-14 14:29:58 -04:00
Terrence Cole
f8733065ed 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
bb1b25e0ad Add static assertions as requested in bug 726298 comment 2 and 4.
--HG--
extra : rebase_source : 3edf2446076dae08c16b121de18505174c84f370
2012-03-01 12:48:47 -06:00
Nicholas Nethercote
dd32d38d63 Bug 715453 - Remove computedSize from nsMallocSizeOfFun. r=jlebar,bhackett.
--HG--
extra : rebase_source : a65039a407daab45360a5b375b53cbf1bc05b7f6
2012-01-25 00:52:51 -08:00
Bill McCloskey
6ee3ac4d49 Bug 720853 - Add read barrier for atom table (r=luke) 2012-01-24 18:32:56 -08:00
Jeff Walden
a6c3bde2ab Bug 714264 - Move declarations around such that it's possible to include jsprvtd.h before Vector.h or HashTable.h. r=luke
--HG--
extra : rebase_source : e981944be5edf5c772df986d0898494b9bc53a3e
2012-01-02 16:34:25 -06:00
Brian Hackett
95d4e2f5d9 Backed out changeset 4282a285d381 (bug 707049 backout). 2011-12-31 07:32:04 -07:00
Ms2ger
a0619211ee Backout 0d642e4e08cf (bug 707049); requested by evilpie. 2011-12-31 15:13:01 +01:00
Brian Hackett
157daeeaa6 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
6f39713d32 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
--HG--
extra : rebase_source : 567f70397ec9ef006c55c01f3acde305ab527b56
2011-12-29 15:50:33 -06:00
Hub Figuière
6801abcb82 Bug 714169 - Fix warning in HashTable.h by using |continue;| instead of |;|. r=jwalden
--HG--
extra : rebase_source : 176f652ee0e2c23b2c995b51814e4e1fd1ae0149
2011-12-29 13:37:04 -08:00
Jeff Walden
476c7d19c5 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
5ecccc93ab Merge MC -> JM 2011-11-30 12:45:27 -08:00
Brian Hackett
8b5b277f7c Add about:memory reporters for per compartment shape tables, bug 704372. 2011-11-21 20:29:05 -05:00
Nicholas Nethercote
f1e77095c2 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
5ef98ce429 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
c32cc3b4fa Bug 699724 - Shrink js::HashTable. r=luke. 2011-11-08 21:02:11 -08:00
Nicholas Nethercote
006eaea440 Bug 684800 - Measure slop in TI-related JS memory reporters. r=bhackett. 2011-11-01 21:59:43 -07:00
Nicholas Nethercote
8d8eabc208 Bug 697933 - Allow HashTables to have a capacity as small as four. r=luke. 2011-10-30 16:12:48 -07:00
Nicholas Nethercote
87638f34f3 Bug 697931 - Remove KidHashes when possible. r=luke. 2011-10-27 23:06:17 -07: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