Commit c1b87ad
committed
Enabled import-side arrays. Updated
Tests: `UPDATE_SNAPSHOTS=1 swift test --package-path ./Plugins/BridgeJS --filter BridgeJSCodegenTests` followed by `swift test --package-path ./Plugins/BridgeJS --filter BridgeJSCodegenTests` (pass).
Next steps: 1) Run the full BridgeJS test suite (`swift test --package-path ./Plugins/BridgeJS`) to ensure wider coverage. 2) Consider runtime-side coverage (e.g., `make unittest` with `JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS=1`) if you want to exercise the new import path end-to-end.Plugins/BridgeJS/Sources/BridgeJSCore/ImportTS.swift to allow array lowering/lifting (stack-based, no ABI params) and to handle stack-only parameters in CallJSEmission. Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift now lifts array parameters and lowers array returns for imported JS functions using existing array fragments. Sources/JavaScriptKit/BridgeJSIntrinsics.swift gives Array stack bridging conformance plus import helpers (bridgeJSLowerParameter, bridgeJSLiftReturn, bridgeJSLowerStackReturn), covering nested arrays. Added Plugins/BridgeJS/Tests/BridgeJSToolTests/Inputs/MacroSwift/ImportArray.swift with corresponding snapshots for JSFunction array imports.1 parent e55d927 commit c1b87ad
File tree
15 files changed
+1427
-63
lines changed- Plugins/BridgeJS
- Sources
- BridgeJSCore
- BridgeJSLink
- Tests/BridgeJSToolTests
- Inputs/MacroSwift
- __Snapshots__
- BridgeJSCodegenTests
- BridgeJSLinkTests
- Sources/JavaScriptKit
- Tests
- BridgeJSRuntimeTests
- Generated
- JavaScript
15 files changed
+1427
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
108 | 105 | | |
109 | 106 | | |
110 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
111 | 136 | | |
112 | 137 | | |
113 | 138 | | |
| |||
166 | 191 | | |
167 | 192 | | |
168 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
169 | 197 | | |
170 | 198 | | |
171 | 199 | | |
| |||
183 | 211 | | |
184 | 212 | | |
185 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
186 | 217 | | |
187 | 218 | | |
188 | 219 | | |
| |||
922 | 953 | | |
923 | 954 | | |
924 | 955 | | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
932 | 959 | | |
933 | 960 | | |
934 | 961 | | |
| |||
952 | 979 | | |
953 | 980 | | |
954 | 981 | | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
| 982 | + | |
961 | 983 | | |
962 | 984 | | |
963 | 985 | | |
| |||
1011 | 1033 | | |
1012 | 1034 | | |
1013 | 1035 | | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
1021 | 1039 | | |
1022 | 1040 | | |
1023 | 1041 | | |
| |||
1039 | 1057 | | |
1040 | 1058 | | |
1041 | 1059 | | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
| 1060 | + | |
1048 | 1061 | | |
1049 | 1062 | | |
1050 | 1063 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2147 | 2147 | | |
2148 | 2148 | | |
2149 | 2149 | | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
2153 | | - | |
2154 | 2150 | | |
2155 | | - | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
2156 | 2154 | | |
2157 | 2155 | | |
2158 | 2156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1565 | 1565 | | |
1566 | 1566 | | |
1567 | 1567 | | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
| 1568 | + | |
1576 | 1569 | | |
1577 | 1570 | | |
1578 | 1571 | | |
| |||
1640 | 1633 | | |
1641 | 1634 | | |
1642 | 1635 | | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
| 1636 | + | |
1651 | 1637 | | |
1652 | 1638 | | |
1653 | 1639 | | |
| |||
2756 | 2742 | | |
2757 | 2743 | | |
2758 | 2744 | | |
2759 | | - | |
2760 | | - | |
2761 | | - | |
2762 | | - | |
2763 | | - | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
2764 | 2749 | | |
2765 | 2750 | | |
2766 | 2751 | | |
| |||
3090 | 3075 | | |
3091 | 3076 | | |
3092 | 3077 | | |
3093 | | - | |
| 3078 | + | |
3094 | 3079 | | |
3095 | 3080 | | |
3096 | 3081 | | |
| |||
3100 | 3085 | | |
3101 | 3086 | | |
3102 | 3087 | | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
3103 | 3106 | | |
3104 | 3107 | | |
3105 | | - | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
3106 | 3119 | | |
3107 | 3120 | | |
3108 | 3121 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments