Commit 32ba16f
Remove caching of cheap collection views across
(like e87d019 and 0a8e1ec but for a wider variety of collections)
This includes removing `ViewCachingAbstractMap` entirely in favor of using `AbstractMap` directly.
For J2ObjC safety, I removed `@Weak` and `@WeakOuter` annotations now that there is no reference cycle between the outer collection and its view collections. (Really, we should have used `@RetainedWith` instead of `@Weak*`, anyway, so this CL improves fixes existing issues in addition to perhaps preventing new ones. For more on `@RetainedWith`, see cl/781580713.) Parts of the `@Weak*` changes should have been done as part of 0a8e1ec for `Compact*HashMap`.
_Not_ covered in this CL:
- various other cached views that might benefit, such as `RegularImmutableSet.asList` (cl/922882558)
- views that I worry at least a little more about, mainly "invertible operations" (`BiMap.inverse`, `NavigableSet.descendingSet`, etc.)
- maybe migrating off `AbstractMap` in some additional cases in which it would make sense to avoid inheriting its fields
- GWT/J2CL
RELNOTES=n/a
PiperOrigin-RevId: 973885682common.collect.1 parent f516e75 commit 32ba16f
82 files changed
Lines changed: 311 additions & 1414 deletions
File tree
- android
- guava-tests
- benchmark/com/google/common/collect
- test/com/google/common/collect
- guava/src/com/google/common/collect
- guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect
- guava-tests
- benchmark/com/google/common/collect
- test/com/google/common/collect
- guava/src/com/google/common/collect
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
Lines changed: 3 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | | - | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
208 | 206 | | |
209 | 207 | | |
210 | 208 | | |
211 | | - | |
212 | | - | |
213 | 209 | | |
214 | 210 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 211 | + | |
220 | 212 | | |
221 | 213 | | |
222 | | - | |
223 | 214 | | |
224 | 215 | | |
225 | 216 | | |
| |||
256 | 247 | | |
257 | 248 | | |
258 | 249 | | |
259 | | - | |
260 | | - | |
261 | 250 | | |
262 | 251 | | |
263 | 252 | | |
264 | 253 | | |
265 | 254 | | |
266 | 255 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 256 | + | |
272 | 257 | | |
273 | 258 | | |
274 | | - | |
275 | 259 | | |
276 | 260 | | |
277 | 261 | | |
| |||
302 | 286 | | |
303 | 287 | | |
304 | 288 | | |
305 | | - | |
306 | | - | |
307 | 289 | | |
308 | 290 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 291 | + | |
314 | 292 | | |
315 | 293 | | |
316 | 294 | | |
| |||
371 | 349 | | |
372 | 350 | | |
373 | 351 | | |
374 | | - | |
375 | 352 | | |
376 | 353 | | |
377 | 354 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
Lines changed: 10 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
327 | 326 | | |
328 | 327 | | |
329 | 328 | | |
330 | | - | |
331 | 329 | | |
332 | 330 | | |
333 | 331 | | |
| |||
605 | 603 | | |
606 | 604 | | |
607 | 605 | | |
608 | | - | |
609 | 606 | | |
610 | 607 | | |
611 | 608 | | |
| |||
632 | 629 | | |
633 | 630 | | |
634 | 631 | | |
635 | | - | |
636 | 632 | | |
637 | 633 | | |
638 | 634 | | |
| |||
691 | 687 | | |
692 | 688 | | |
693 | 689 | | |
694 | | - | |
695 | 690 | | |
696 | 691 | | |
697 | 692 | | |
| |||
769 | 764 | | |
770 | 765 | | |
771 | 766 | | |
772 | | - | |
773 | 767 | | |
774 | 768 | | |
775 | 769 | | |
| |||
926 | 920 | | |
927 | 921 | | |
928 | 922 | | |
929 | | - | |
| 923 | + | |
930 | 924 | | |
931 | 925 | | |
932 | 926 | | |
| |||
940 | 934 | | |
941 | 935 | | |
942 | 936 | | |
943 | | - | |
944 | 937 | | |
945 | 938 | | |
946 | 939 | | |
| |||
1011 | 1004 | | |
1012 | 1005 | | |
1013 | 1006 | | |
1014 | | - | |
1015 | 1007 | | |
1016 | 1008 | | |
1017 | 1009 | | |
| |||
1054 | 1046 | | |
1055 | 1047 | | |
1056 | 1048 | | |
1057 | | - | |
1058 | 1049 | | |
1059 | 1050 | | |
1060 | 1051 | | |
| |||
1211 | 1202 | | |
1212 | 1203 | | |
1213 | 1204 | | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | 1205 | | |
1220 | 1206 | | |
1221 | 1207 | | |
| |||
1230 | 1216 | | |
1231 | 1217 | | |
1232 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1233 | 1224 | | |
1234 | 1225 | | |
1235 | 1226 | | |
1236 | 1227 | | |
1237 | 1228 | | |
1238 | 1229 | | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | 1230 | | |
1245 | 1231 | | |
1246 | 1232 | | |
| |||
1252 | 1238 | | |
1253 | 1239 | | |
1254 | 1240 | | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | 1241 | | |
1261 | 1242 | | |
1262 | 1243 | | |
| |||
1283 | 1264 | | |
1284 | 1265 | | |
1285 | 1266 | | |
1286 | | - | |
| 1267 | + | |
1287 | 1268 | | |
1288 | 1269 | | |
1289 | 1270 | | |
| |||
1297 | 1278 | | |
1298 | 1279 | | |
1299 | 1280 | | |
1300 | | - | |
1301 | | - | |
| 1281 | + | |
1302 | 1282 | | |
1303 | 1283 | | |
1304 | 1284 | | |
| |||
1310 | 1290 | | |
1311 | 1291 | | |
1312 | 1292 | | |
1313 | | - | |
| 1293 | + | |
1314 | 1294 | | |
1315 | 1295 | | |
1316 | 1296 | | |
| |||
1390 | 1370 | | |
1391 | 1371 | | |
1392 | 1372 | | |
1393 | | - | |
1394 | 1373 | | |
1395 | 1374 | | |
1396 | 1375 | | |
| |||
1449 | 1428 | | |
1450 | 1429 | | |
1451 | 1430 | | |
1452 | | - | |
1453 | 1431 | | |
1454 | 1432 | | |
1455 | 1433 | | |
| |||
1492 | 1470 | | |
1493 | 1471 | | |
1494 | 1472 | | |
1495 | | - | |
1496 | | - | |
1497 | 1473 | | |
1498 | 1474 | | |
1499 | 1475 | | |
1500 | 1476 | | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
1510 | 1477 | | |
1511 | 1478 | | |
1512 | 1479 | | |
| |||
1607 | 1574 | | |
1608 | 1575 | | |
1609 | 1576 | | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | 1577 | | |
1616 | 1578 | | |
1617 | 1579 | | |
| |||
0 commit comments