[Git][ghc/ghc][wip/T22010] Small changes.
Jaro Reinders (@Noughtmare)
gitlab at gitlab.haskell.org
Fri Jun 2 09:36:09 UTC 2023
Jaro Reinders pushed to branch wip/T22010 at Glasgow Haskell Compiler / GHC
Commits:
eefdf0bd by Jaro Reinders at 2023-06-02T11:35:57+02:00
Small changes.
- - - - -
2 changed files:
- compiler/GHC/StgToJS/Ids.hs
- compiler/GHC/Types/Unique/Supply.hs
Changes:
=====================================
compiler/GHC/StgToJS/Ids.hs
=====================================
@@ -182,7 +182,7 @@ identsForId :: Id -> G [Ident]
identsForId i = case typeSize (idType i) of
0 -> pure mempty
1 -> (:[]) <$> identForId i
- s -> mapM (identForIdN i) [1 .. fromIntegral s]
+ s -> mapM (identForIdN i) [1..s]
-- | Retrieve entry Ident for the given Id
=====================================
compiler/GHC/Types/Unique/Supply.hs
=====================================
@@ -219,14 +219,13 @@ mkSplitUniqSupply c
-- deferred IO computations
case unIO (unsafeDupableInterleaveIO (IO mk_supply)) s2 of { (# s3, x #) ->
case unIO (unsafeDupableInterleaveIO (IO mk_supply)) s3 of { (# s4, y #) ->
- -- FIXME: fill in the undefined
- (# s4, MkSplitUniqSupply (mask .|. undefined u) x y #)
+ (# s4, MkSplitUniqSupply (mask .|. u) x y #)
}}}}
#if !MIN_VERSION_GLASGOW_HASKELL(9,1,0,0)
-foreign import ccall unsafe "genSym" genSym :: IO Int
+foreign import ccall unsafe "genSym" genSym :: IO Word64 -- TODO: Word64 is a lie
#else
-genSym :: IO Int
+genSym :: IO Word64
genSym = do
let !mask = (1 `unsafeShiftL` uNIQUE_BITS) - 1
let !(Ptr counter) = ghc_unique_counter
@@ -241,7 +240,7 @@ genSym = do
-- (Note that if the increment isn't 1 we may miss this check)
massert (u /= mask)
#endif
- return u
+ return (undefined u)
#endif
foreign import ccall unsafe "&ghc_unique_counter" ghc_unique_counter :: Ptr Word
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eefdf0bd0c26d811d2a95c427d69330b2ce386b1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eefdf0bd0c26d811d2a95c427d69330b2ce386b1
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/20230602/7f974480/attachment-0001.html>
More information about the ghc-commits
mailing list