Commit 8cb4535
committed
BridgeJS: Optimize numeric array transfer with bulk TypedArray copy
Add bridgeJSStackPushAsArray/bridgeJSStackPopAsArray specialization
points to _BridgedSwiftStackType protocol. Numeric types override
bridgeJSStackPushAsArray with bulk TypedArray transfer via
swift_js_push_typed_array. Array.bridgeJSStackPush() delegates to
Element.bridgeJSStackPushAsArray() — no codegen changes needed.
JS arrayLift uses -1 count discriminator to detect bulk path and
pops pre-built Array from taStack instead of element-by-element.
Non-numeric arrays use the default element-by-element implementation.1 parent fc672e7 commit 8cb4535
55 files changed
Lines changed: 1208 additions & 362 deletions
File tree
- Plugins
- BridgeJS
- Sources/BridgeJSLink
- Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests
- PackageToJS/Templates
- Sources/JavaScriptKit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
489 | 490 | | |
490 | 491 | | |
491 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
492 | 508 | | |
493 | 509 | | |
494 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1888 | 1888 | | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | | - | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
1892 | 1896 | | |
1893 | 1897 | | |
1894 | 1898 | | |
1895 | 1899 | | |
1896 | 1900 | | |
1897 | 1901 | | |
1898 | 1902 | | |
1899 | | - | |
1900 | 1903 | | |
1901 | 1904 | | |
1902 | | - | |
1903 | | - | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
1904 | 1912 | | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1909 | 1923 | | |
| 1924 | + | |
| 1925 | + | |
1910 | 1926 | | |
1911 | 1927 | | |
1912 | | - | |
1913 | 1928 | | |
1914 | 1929 | | |
1915 | 1930 | | |
| |||
0 commit comments