Commit ec819b2
committed
Added dictionary bridging end-to-end: BridgeJS now recognizes
Tests ran:
- `UPDATE_SNAPSHOTS=1 swift test --package-path ./Plugins/BridgeJS`
Files touched: `Plugins/BridgeJS/Sources/BridgeJSCore/{SwiftToSkeleton.swift,ExportSwift.swift,ImportTS.swift}`, `Plugins/BridgeJS/Sources/BridgeJSSkeleton/BridgeJSSkeleton.swift`, `Plugins/BridgeJS/Sources/BridgeJSLink/{BridgeJSLink.swift,JSGlueGen.swift}`, `Sources/JavaScriptKit/BridgeJSIntrinsics.swift`, new input/snapshots under `Plugins/BridgeJS/Tests/BridgeJSToolTests`.
If you want runtime coverage next, run `make unittest SWIFT_SDK_ID=DEVELOPMENT-SNAPSHOT-2025-11-03-a-wasm32-unknown-wasip1`.[String: T]/Dictionary<String, T> in SwiftToSkeleton, carries new .dictionary BridgeType through Swift export/import codegen, mangling, TS type resolution (Record<string, …>), JS glue (lower/lift + optional handling), and runtime intrinsics with stack-based key/value marshalling. New dictionary codegen input and snapshots cover primitives, optionals, nested arrays, and JSClass values (DictionaryTypes.swift plus snapshots). Updated optional lowering/lifting, array/dictionary combos, and return ABI metadata accordingly.1 parent 0ea3733 commit ec819b2
File tree
12 files changed
+1205
-6
lines changed- Plugins/BridgeJS
- Sources
- BridgeJSCore
- BridgeJSLink
- BridgeJSSkeleton
- Tests/BridgeJSToolTests
- Inputs/MacroSwift
- __Snapshots__
- BridgeJSCodegenTests
- BridgeJSLinkTests
- Sources/JavaScriptKit
12 files changed
+1205
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
835 | 837 | | |
836 | 838 | | |
837 | 839 | | |
| |||
849 | 851 | | |
850 | 852 | | |
851 | 853 | | |
852 | | - | |
| 854 | + | |
853 | 855 | | |
854 | 856 | | |
855 | 857 | | |
| |||
873 | 875 | | |
874 | 876 | | |
875 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
876 | 923 | | |
877 | 924 | | |
878 | 925 | | |
| |||
897 | 944 | | |
898 | 945 | | |
899 | 946 | | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
900 | 964 | | |
901 | 965 | | |
902 | 966 | | |
| |||
935 | 999 | | |
936 | 1000 | | |
937 | 1001 | | |
| 1002 | + | |
| 1003 | + | |
938 | 1004 | | |
939 | 1005 | | |
940 | 1006 | | |
| |||
952 | 1018 | | |
953 | 1019 | | |
954 | 1020 | | |
955 | | - | |
| 1021 | + | |
956 | 1022 | | |
957 | 1023 | | |
958 | 1024 | | |
| |||
986 | 1052 | | |
987 | 1053 | | |
988 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
989 | 1114 | | |
990 | 1115 | | |
991 | 1116 | | |
| |||
1033 | 1158 | | |
1034 | 1159 | | |
1035 | 1160 | | |
| 1161 | + | |
| 1162 | + | |
1036 | 1163 | | |
1037 | 1164 | | |
1038 | 1165 | | |
| |||
1616 | 1743 | | |
1617 | 1744 | | |
1618 | 1745 | | |
| 1746 | + | |
1619 | 1747 | | |
1620 | 1748 | | |
1621 | 1749 | | |
| |||
1675 | 1803 | | |
1676 | 1804 | | |
1677 | 1805 | | |
1678 | | - | |
| 1806 | + | |
1679 | 1807 | | |
1680 | 1808 | | |
1681 | 1809 | | |
| |||
1726 | 1854 | | |
1727 | 1855 | | |
1728 | 1856 | | |
1729 | | - | |
| 1857 | + | |
1730 | 1858 | | |
1731 | 1859 | | |
1732 | 1860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
983 | | - | |
| 983 | + | |
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
| 1062 | + | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
216 | 255 | | |
217 | 256 | | |
218 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1465 | 1468 | | |
1466 | 1469 | | |
1467 | 1470 | | |
| |||
3564 | 3567 | | |
3565 | 3568 | | |
3566 | 3569 | | |
| 3570 | + | |
| 3571 | + | |
3567 | 3572 | | |
3568 | 3573 | | |
3569 | 3574 | | |
| |||
0 commit comments