Commit 5afa814
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 f1f290b commit 5afa814
53 files changed
Lines changed: 1212 additions & 362 deletions
File tree
- Plugins/BridgeJS
- Sources/BridgeJSLink
- Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests
- 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 | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
490 | 504 | | |
491 | 505 | | |
492 | 506 | | |
| |||
3594 | 3608 | | |
3595 | 3609 | | |
3596 | 3610 | | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
3597 | 3614 | | |
3598 | 3615 | | |
3599 | 3616 | | |
| |||
3630 | 3647 | | |
3631 | 3648 | | |
3632 | 3649 | | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
3633 | 3662 | | |
3634 | 3663 | | |
3635 | 3664 | | |
| |||
| 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