Commit 3217dbc
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 89ed56e commit 3217dbc
File tree
13 files changed
+1151
-63
lines changed- Plugins/BridgeJS
- Sources
- BridgeJSCore
- BridgeJSLink
- Tests/BridgeJSToolTests
- Inputs/MacroSwift
- __Snapshots__/BridgeJSCodegenTests
- Sources/JavaScriptKit
- Tests
- BridgeJSRuntimeTests
- Generated
- JavaScript
13 files changed
+1151
-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 | | |
| |||
900 | 931 | | |
901 | 932 | | |
902 | 933 | | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
910 | 937 | | |
911 | 938 | | |
912 | 939 | | |
| |||
935 | 962 | | |
936 | 963 | | |
937 | 964 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
| 965 | + | |
944 | 966 | | |
945 | 967 | | |
946 | 968 | | |
| |||
994 | 1016 | | |
995 | 1017 | | |
996 | 1018 | | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1004 | 1022 | | |
1005 | 1023 | | |
1006 | 1024 | | |
| |||
1027 | 1045 | | |
1028 | 1046 | | |
1029 | 1047 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
| 1048 | + | |
1036 | 1049 | | |
1037 | 1050 | | |
1038 | 1051 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2146 | 2146 | | |
2147 | 2147 | | |
2148 | 2148 | | |
2149 | | - | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
2153 | 2149 | | |
2154 | | - | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
2155 | 2153 | | |
2156 | 2154 | | |
2157 | 2155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1553 | 1553 | | |
1554 | 1554 | | |
1555 | 1555 | | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
| 1556 | + | |
1564 | 1557 | | |
1565 | 1558 | | |
1566 | 1559 | | |
| |||
1635 | 1628 | | |
1636 | 1629 | | |
1637 | 1630 | | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
| 1631 | + | |
1646 | 1632 | | |
1647 | 1633 | | |
1648 | 1634 | | |
| |||
2740 | 2726 | | |
2741 | 2727 | | |
2742 | 2728 | | |
2743 | | - | |
2744 | | - | |
2745 | | - | |
2746 | | - | |
2747 | | - | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
2748 | 2733 | | |
2749 | 2734 | | |
2750 | 2735 | | |
| |||
3074 | 3059 | | |
3075 | 3060 | | |
3076 | 3061 | | |
3077 | | - | |
| 3062 | + | |
3078 | 3063 | | |
3079 | 3064 | | |
3080 | 3065 | | |
| |||
3084 | 3069 | | |
3085 | 3070 | | |
3086 | 3071 | | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
3087 | 3090 | | |
3088 | 3091 | | |
3089 | | - | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
3090 | 3103 | | |
3091 | 3104 | | |
3092 | 3105 | | |
| |||
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 | + | |
0 commit comments