Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effects: keep track of CPS calls and distinguish CPS calls and trampolined calls #1648

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

OlivierNicole
Copy link
Contributor

This makes a more precise distinction between CPS calls and trampolined calls, and keeps track of both. It is used in wasm_of_ocaml to handle CPS calls.

This PR is the first in a series of PRs intending to reduce the diff between js_of_ocaml and wasm_of_ocaml, in order to merge the two repos eventually, or at least to ease integration of JSOO updates in WSOO.

@vouillon
Copy link
Member

CPS calls are calls that take a continuation as the last parameter. We also have direct calls which may make use of the trampoline: they are used to implement loops. In the current implementation, we don't really distinguish them since these direct calls are exact, and the JS implementation behaves the same for direct calls whether in CPS or not (just apply the function to all its arguments).
This is no longer true with wasm_of_ocaml where the two kind of functions have different types.
We also need to make the distinction for the double translation (#1461).

@hhugo hhugo merged commit 285902b into ocsigen:master Aug 3, 2024
17 of 18 checks passed
@OlivierNicole OlivierNicole deleted the converge-jsoo-tip-01 branch August 20, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants