Commit e54f907
"improve" allocations macro with more functions (#58057)
Change the implementation of the allocations to always add a function
call (closure) wrapper so that the inner code can be optimized, even if
the outer scope is `@latestworld`. The implementation creates a closure
if necessary (the code is complex) or just makes a call if the
expression is simple (just a call on symbols). Many packages in the
wild are observed to already be doing this themselves.
(cherry picked from commit a47b58f)1 parent a2afe89 commit e54f907
3 files changed
+47
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
475 | 504 | | |
476 | 505 | | |
477 | 506 | | |
| |||
487 | 516 | | |
488 | 517 | | |
489 | 518 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 519 | + | |
| 520 | + | |
498 | 521 | | |
| 522 | + | |
| 523 | + | |
499 | 524 | | |
500 | 525 | | |
501 | 526 | | |
| |||
516 | 541 | | |
517 | 542 | | |
518 | 543 | | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
| 544 | + | |
| 545 | + | |
525 | 546 | | |
| 547 | + | |
| 548 | + | |
526 | 549 | | |
527 | 550 | | |
| 551 | + | |
528 | 552 | | |
529 | 553 | | |
530 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments