diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2023-04-11 06:07:35 +0000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2023-04-26 10:35:06 +0000 |
commit | eba7b247f31a420cae64d0ee87d7296bf434724e (patch) | |
tree | ff20a73518f78cfa52a6cd7c2b956b98d8a1dd33 /compiler/GHC/StgToByteCode.hs | |
parent | 74c557121fbcae32abd3b4a69513f8aa7d536073 (diff) | |
download | haskell-wip/js-stgrhsclosure.tar.gz |
Refactor GenStgRhs to include the Type in both constructors (#23280, #22576, #22364)wip/js-stgrhsclosure
Carry the actual type of an expression through the PreStgRhs and into GenStgRhs
for use in later stages. Currently this is used in the JavaScript backend to fix
some tests from the above mentioned issues: EtaExpandLevPoly, RepPolyWrappedVar2,
T13822, T14749.
Diffstat (limited to 'compiler/GHC/StgToByteCode.hs')
-rw-r--r-- | compiler/GHC/StgToByteCode.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs index da3c055411..a6eebe9bc9 100644 --- a/compiler/GHC/StgToByteCode.hs +++ b/compiler/GHC/StgToByteCode.hs @@ -350,8 +350,8 @@ schemeR fvs (nm, rhs) -- underlying expression collect :: CgStgRhs -> ([Var], CgStgExpr) -collect (StgRhsClosure _ _ _ args body) = (args, body) -collect (StgRhsCon _cc dc cnum _ticks args) = ([], StgConApp dc cnum args []) +collect (StgRhsClosure _ _ _ args body _) = (args, body) +collect (StgRhsCon _cc dc cnum _ticks args _typ) = ([], StgConApp dc cnum args []) schemeR_wrk :: [Id] @@ -534,7 +534,7 @@ schemeE d s p e@(StgOpApp {}) = schemeT d s p e schemeE d s p (StgLetNoEscape xlet bnd body) = schemeE d s p (StgLet xlet bnd body) schemeE d s p (StgLet _xlet - (StgNonRec x (StgRhsCon _cc data_con _cnum _ticks args)) + (StgNonRec x (StgRhsCon _cc data_con _cnum _ticks args _typ)) body) = do -- Special case for a non-recursive let whose RHS is a -- saturated constructor application. |