[Git][ghc/ghc][wip/T25641] StgToByteCode: Assert that PUSH_G'd values are lifted
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Tue Jan 28 21:46:52 UTC 2025
Ben Gamari pushed to branch wip/T25641 at Glasgow Haskell Compiler / GHC
Commits:
0e5c8400 by Ben Gamari at 2025-01-28T21:46:49+00:00
StgToByteCode: Assert that PUSH_G'd values are lifted
We currently do not support top-level unlifted data constructor applications,
therefore this is a safe assertion.
Pointed out by @sheaf.
- - - - -
1 changed file:
- compiler/GHC/StgToByteCode.hs
Changes:
=====================================
compiler/GHC/StgToByteCode.hs
=====================================
@@ -1954,6 +1954,11 @@ pushAtom d p (StgVarArg var)
return (unitOL (PUSH_ADDR (getName var)), szb)
| otherwise -> do
+ let varTy = idType var
+ massertPpr (definitelyLiftedType varTy) $
+ vcat [ text "pushAtom: unhandled unlifted type"
+ , text "var:" <+> ppr var <+> dcolon <+> ppr varTy <> dcolon <+> ppr (typeKind varTy)
+ ]
return (unitOL (PUSH_G (getName var)), szb)
pushAtom _ _ (StgLitArg lit) = pushLiteral True lit
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0e5c840054fbdfab751e13f02544ee3d78923947
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0e5c840054fbdfab751e13f02544ee3d78923947
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250128/a05eed88/attachment.html>
More information about the ghc-commits
mailing list