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: double translation of functions and dynamic switching between direct-style and CPS code #1461

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Commits on Nov 28, 2024

  1. Effects: double translation of functions and

    ... dynamic switching between direct-style and CPS code. (ocsigen#1461)
    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    72094da View commit details
    Browse the repository at this point in the history
  2. Add caml_assume_no_effects primitive and tests

    Passing a function [f] as argument of `caml_assume_no_effects`
    guarantees that, when compiling with `--enable doubletranslate`, the
    direct-style version of [f] is called, which is faster than the CPS
    version. As a consequence, performing an effect in a transitive callee
    of [f] will raise `Effect.Unhandled`, regardless of any effect handlers
    installed before the call to `caml_assume_no_effects`, unless a new
    effect handler was installed in the meantime.
    
    Usage:
    
    ```
    external assume_no_effects : (unit -> 'a) -> 'a = "caml_assume_no_effects"
    
    ... caml_assume_no_effects (fun () -> (* Will be called in direct style... *)) ...
    ```
    
    When double translation is disabled, `caml_assume_no_effects` simply
    acts like `fun f -> f ()`.
    
    This primitive is exposed via `Js_of_ocaml.Js.Effect.assume_no_perform`.
    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    70dad7c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9504cc8 View commit details
    Browse the repository at this point in the history
  4. CR: Commit suggestion for compiler/lib/driver.ml

    Co-authored-by: Jérôme Vouillon <[email protected]>
    OlivierNicole and vouillon committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    4dac096 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c6f7069 View commit details
    Browse the repository at this point in the history
  6. CR

    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    2dc3a66 View commit details
    Browse the repository at this point in the history
  7. CR

    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    2c48b89 View commit details
    Browse the repository at this point in the history
  8. Runtime format

    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    139a610 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    348b84b View commit details
    Browse the repository at this point in the history
  10. format

    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    ef1c1aa View commit details
    Browse the repository at this point in the history
  11. CR: make caml_callback an alias of caml_call_gen...

    ... when double translation is enabled.
    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    0d37bb7 View commit details
    Browse the repository at this point in the history
  12. Promote tests

    OlivierNicole committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    e2789ed View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    afefb03 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    2bdad0c View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2024

  1. Configuration menu
    Copy the full SHA
    537eb9d View commit details
    Browse the repository at this point in the history
  2. Format runtime

    OlivierNicole committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    c07a115 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7faec20 View commit details
    Browse the repository at this point in the history
  4. format

    OlivierNicole committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    6e9c29f View commit details
    Browse the repository at this point in the history
  5. Runtime: fix caml_uncaught_effect_handler

    We can use a single definition for the CPS transformation and the double
    translation. The definition for the CPS transformation was wrong, since
    it did not take a continuation as parameter.
    vouillon committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    0ef5deb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fd77831 View commit details
    Browse the repository at this point in the history