Commit Graph
176 Commits
Author SHA1 Message Date
Philippe Normand 10447eaa6c Bug 1402824 - Ensure mutationCount in HashTable.h is only used inside an JS_DEBUG ifdef. r=luke
This member variable is declared only in debug builds. This fixes the build
when this header is imported into non-unified builds.

This header is included in the build when xpcom/threads is built.

MozReview-Commit-ID: AF3YUqvVqET
2017-09-25 10:32:01 +01:00
Sebastian Hengst 485351ba05 Backed out changeset 2d59a91b2f2d (bug 1402824) for build bustage (mozilla/LabeledEventQueue.h not found). r=backout on a CLOSED TREE 2017-09-26 10:39:27 +02:00
Philippe Normand 4efae2ef54 Bug 1402824 - Ensure mutationCount in HashTable.h is only used inside an JS_DEBUG ifdef. r=luke
This member variable is declared only in debug builds. This fixes the build
when this header is imported into non-unified builds.

This header is included in the build when xpcom/threads is built.

MozReview-Commit-ID: AF3YUqvVqET
2017-09-25 10:32:01 +01:00
Ting-Yu Chou 6b335a1af0 Bug 1385181 - Avoid excess copying when return from HashTable::lookupForAdd(). r=luke
MozReview-Commit-ID: F95DCc1wvkE
2017-08-01 17:00:39 +08:00
Wes Kocher e7687d5b8a Backed out changeset e94dceac8090 (bug 1385181) for causing bug 1386011 (CCov build bustage) a=bustage
MozReview-Commit-ID: BK2XP0pcoE8
2017-07-31 22:12:03 -07:00
Ting-Yu Chou 4102147093 Bug 1385181 - Alter HashTable::lookupForAdd() to remove a redundant copy when return. r=luke
MozReview-Commit-ID: 9XnlC0JXETX
2017-07-28 14:05:40 +08:00
Ehsan Akhgari db113faac8 Bug 1382324 - Improve SpiderMonkey's pointer hashing function for pointers to neighboring memory locations; r=jandem
This is very similar to the fix to bug 1379282 for the XPCOM hashtables.
2017-07-20 12:23:07 -04:00
Jon Coppeard 456b0c20b7 Bug 1372875 - Add more assertions for hash table pointer generation and mutation count r=luke 2017-06-16 10:05:55 +01:00
Jon Coppeard e0a640dd44 Bug 1341367 - Make the sense of HashTable::Ptr::isValid match its name r=luke 2017-06-06 11:25:57 +01:00
Jon Coppeard e2d994c89a Bug 1370069 - Fix several issues with incremental atom sweeping r=sfink 2017-06-06 09:46:15 +01:00
Jon Coppeard 96511a2283 Bug 1365654 - Add a move constructor to HashTable::Enum r=luke 2017-05-18 16:22:00 +01:00
Jan de Mooij 87bf19401f Bug 1350760 part 6 - Add a Zone cache for recently atomized strings. r=jonco 2017-03-31 10:54:16 +02:00
Jan de Mooij 1ae97de3f1 Bug 1350760 part 5 - Make sure various hashtable lookups get inlined when atomizing strings. r=luke 2017-03-31 10:53:39 +02:00
Jeff Walden d33e8613b2 Bug 1246061 - Add some comments. r=luke 2016-03-23 13:21:02 -07:00
Jon Coppeard a8f38ffade Bug 1260785 - Make hashcode generation fallible for cell pointers that can be moved by GC r=terrence 2016-07-13 10:20:00 +01:00
Jan de Mooij cac751e8e9 Bug 1269319 followup - Don't swap an entry with itself to avoid Variant self assignment. r=bustage 2016-05-21 18:08:30 +02:00
Jan de Mooij b94199ed72 Bug 1269319 - Make AlignedStorage/AlignedStorage2 non-copyable to fix strict aliasing issues. r=Waldo 2016-05-19 20:57:36 +02:00
Nicholas Nethercote 26b6e79d96 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX
2016-04-27 14:16:50 +10:00
Shu-yu Guo 6e1c2a843d Bug 1265956 - Assert that no entry is found in HashTable::putNew. (r=terrence) 2016-04-20 14:52:12 -07:00
Jeff Walden 85a717f285 Bug 1246061. r=jandem, r=bz, r=luke, r=froydnj 2016-03-09 00:37:20 -08:00
Luke Wagner 71e9479dce Bug 1234985 - Hoist CStringHasher (r=sfink) 2016-01-20 12:00:21 -06:00
Luke Wagner c9adf369ac Bug 1239601 - improve the UniquePtr situation (r=jorendorff) 2016-01-15 18:26:06 -06:00
Terrence Cole fa9064ea99 Bug 1239515 - Simplify HashSet's key-overwriting interface; r=sunfish 2016-01-14 09:43:30 -08:00
Jim Blandy 91a70554e0 Bug 1236801: Don't check for simulated OOM in a way that invalidates AddPtrs for no discernable reason. (Revised to fix uninitialized var, r=sfink) r=jonco 2016-01-12 16:49:45 -08:00
Wes Kocher f9b049098b Backed out changeset 7111837e42b9 (bug 1236801) for SM wError bustage 2016-01-12 16:55:12 -08:00
Jim Blandy fac758d5cd Bug 1236801: Don't check for simulated OOM in a way that invalidates AddPtrs for no discernable reason. r=jonco 2016-01-08 10:01:53 -08:00
Jon Coppeard d7f739d415 Bug 1232672 - Use MOZ_WARN_UNUSED_RESULT to make hash table clients check for failure r=luke r=billm r=njn 2015-12-22 13:29:43 +00:00
Jon Coppeard 109829c8f1 Bug 1207519 - Prevent HashTable shrink from ignoring allocation failures that may have been reported r=Waldo 2015-09-30 11:34:49 +01:00
Jon Coppeard 9ab68eba4e Bug 1200642 - Add OOM simulation to hastables r=terrence 2015-09-30 11:34:49 +01:00
Terrence Cole 8abd842597 Bug 1196847 - Part 2: Implement a cell hasher that uses unique id based hashes; r=jonco 2015-08-26 14:51:35 -07:00
Terrence Cole f0d9e8f78f Bug 1196847 - Part 1: Allow storage of a unique id for a cell independent of address; r=jonco
* * *
imported patch rewrite_uid_on_ht_with_zone_sweeping
2015-08-20 10:35:22 -07:00
Terrence Cole 76cb0517aa Backout cca86cd156cf (Bug 1196847) for regressing EarleyBoyer. 2015-09-28 14:57:16 -07:00
Terrence Cole 359c2df69b Backout 74608aa063b9 (Bug 1196847) for regressing EarleyBoyer. 2015-09-28 14:56:57 -07:00
Terrence Cole e71d71456e Bug 1196847 - Part 2: Implement a cell hasher that uses unique id based hashes; r=jonco 2015-08-26 14:51:35 -07:00
Terrence Cole 2840f5e6d8 Bug 1196847 - Part 1: Allow storage of a unique id for a cell independent of address; r=jonco
* * *
imported patch rewrite_uid_on_ht_with_zone_sweeping
2015-08-20 10:35:22 -07:00
Terrence Cole 2a7d3fe4f4 Backout 7f6585a46cd0 (Bug 1196847) for being on top of a regression. 2015-09-03 09:37:19 -07:00
Terrence Cole 2b6a504d51 Bug 1196847 - Part 2: Implement a cell hasher that uses unique id based hashes; r=jonco 2015-08-26 14:51:35 -07:00
Nick Fitzgerald f219652117 Bug 1187399 - Add a js::DefaultHasher specialization for mozilla::UniquePtr<T> that proxies the UniquePtr's raw pointer to PointerHasher. r=terrence 2015-07-24 10:42:00 -04:00
Birunthan Mohanathas a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jan de Mooij 75afa21431 Bug 1144366 followup - Stop declaring multiple pointers on a single line. r=jorendorff 2015-04-02 11:22:21 +02:00
Jon Coppeard dfc696d009 Bug 1149135 - Don't create HashMapEntry on stack when adding to a HashMap r=luke 2015-04-01 10:11:06 +01:00
Jan de Mooij c6596c5fa8 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 23:22:11 +01:00
Phil Ringnalda 1a1c158706 Backed out changeset 0c030f97a04f (bug 1144366) for being on top of patches being backed out
CLOSED TREE
2015-03-28 10:39:56 -07:00
Jan de Mooij 369ef1b850 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Brian Hackett 65c0af280b Bug 1143521 - Remove IsPoisonedPtr stuff, r=sfink. 2015-03-18 18:01:35 -07:00
Nick Fitzgerald 2d59954d12 Bug 1139217 - Make js::HashSet<T> work with move-only T types; r=luke 2015-03-03 17:54:00 +01:00
Jon Coppeard 127c7e4901 Bug 1136046 - Increase maximum capacity of js::HashMap and HashSet r=luke 2015-02-26 09:02:13 +00:00
Nicholas Nethercote 4636a025ad Bug 979293 - Don't write collision bits in HashTable unnecessarily. r=luke.
This avoids no-op writes to the keyHash of entries when doing a no-add-lookup.
This removes a genuine data race in JSRuntime::permanentAtoms, which receives
frequent no-add-lookups from multiple threads after JSRuntime initialization
without any kind of locking.
2015-02-25 10:39:46 -08:00
Dan Gohman a423f47fe2 Bug 1131783 - Mark various unlikely conditions as MOZ_UNLIKELY r=waldo 2015-02-12 08:37:01 -08:00
Birunthan Mohanathas 7f80d25ce3 Bug 1120796 - Part 2: Replace ConvertibleToBool hackarounds with explicit bool operators. r=Waldo 2015-02-03 18:52:36 +02:00