[Git][ghc/ghc][wip/js-staging] 5 commits: Remove trailing whitespaces (whitespace test)
Sylvain Henry (@hsyl20)
gitlab at gitlab.haskell.org
Fri Aug 26 09:58:22 UTC 2022
Sylvain Henry pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC
Commits:
c7b7a333 by Sylvain Henry at 2022-08-26T11:27:38+02:00
Remove trailing whitespaces (whitespace test)
- - - - -
494f7971 by Sylvain Henry at 2022-08-26T11:34:08+02:00
Testsuite: remove platform prefix for unlit tool
- - - - -
d6bfe499 by Sylvain Henry at 2022-08-26T11:36:20+02:00
Primop: fix Int64 conversion/negate (integerConversions test)
- - - - -
f7a03eff by Sylvain Henry at 2022-08-26T11:59:37+02:00
Linker: remove message with default verbosity
- - - - -
8764ef83 by Sylvain Henry at 2022-08-26T12:00:09+02:00
Testsuite: normalise .jsexe suffix
- - - - -
4 changed files:
- compiler/GHC/StgToJS.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Prim.hs
- testsuite/driver/testlib.py
Changes:
=====================================
compiler/GHC/StgToJS.hs
=====================================
@@ -60,7 +60,7 @@ import GHC.StgToJS.CodeGen
-- > plus :: Int -> Int -> Int
--
-- Currently the JS backend only supports functions as JS imports.
---
+--
-- In comparison, GHCJS supports JavaScript snippets with $1, $2... variables
-- as placeholders for the arguments. It requires a JavaScript parser that the
-- JS backend lacks. In GHCJS, the parser is inherited from JMacro and supports
=====================================
compiler/GHC/StgToJS/Linker/Linker.hs
=====================================
@@ -226,10 +226,11 @@ link' env lc_cfg cfg dflags logger unit_env target _include pkgs objFiles _jsFil
rootMods = map (moduleNameString . moduleName . head) . group . sort . map funModule . S.toList $ roots
objPkgs = map moduleUnitId $ nub (M.keys objDepsMap)
- _ <- compilationProgressMsg logger . text $
- case lcGenBase lc_cfg of
- Just baseMod -> "Linking base bundle " ++ target ++ " (" ++ moduleNameString (moduleName baseMod) ++ ")"
- _ -> "Linking " ++ target ++ " (" ++ intercalate "," rootMods ++ ")"
+ when (logVerbAtLeast logger 2) $ void $
+ compilationProgressMsg logger . text $
+ case lcGenBase lc_cfg of
+ Just baseMod -> "Linking base bundle " ++ target ++ " (" ++ moduleNameString (moduleName baseMod) ++ ")"
+ _ -> "Linking " ++ target ++ " (" ++ intercalate "," rootMods ++ ")"
base <- case lcUseBase lc_cfg of
NoBase -> return emptyBase
@@ -608,7 +609,7 @@ readArObject ar_state mod ar_file = do
| otherwise
= False
- -- XXX this shouldn't be an exception probably
+ -- XXX this shouldn't be an exception probably
pure $! maybe (error $ "could not find object for module "
++ moduleNameString (moduleName mod)
++ " in "
=====================================
compiler/GHC/StgToJS/Prim.hs
=====================================
@@ -267,11 +267,11 @@ genPrim prof ty op = case op of
------------------------------ Int64 --------------------------------------------
- Int64ToIntOp -> \[r] [_h,l] -> PrimInline $ r |= l
+ Int64ToIntOp -> \[r] [_h,l] -> PrimInline $ r |= i32 l
Int64NegOp -> \[r_h,r_l] [h,l] ->
PrimInline $ mconcat
- [ r_l |= i32 (BNot l + 1)
+ [ r_l |= u32 (BNot l + 1)
, r_h |= i32 (BNot h + Not r_l)
]
=====================================
testsuite/driver/testlib.py
=====================================
@@ -2302,6 +2302,8 @@ def normalise_errmsg(s: str) -> str:
# hacky solution is used in place of more sophisticated filename
# mangling
s = re.sub('([^\\s])\\.exe', '\\1', s)
+ # Same thing for .jsexe directories generated by the JS backend
+ s = re.sub('([^\\s])\\.jsexe', '\\1', s)
# normalise slashes, minimise Windows/Unix filename differences
s = re.sub('\\\\', '/', s)
@@ -2311,6 +2313,7 @@ def normalise_errmsg(s: str) -> str:
s = re.sub('ghc-stage[123]', 'ghc', s)
# Remove platform prefix (e.g. js-unknown-ghcjs) for cross-compiled ghc
s = re.sub('^\\w+-\\w+-\\w+-ghc', 'ghc', s)
+ s = re.sub('^\\w+-\\w+-\\w+-unlit', 'unlit', s)
# On windows error messages can mention versioned executables
s = re.sub('ghc-[0-9.]+', 'ghc', s)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6e8d292b596f719e66fd6c8f5dddda5701ba7c1e...8764ef83d8d04b92299b3109ceba2a00efcf8b03
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6e8d292b596f719e66fd6c8f5dddda5701ba7c1e...8764ef83d8d04b92299b3109ceba2a00efcf8b03
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/20220826/1bad9f0b/attachment-0001.html>
More information about the ghc-commits
mailing list