summaryrefslogtreecommitdiff
path: root/rts/ContinuationOps.cmm
Commit message (Collapse)AuthorAgeFilesLines
* rts: Fix `prompt#` when profiling is enabledAlexis King2023-02-231-2/+9
| | | | | | | | | This commit also adds a new -Dk RTS option to the debug RTS to assist debugging continuation captures. Currently, the printed information is quite minimal, but more can be added in the future if it proves to be useful when debugging future issues. fixes #23001
* rts: explicitly store return value of ccall checkClosure to prevent type ↵Ying-Ruei Liang (TheKK)2022-12-211-1/+2
| | | | error (#22617)
* Fix Cmm symbol kindCheng Shao2022-11-111-0/+17
|
* Add native delimited continuations to the RTSAlexis King2022-09-111-0/+209
This patch implements GHC proposal 313, "Delimited continuation primops", by adding native support for delimited continuations to the GHC RTS. All things considered, the patch is relatively small. It almost exclusively consists of changes to the RTS; the compiler itself is essentially unaffected. The primops come with fairly extensive Haddock documentation, and an overview of the implementation strategy is given in the Notes in rts/Continuation.c. This first stab at the implementation prioritizes simplicity over performance. Most notably, every continuation is always stored as a single, contiguous chunk of stack. If one of these chunks is particularly large, it can result in poor performance, as the current implementation does not attempt to cleverly squeeze a subset of the stack frames into the existing stack: it must fit all at once. If this proves to be a performance issue in practice, a cleverer strategy would be a worthwhile target for future improvements.