Commit 8fd4f8e
committed
[ADT] Consolidate the grow() logic in DenseMapBase (NFC)
This patch consolidates the grow() logic in DenseMapBase::grow.
With this patch, DenseMapBase::grow() creates a temporary grown
instance and then lets DenseMap/SmallDenseMap attempt to move the
instance back to *this. If it doesn't work, we move again.
The "attempt to move" always succeeds for DenseMap. For
SmallDenseMap, it succeeds only in the large mode.
This is part of the effort outlined in #168255.1 parent 49d5bb0 commit 8fd4f8e
1 file changed
+18
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
562 | 567 | | |
563 | 568 | | |
564 | 569 | | |
| |||
848 | 853 | | |
849 | 854 | | |
850 | 855 | | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
855 | 859 | | |
856 | 860 | | |
857 | 861 | | |
| |||
1120 | 1124 | | |
1121 | 1125 | | |
1122 | 1126 | | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1126 | 1130 | | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
1140 | 1137 | | |
1141 | 1138 | | |
1142 | 1139 | | |
| |||
0 commit comments