[Git][ghc/ghc][wip/fix-25636] Correcting the Cmm PrimOp definition
recursion-ninja pushed to branch wip/fix-25636 at Glasgow Haskell Compiler / GHC Commits: 399e5a5e by Recursion Ninja at 2025-11-24T11:44:02-05:00 Correcting the Cmm PrimOp definition - - - - - 2 changed files: - libraries/ghci/GHCi/CreateBCO.hs - rts/PrimOps.cmm Changes: ===================================== libraries/ghci/GHCi/CreateBCO.hs ===================================== @@ -116,19 +116,9 @@ mkPtrsArray arr n_ptrs ptrs = do -- This MUST be /strict!/ -- Lazy evaluation will cause interpreter panics (at best). -- Used to refer to unlifted data constructor applications. --- let !x = arr ! n let x@(HValue !a) = arr ! n a `seq` writePtrsArrayHValue i x marr -{- - let (HValue !a) = arr ! n - let uVal :: IO (Any UnliftedType) - !uVal = unsafeCoerce# a - aVal <- evaluate uVal - let !hVal = unsafeCoerce aVal - hVal `seq` writePtrsArrayHValue i hVal marr --- let x@(HValue !a) = arr ! n --- in a `seq` writePtrsArrayHValue i x' marr --} +-- writePtrsArrayHValue i (arr ! n) marr fill (ResolvedBCOPtr r) i = do hv <- localRef r writePtrsArrayHValue i hv marr ===================================== rts/PrimOps.cmm ===================================== @@ -1,3 +1,4 @@ + /* -*- tab-width: 8 -*- */ /* ----------------------------------------------------------------------------- * @@ -2143,17 +2144,17 @@ stg_deRefStablePtrzh ( P_ sp ) /* ----------------------------------------------------------------------------- Bytecode object primitives ------------------------------------------------------------------------- */ -/* -stg_newUDHzh ( P_ datacon_itbl ) + +stg_newUDHzh ( W_ datacon_itbl ) { W_ p; - ALLOC_PRIM(SIZEOF_StgClosure) - p = Hp - SIZEOF_StgClosure + WDS(1); + ALLOC_PRIM(SIZEOF_StgHeader); + p = Hp - SIZEOF_StgHeader + WDS(1); // No memory barrier necessary as this is a new allocation. SET_HDR(p, datacon_itbl, CCS_MAIN); return (p); } -*/ + stg_newBCOzh ( P_ instrs, P_ literals, P_ ptrs, View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/399e5a5ec7252276858f047c32cf5d0f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/399e5a5ec7252276858f047c32cf5d0f... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
recursion-ninja (@recursion-ninja)