summaryrefslogtreecommitdiffstats
path: root/Python/emscripten_trampoline.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.14] gh-128627: Emscripten: Add missing semicolon in ios detection code ↵Miss Islington (bot)2025-06-161-1/+1
| | | | | | | (GH-135590) (#135592) (cherry picked from commit 68b7e1a6677d7a8fb47fbd28cb5d39a87217273c) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.14] gh-128627: Fix iPad detection in wasm-gc (GH-135388) (#135419)Miss Islington (bot)2025-06-121-1/+10
| | | | | | | On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection to add a feature-based check to detect this case. (cherry picked from commit d4471297586335d8c24db8b2c030d32c94570344) Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
* [3.14] gh-106213: Shorten Emscripten wasm-gc trampoline by a little ↵Miss Islington (bot)2025-05-201-37/+21
| | | | | | | | (GH-133984) (#134376) Using the if instruction results in slightly shorter trampoline code. (cherry picked from commit 3b7888bf3d43b903f0a7ebd16f39d8bb61dfbb9e) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* gh-128627: Skip wasm-gc on iOS Safari where it's broken (#130418)Łukasz Langa2025-02-231-3/+13
| | | | | | As of iOS 18.3.1, enabling wasm-gc breaks the interpreter. This disables the wasm-gc trampoline on iOS. Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* gh-128627: Emscripten: Fix address calculation for wasm-gc trampoline (#128782)Hood Chatham2025-01-231-9/+7
| | | | Modifies the memory calculation to divide the entire memory address by 4, not just the base address.
* gh-128627: Emscripten: Use wasm-gc based call adaptor if available (#128628)Hood Chatham2025-01-121-52/+177
| | | | | | Replaces the trampoline mechanism in Emscripten with an implementation that uses a recently added feature of wasm-gc instead of JS type reflection, when that feature is available.
* gh-121698 Emscripten: Use updated WebAssembly type reflection proposal ↵Hood Chatham2024-07-141-2/+12
| | | | (GH-121699)
* gh-106213: Make Emscripten trampolines work with JSPI (GH-106219)Hood Chatham2023-09-151-0/+82
There is a WIP proposal to enable webassembly stack switching which have been implemented in v8: https://github.com/WebAssembly/js-promise-integration It is not possible to switch stacks that contain JS frames so the Emscripten JS trampolines that allow calling functions with the wrong number of arguments don't work in this case. However, the js-promise-integration proposal requires the [type reflection for Wasm/JS API](https://github.com/WebAssembly/js-types) proposal, which allows us to actually count the number of arguments a function expects. For better compatibility with stack switching, this PR checks if type reflection is available, and if so we use a switch block to decide the appropriate signature. If type reflection is unavailable, we should use the current EMJS trampoline. We cache the function argument counts since when I didn't cache them performance was negatively affected. Co-authored-by: T. Wouters <thomas@python.org> Co-authored-by: Brett Cannon <brett@python.org>