diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2022-11-29 09:29:16 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-02-16 10:16:32 -0500 |
commit | 518af81421860b982c57a87596bb8315c50abe90 (patch) | |
tree | 732d74d40250cba1909f70459d8110d4f7b62902 /compiler/GHC/StgToJS/Expr.hs | |
parent | 324e925be847d3969724be3e1b82c25899aaca27 (diff) | |
download | haskell-518af81421860b982c57a87596bb8315c50abe90.tar.gz |
Factor JS Rts generation for h$c{_,0,1,2} into h$c{n} and improve name caching
Diffstat (limited to 'compiler/GHC/StgToJS/Expr.hs')
-rw-r--r-- | compiler/GHC/StgToJS/Expr.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/StgToJS/Expr.hs b/compiler/GHC/StgToJS/Expr.hs index b398cdf501..d42d93afe8 100644 --- a/compiler/GHC/StgToJS/Expr.hs +++ b/compiler/GHC/StgToJS/Expr.hs @@ -35,6 +35,7 @@ import GHC.JS.Make import GHC.StgToJS.Apply import GHC.StgToJS.Arg +import GHC.StgToJS.Closure import GHC.StgToJS.ExprCtx import GHC.StgToJS.FFI import GHC.StgToJS.Heap @@ -1006,7 +1007,7 @@ allocDynAll haveDecl middle cls = do ] (ex:es) -> mconcat [ toJExpr i .^ closureField1_ |= toJExpr ex - , toJExpr i .^ closureField2_ |= toJExpr (jhFromList (zip dataFieldNames es)) + , toJExpr i .^ closureField2_ |= toJExpr (jhFromList (zip (map dataFieldName [1..]) es)) ] | otherwise = case es of [] -> mempty |