Skip to content
  • Luite Stegeman's avatar
    b4c14c4b
    Add PrimCallConv support to GHCi · b4c14c4b
    Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
    This adds support for calling Cmm code from bytecode using the native
    calling convention, allowing modules that use `foreign import prim`
    to be loaded and debugged in GHCi.
    
    This patch introduces a new `PRIMCALL` bytecode instruction and
    a helper stack frame `stg_primcall`. The code is based on the
    existing functionality for dealing with unboxed tuples in bytecode,
    which has been generalised to handle arbitrary calls.
    
    Fixes #22051
    b4c14c4b
    Add PrimCallConv support to GHCi
    Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
    This adds support for calling Cmm code from bytecode using the native
    calling convention, allowing modules that use `foreign import prim`
    to be loaded and debugged in GHCi.
    
    This patch introduces a new `PRIMCALL` bytecode instruction and
    a helper stack frame `stg_primcall`. The code is based on the
    existing functionality for dealing with unboxed tuples in bytecode,
    which has been generalised to handle arbitrary calls.
    
    Fixes #22051
Loading