Commit da1ddcf
committed
Simplify internals of
This commit simplifies the internal implementation of `Default` for
these two pointer types to have the same performance characteristics as
before (a side effect of changes in 131460) while avoid use of internal
private APIs of Rc/Arc. To preserve the same codegen as before some
non-generic functions needed to be tagged as `#[inline]` as well, but
otherwise the same IR is produced before/after this change.
The motivation of this commit is I was studying up on the state of
initialization of `Arc` and `Rc` and figured it'd be nicer to reduce the
use of internal APIs and instead use public stable APIs where possible,
even in the implementation itself.{Rc,Arc}::default
1 parent 71dc761 commit da1ddcf
2 files changed
+18
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
2518 | 2519 | | |
2519 | 2520 | | |
2520 | 2521 | | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
2521 | 2526 | | |
2522 | | - | |
2523 | | - | |
2524 | | - | |
2525 | | - | |
2526 | | - | |
2527 | | - | |
2528 | | - | |
| 2527 | + | |
2529 | 2528 | | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
2530 | 2532 | | |
2531 | 2533 | | |
2532 | 2534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| |||
3724 | 3725 | | |
3725 | 3726 | | |
3726 | 3727 | | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
3727 | 3732 | | |
3728 | | - | |
3729 | | - | |
3730 | | - | |
3731 | | - | |
3732 | | - | |
3733 | | - | |
3734 | | - | |
3735 | | - | |
3736 | | - | |
3737 | | - | |
3738 | | - | |
| 3733 | + | |
3739 | 3734 | | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
3740 | 3738 | | |
3741 | 3739 | | |
3742 | 3740 | | |
| |||
0 commit comments