Commit dcf8cd9
authored
[ADT] Consolidate the grow() logic in DenseMapBase (NFC) (#168316)
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 bf21156 commit dcf8cd9
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 | | |
| |||
842 | 847 | | |
843 | 848 | | |
844 | 849 | | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
849 | 853 | | |
850 | 854 | | |
851 | 855 | | |
| |||
1110 | 1114 | | |
1111 | 1115 | | |
1112 | 1116 | | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
1116 | 1120 | | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
1130 | 1127 | | |
1131 | 1128 | | |
1132 | 1129 | | |
| |||
0 commit comments