Razvan Cojocaru
c8372e3fae
Bug 723228 - nsTArray::AssignRange should use memcpy when possible. r=jlebar for the XPCOM changes, r=jwalden for js/mfbt changes
...
--HG--
extra : rebase_source : 2442a0d29ae0fa7edd0312d980cbc270a4f33134
2013-02-08 13:18:49 -08:00
Luke Wagner
1d2e8c5180
Bug 832090 - make HashMap/Set movable (r=terrence)
...
--HG--
extra : rebase_source : 7c6a7a0d03bf361f2ee7c853f7f07bf15841b21b
2012-11-28 15:19:39 -08:00
Justin Lebar
572901583f
Bug 826951 - Compact hashtables if they're underloaded, instead of shrinking them by a factor of 2. r=luke
2013-01-08 11:04:19 +01:00
Justin Lebar
e111de2b75
Bug 827238 - Fix an out-of-date comment in js/public/HashTable.h r=luke
2013-01-08 11:04:19 +01:00
Terrence Cole
f427d43587
Bug 826435 - Do not allow poisoned pointers near a HashTable; r=sfink
...
The rooting analysis depends on all usage of a poisoned pointer to crash. This
patch makes the above usage crash, as required.
--HG--
extra : rebase_source : 3d67e4c44cee91d889edbf6641cebe9887fb10ee
2013-01-03 17:01:38 -08:00
Jeff Walden
120886ca73
Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger
2012-12-14 18:58:45 -05:00
Luke Wagner
24bb8ac700
Bug 810192 - don't require a default constructor for Hash{Map,Set}; only construct objects for live elements (r=terrence)
2012-11-12 15:30:39 -08:00
Terrence Cole
cd906e6a9c
Bug 807151 - Unexport |mozilla| from the |js| namespace; r=Waldo
...
Clang does not want to allow js::ion::Range and mozilla::Range simultaneously
when we have a |namespace js { using namespace mozilla; }| declaration.
2012-11-06 17:35:18 -08:00
Nicholas Nethercote
146880df7e
Bug 800481 - Remove unnecessary second arg from HashTable::hash{1,2}. r=luke.
2012-10-11 16:36:29 -07:00
Jeff Walden
6ee8d9b9ba
Use MOZ_DELETE on the copy/assignment operators for various hash classes. No bug, r=lumpy
...
--HG--
extra : rebase_source : f9fb08566c17f62c189b1469e3730554b6fbe1ce
2012-09-10 13:27:04 -07:00
Jeff Walden
42caf0acd9
Tweak an assertion in HashTable.h to use initialized() rather than !null, for clarity. No bug, r=sparky
...
--HG--
extra : rebase_source : a6110712d528e52323293cdbff4b171c5fda6401
2012-09-10 13:17:55 -07:00
Terrence Cole
b6f4fbbe82
Bug 776583 - Make post barrier verifier pass interpreter tests; r=billm
...
--HG--
extra : rebase_source : c5c8865774d32513cbed97b98b3084f04a61a7f1
2012-07-16 10:54:56 -07:00
Jason Orendorff
e054a9fd59
Bug 743107 - Add OrderedHashTable. Change implementation of Map and Set to retain insertion order. r=luke.
...
--HG--
extra : rebase_source : 8b8d67ccd26494f884ba0b5d35e2f44a34296ed6
2012-07-03 16:33:38 -05:00
Terrence Cole
9022675537
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.
--HG--
extra : rebase_source : fdd3f8bb1c9d2788c7281b69c974fdea0464fea8
2012-06-15 13:21:24 -07:00
Terrence Cole
c3500f6cd2
Backed out changeset 35c79f50d85f
...
--HG--
extra : rebase_source : a84a5c5554e087f71771c2e3c180405dfdc750c3
2012-06-14 17:06:01 -07:00
Terrence Cole
b6bd29f09a
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.
--HG--
rename : mobile/android/base/resources/drawable/tabs_button_contracted.xml => mobile/android/base/resources/drawable/tabs_button.xml
rename : toolkit/mozapps/update/test/unit/test_0162_appInUse_xp_win_complete.js => toolkit/mozapps/update/test/unit/test_0161_appInUse_xp_win_complete.js
rename : toolkit/mozapps/update/test/unit/test_0174_fileLocked_xp_win_complete.js => toolkit/mozapps/update/test/unit/test_0172_fileLocked_xp_win_complete.js
rename : toolkit/mozapps/update/test/unit/test_0175_fileLocked_xp_win_partial.js => toolkit/mozapps/update/test/unit/test_0173_fileLocked_xp_win_partial.js
rename : toolkit/mozapps/update/test/unit/test_0188_fileInUse_xp_win_complete.js => toolkit/mozapps/update/test/unit/test_0184_fileInUse_xp_win_complete.js
rename : toolkit/mozapps/update/test/unit/test_0189_fileInUse_xp_win_partial.js => toolkit/mozapps/update/test/unit/test_0185_fileInUse_xp_win_partial.js
rename : toolkit/mozapps/update/test/unit/test_0190_rmrfdirFileInUse_xp_win_complete.js => toolkit/mozapps/update/test/unit/test_0186_rmrfdirFileInUse_xp_win_complete.js
rename : toolkit/mozapps/update/test/unit/test_0191_rmrfdirFileInUse_xp_win_partial.js => toolkit/mozapps/update/test/unit/test_0187_rmrfdirFileInUse_xp_win_partial.js
rename : toolkit/mozapps/update/test/unit/test_0203_app_launch_apply_update.js => toolkit/mozapps/update/test/unit/test_0201_app_launch_apply_update.js
rename : toolkit/mozapps/update/test_svc/unit/test_0162_appInUse_xp_win_complete_svc.js => toolkit/mozapps/update/test_svc/unit/test_0161_appInUse_xp_win_complete_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0174_fileLocked_xp_win_complete_svc.js => toolkit/mozapps/update/test_svc/unit/test_0172_fileLocked_xp_win_complete_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0175_fileLocked_xp_win_partial_svc.js => toolkit/mozapps/update/test_svc/unit/test_0173_fileLocked_xp_win_partial_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0188_fileInUse_xp_win_complete_svc.js => toolkit/mozapps/update/test_svc/unit/test_0184_fileInUse_xp_win_complete_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0189_fileInUse_xp_win_partial_svc.js => toolkit/mozapps/update/test_svc/unit/test_0185_fileInUse_xp_win_partial_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0190_rmrfdirFileInUse_xp_win_complete_svc.js => toolkit/mozapps/update/test_svc/unit/test_0186_rmrfdirFileInUse_xp_win_complete_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0191_rmrfdirFileInUse_xp_win_partial_svc.js => toolkit/mozapps/update/test_svc/unit/test_0187_rmrfdirFileInUse_xp_win_partial_svc.js
rename : toolkit/mozapps/update/test_svc/unit/test_0203_app_launch_apply_update_svc.js => toolkit/mozapps/update/test_svc/unit/test_0201_app_launch_apply_update_svc.js
extra : rebase_source : 651c27d020f2e64978742676340b2e284609c3a1
2012-06-14 16:05:57 -07:00
Terrence Cole
15a3f20f21
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
1441492d49
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
a0b05d6208
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
ad056ade92
Bug 760337 - Add JS_ASSERT(table) where appropriate in HashTable.h. r=luke.
...
--HG--
extra : rebase_source : ab85f7061f79605afe54a6341612cededef35558
2012-06-04 00:00:24 -07:00
Terrence Cole
c15ef6f2b8
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
e62fcc8acf
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
722da9452b
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
82ff7027aa
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Terrence Cole
6478881af8
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
b483fc9299
Bug 752604 - Ergonomics improvements for HashTable::rekeyFront; r=luke
...
--HG--
extra : rebase_source : 9764f2db38844106ac13f5281d85464f0b2aff80
2012-05-07 12:46:28 -07:00
Tom Schuster
a54448c56d
Bug 735036 - Check for OOM in debug only method. r=luke
2012-04-24 20:03:48 +02:00
Terrence Cole
71ea0dd217
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
e4df58c761
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
274d9dd552
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
9cf3dabddc
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
844245f157
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
7b21a126fb
Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds
2012-03-14 14:29:58 -04:00
Terrence Cole
2fe9cca9b9
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
4fe0f5e68a
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
7559a70a04
Bug 715453 - Remove computedSize from nsMallocSizeOfFun. r=jlebar,bhackett.
...
--HG--
extra : rebase_source : a65039a407daab45360a5b375b53cbf1bc05b7f6
2012-01-25 00:52:51 -08:00
Bill McCloskey
88c7b0c713
Bug 720853 - Add read barrier for atom table (r=luke)
2012-01-24 18:32:56 -08:00
Jeff Walden
8d89e85cfe
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
1d81f1154e
Backed out changeset 4282a285d381 (bug 707049 backout).
2011-12-31 07:32:04 -07:00
Ms2ger
331f7b2adb
Backout 0d642e4e08cf (bug 707049); requested by evilpie.
2011-12-31 15:13:01 +01:00
Brian Hackett
dfd45e67d1
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
afff57e387
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
774e57db4a
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
735580ff0e
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
71bdcbc4f5
Merge MC -> JM
2011-11-30 12:45:27 -08:00
Brian Hackett
5b0bd92091
Add about:memory reporters for per compartment shape tables, bug 704372.
2011-11-21 20:29:05 -05:00
Nicholas Nethercote
6c6258e659
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
213017df51
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
14543f2542
Bug 699724 - Shrink js::HashTable. r=luke.
2011-11-08 21:02:11 -08:00
Nicholas Nethercote
9c3610847b
Bug 684800 - Measure slop in TI-related JS memory reporters. r=bhackett.
2011-11-01 21:59:43 -07:00