Make BCO# lifted
In #17424 Simon PJ noted that there is a potentially unsafe occurrence of unsafeCoerce#, coercing from an unlifted to lifted type. However, nowhere in the compiler do we assume that a BCO# is not a thunk. Moreover, in the case of a CAF the result returned by `createBCO` *will* be a thunk (as noted in [Updatable CAF BCOs]). Consequently it seems better to rather make BCO# a lifted type and rename it to BCO.
Showing
- compiler/prelude/TysPrim.hs 5 additions, 2 deletionscompiler/prelude/TysPrim.hs
- compiler/prelude/primops.txt.pp 3 additions, 3 deletionscompiler/prelude/primops.txt.pp
- libraries/ghc-heap/tests/closure_size.hs 0 additions, 1 deletionlibraries/ghc-heap/tests/closure_size.hs
- libraries/ghc-heap/tests/heap_all.hs 2 additions, 4 deletionslibraries/ghc-heap/tests/heap_all.hs
- libraries/ghci/GHCi/CreateBCO.hs 12 additions, 11 deletionslibraries/ghci/GHCi/CreateBCO.hs
- utils/genprimopcode/Main.hs 1 addition, 1 deletionutils/genprimopcode/Main.hs
Please register or sign in to comment