[Git][ghc/ghc][wip/js-stgrhsclosure] lint

Josh Meredith (@JoshMeredith) gitlab at gitlab.haskell.org
Tue Apr 11 08:38:14 UTC 2023



Josh Meredith pushed to branch wip/js-stgrhsclosure at Glasgow Haskell Compiler / GHC


Commits:
9b90863b by Josh Meredith at 2023-04-11T08:38:04+00:00
lint

- - - - -


2 changed files:

- compiler/GHC/StgToJS/CodeGen.hs
- compiler/GHC/StgToJS/Expr.hs


Changes:

=====================================
compiler/GHC/StgToJS/CodeGen.hs
=====================================
@@ -335,7 +335,7 @@ genToplevelRhs i rhs = case rhs of
     -}
     eid@(TxtI eidt) <- identForEntryId i
     (TxtI idt)   <- identForId i
-    body <- genBody (initExprCtx i) i R2 args body typ
+    body <- genBody (initExprCtx i) R2 args body typ
     global_occs <- globalOccs (jsSaturate (Just "ghcjs_tmp_sat_") body)
     let lidents = map global_ident global_occs
     let lids    = map global_id    global_occs


=====================================
compiler/GHC/StgToJS/Expr.hs
=====================================
@@ -74,7 +74,6 @@ import GHC.Core.Type hiding (typeSize)
 import GHC.Utils.Misc
 import GHC.Utils.Monad
 import GHC.Utils.Panic
-import GHC.Utils.Panic.Plain
 import GHC.Utils.Outputable (ppr, renderWithContext, defaultSDocContext)
 import qualified Control.Monad.Trans.State.Strict as State
 import GHC.Data.FastString
@@ -238,7 +237,7 @@ genEntryLne ctx i rhs@(StgRhsClosure _ext _cc update args body typ) =
               ])
          | otherwise = mempty
   lvs  <- popLneFrame True payloadSize ctx
-  body <- genBody ctx i R1 args body typ
+  body <- genBody ctx R1 args body typ
   ei@(TxtI eii) <- identForEntryId i
   sr   <- genStaticRefsRhs rhs
   let f = JFunc [] (bh <> lvs <> body)
@@ -270,7 +269,7 @@ genEntry ctx i rhs@(StgRhsClosure _ext cc {-_bi live-} upd_flag args body typ) =
   ll    <- loadLiveFun live
   llv   <- verifyRuntimeReps live
   upd   <- genUpdFrame upd_flag i
-  body  <- genBody entryCtx i R2 args body typ
+  body  <- genBody entryCtx R2 args body typ
   ei@(TxtI eii) <- identForEntryId i
   et    <- genEntryType args
   setcc <- ifProfiling $
@@ -302,13 +301,12 @@ genEntryType args0 = do
 -- | Generate the body of an object
 genBody :: HasDebugCallStack
          => ExprCtx
-         -> Id
          -> StgReg
          -> [Id]
          -> CgStgExpr
          -> Type
          -> G JStat
-genBody ctx i startReg args e typ = do
+genBody ctx startReg args e typ = do
   -- load arguments into local variables
   la <- do
     args' <- concatMapM genIdArgI args



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9b90863b69e3fce969bb8fcb1bbb2418dd5ece5f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9b90863b69e3fce969bb8fcb1bbb2418dd5ece5f
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/20230411/f9f7dbb1/attachment-0001.html>


More information about the ghc-commits mailing list