Eliminate stg_decodeStackzh
GHC.Stack.CloneStack.decode
is currently implemented in terms of stg_decodeStackzh
(defined in rts/CloneStack.c
). However, this implementation is rather inefficient (allocating an array of boxed Ptr
s to return to the caller) and overlaps heavily with the iterator-based stack decoding implementation now provided by ghc-heap
(see !9514 (closed)). We should move the stack decoding implementation from ghc-heap
into ghc-internal
and reimplement GHC.Stack.CloneStack.decode
in terms of it.