diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-12-30 09:37:25 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2021-01-01 15:09:51 +0000 |
commit | 9996197176094c56c8891f2504e7f8cce80aedac (patch) | |
tree | 07cfec071c609d20d8f8fc76de24655bd91c6e3c /compiler/GHC/CoreToByteCode.hs | |
parent | 2113a1d600e579bb0f54a0526a03626f105c0365 (diff) | |
download | haskell-wip/T19133.tar.gz |
Don't use absentError thunks for strict constructor fieldswip/T19133
This patch fixes #19133 by using LitRubbish for strict constructor
fields, even if they are of lifted types. Previously LitRubbish
worked only for unlifted (but boxed) types.
The change is very easy, although I needed a boolean field in
LitRubbish to say whether or not it is lifted. (That seemed easier
than giving it another type argument.
This is preparing for Andreas's work on establishing the invariant
that strict constructor fields are always tagged and evaluated
(see #16970).
Meanwhile, nothing was actually wrong before, so there are no tests.
Diffstat (limited to 'compiler/GHC/CoreToByteCode.hs')
-rw-r--r-- | compiler/GHC/CoreToByteCode.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/GHC/CoreToByteCode.hs b/compiler/GHC/CoreToByteCode.hs index e993688db9..31c40a9282 100644 --- a/compiler/GHC/CoreToByteCode.hs +++ b/compiler/GHC/CoreToByteCode.hs @@ -1655,13 +1655,13 @@ pushAtom _ _ (AnnLit lit) = do _ -> PUSH_UBX lit (trunc16W $ bytesToWords platform size_bytes) case lit of - LitLabel _ _ _ -> code AddrRep - LitFloat _ -> code FloatRep - LitDouble _ -> code DoubleRep - LitChar _ -> code WordRep + LitLabel {} -> code AddrRep + LitFloat {} -> code FloatRep + LitDouble {} -> code DoubleRep + LitChar {} -> code WordRep LitNullAddr -> code AddrRep - LitString _ -> code AddrRep - LitRubbish -> code WordRep + LitString {} -> code AddrRep + LitRubbish {} -> code WordRep LitNumber nt _ -> case nt of LitNumInt -> code IntRep LitNumWord -> code WordRep |