Commit 296e146
committed
Rework runtime entrypoints for isolated conformance checking
Replace the pair of global actor type/conformance we are passing around with
a general "conformance execution context" that could grow new functionality
over time. Add three external symbols to the runtime:
* swift_conformsToProtocolWithExecutionContext: a conforms-to-protocol check
that also captures the execution context that should be checked before
using the conformance for anything. The only execution context right now
is for an isolated conformance.
* swift_isInConformanceExecutionContext: checks whether the function is
being executed in the given execution context, i.e., running on the
executor for the given global actor.
* swift_ConformanceExecutionContextSize: the size of the conformance
execution context. Client code outside of the Swift runtime can allocate
a pointer-aligned region of memory of this size to use with the runtime
functions above.1 parent 48aa75d commit 296e146
File tree
9 files changed
+167
-118
lines changed- include/swift
- ABI
- Runtime
- stdlib/public
- CompatibilityOverride
- runtime
- test/abi/macOS/arm64
9 files changed
+167
-118
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2745 | 2745 | | |
2746 | 2746 | | |
2747 | 2747 | | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2748 | 2752 | | |
2749 | 2753 | | |
2750 | 2754 | | |
| |||
2885 | 2889 | | |
2886 | 2890 | | |
2887 | 2891 | | |
2888 | | - | |
2889 | | - | |
2890 | | - | |
2891 | | - | |
2892 | | - | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
2893 | 2895 | | |
2894 | 2896 | | |
2895 | | - | |
2896 | | - | |
| 2897 | + | |
2897 | 2898 | | |
2898 | 2899 | | |
2899 | 2900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
263 | 267 | | |
264 | 268 | | |
265 | | - | |
266 | | - | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | | - | |
| 272 | + | |
270 | 273 | | |
271 | 274 | | |
272 | | - | |
273 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
274 | 288 | | |
275 | 289 | | |
276 | 290 | | |
| |||
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
538 | | - | |
| 537 | + | |
539 | 538 | | |
540 | 539 | | |
541 | | - | |
542 | | - | |
543 | | - | |
| 540 | + | |
| 541 | + | |
544 | 542 | | |
545 | 543 | | |
546 | 544 | | |
| |||
612 | 610 | | |
613 | 611 | | |
614 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
615 | 629 | | |
616 | 630 | | |
617 | 631 | | |
| |||
629 | 643 | | |
630 | 644 | | |
631 | 645 | | |
632 | | - | |
633 | | - | |
| 646 | + | |
| 647 | + | |
634 | 648 | | |
635 | 649 | | |
636 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1384 | 1384 | | |
1385 | 1385 | | |
1386 | 1386 | | |
1387 | | - | |
1388 | | - | |
| 1387 | + | |
| 1388 | + | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| |||
1867 | 1867 | | |
1868 | 1868 | | |
1869 | 1869 | | |
| 1870 | + | |
1870 | 1871 | | |
1871 | 1872 | | |
1872 | 1873 | | |
| |||
1881 | 1882 | | |
1882 | 1883 | | |
1883 | 1884 | | |
1884 | | - | |
| 1885 | + | |
1885 | 1886 | | |
1886 | 1887 | | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
1887 | 1891 | | |
1888 | 1892 | | |
1889 | 1893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1603 | 1603 | | |
1604 | 1604 | | |
1605 | 1605 | | |
1606 | | - | |
| 1606 | + | |
1607 | 1607 | | |
1608 | 1608 | | |
1609 | 1609 | | |
| |||
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
2048 | | - | |
| 2048 | + | |
2049 | 2049 | | |
2050 | 2050 | | |
2051 | 2051 | | |
| |||
3059 | 3059 | | |
3060 | 3060 | | |
3061 | 3061 | | |
3062 | | - | |
| 3062 | + | |
3063 | 3063 | | |
3064 | 3064 | | |
3065 | 3065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
574 | 573 | | |
575 | 574 | | |
576 | 575 | | |
| |||
579 | 578 | | |
580 | 579 | | |
581 | 580 | | |
582 | | - | |
583 | | - | |
| 581 | + | |
584 | 582 | | |
585 | 583 | | |
586 | 584 | | |
| |||
685 | 683 | | |
686 | 684 | | |
687 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
688 | 699 | | |
689 | 700 | | |
690 | 701 | | |
691 | 702 | | |
692 | 703 | | |
693 | 704 | | |
694 | 705 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
| 706 | + | |
| 707 | + | |
701 | 708 | | |
702 | 709 | | |
703 | 710 | | |
704 | 711 | | |
705 | 712 | | |
706 | | - | |
707 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
708 | 725 | | |
709 | 726 | | |
710 | 727 | | |
| |||
0 commit comments