[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: JS: Fix missing local variable declarations
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Aug 7 14:31:14 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
b938950d by Luite Stegeman at 2023-08-07T06:27:51-04:00
JS: Fix missing local variable declarations
This fixes some missing local variable declarations that were
found by running the testsuite in strict mode.
Fixes #23775
- - - - -
348ac401 by sheaf at 2023-08-07T10:31:08-04:00
Update Haddock submodule to fix #23368
This submodule update adds the following three commits:
bbf1c8ae - Check for puns
0550694e - Remove fake exports for (~), List, and Tuple<n>
5877bceb - Fix pretty-printing of Solo and MkSolo
These commits fix the issues with Haddock HTML rendering reported in
ticket #23368.
Fixes #23368
- - - - -
eedf468f by Matthew Pickering at 2023-08-07T10:31:08-04:00
Revert "Bump bytestring submodule to 0.11.5.1"
This reverts commit 43578d60bfc478e7277dcd892463cec305400025.
Fixes #23789
- - - - -
14 changed files:
- .gitlab-ci.yml
- compiler/GHC/JS/Make.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/Utils/Binary.hs
- hadrian/src/Settings/Warnings.hs
- libraries/bytestring
- rts/js/arith.js
- rts/js/environment.js
- rts/js/thread.js
- testsuite/tests/ghci/scripts/T9881.stdout
- testsuite/tests/ghci/scripts/ghci025.stdout
- testsuite/tests/javascript/js-callback03.hs
- testsuite/tests/programs/seward-space-leak/test.T
- utils/haddock
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -401,7 +401,7 @@ hadrian-multi:
# workaround for docker permissions
- sudo chown ghc:ghc -R .
variables:
- GHC_FLAGS: "-Werror -Wwarn=deprecations"
+ GHC_FLAGS: -Werror
CONFIGURE_ARGS: --enable-bootstrap-with-devel-snapshot
tags:
- x86_64-linux
=====================================
compiler/GHC/JS/Make.hs
=====================================
@@ -268,7 +268,7 @@ jVar f = UnsatBlock . IS $ do
(block, is) <- runIdentSupply $ toSat_ f []
let addDecls (BlockStat ss) =
BlockStat $ map decl is ++ ss
- addDecls x = x
+ addDecls x = BlockStat (map decl is ++ [x])
return $ addDecls block
jFunction :: Ident -> [Ident] -> JStat -> JStat
=====================================
compiler/GHC/StgToJS/Expr.hs
=====================================
@@ -509,7 +509,7 @@ optimizeFree offset ids = do
allocCls :: Maybe JStat -> [(Id, CgStgRhs)] -> G JStat
allocCls dynMiddle xs = do
(stat, dyn) <- partitionEithers <$> mapM toCl xs
- ac <- allocDynAll True dynMiddle dyn
+ ac <- allocDynAll False dynMiddle dyn
pure (mconcat stat <> ac)
where
-- left = static, right = dynamic
=====================================
compiler/GHC/Utils/Binary.hs
=====================================
@@ -1240,13 +1240,13 @@ putBS :: BinHandle -> ByteString -> IO ()
putBS bh bs =
BS.unsafeUseAsCStringLen bs $ \(ptr, l) -> do
put_ bh l
- putPrim bh l (\op -> copyBytes op (castPtr ptr) l)
+ putPrim bh l (\op -> BS.memcpy op (castPtr ptr) l)
getBS :: BinHandle -> IO ByteString
getBS bh = do
l <- get bh :: IO Int
BS.create l $ \dest -> do
- getPrim bh l (\src -> copyBytes dest src l)
+ getPrim bh l (\src -> BS.memcpy dest src l)
instance Binary ByteString where
put_ bh f = putBS bh f
=====================================
hadrian/src/Settings/Warnings.hs
=====================================
@@ -53,12 +53,10 @@ ghcWarningsArgs = do
, package primitive ? pure [ "-Wno-unused-imports"
, "-Wno-deprecations" ]
, package rts ? pure [ "-Wcpp-undef" ]
- , package text ? pure [ "-Wno-deprecations" ]
, package terminfo ? pure [ "-Wno-unused-imports" ]
, package transformers ? pure [ "-Wno-unused-matches"
, "-Wno-unused-imports"
, "-Wno-redundant-constraints"
, "-Wno-orphans" ]
- , package unix ? pure [ "-Wno-deprecations" ]
, package win32 ? pure [ "-Wno-trustworthy-safe" ]
, package xhtml ? pure [ "-Wno-unused-imports" ] ] ]
=====================================
libraries/bytestring
=====================================
@@ -1 +1 @@
-Subproject commit 602fd2f3470f180d64cb8baadf63e94baec66b60
+Subproject commit 9cab76dc861f651c3940e873ce921d9e09733cc8
=====================================
rts/js/arith.js
=====================================
@@ -394,9 +394,9 @@ function h$decodeFloatInt(d) {
h$convertFloat[0] = d*8388608; // put d in the normal range (~ shift left 23 bits)
i = h$convertInt[0];
s = (i&8388607) | 8388608;
- e = ((i >> 23) & 0xff) - 173; // take into account normalization above (150+23)
- TRACE_ARITH("decodeFloatInt s: " + (sgn * s) + " e: " + e)
- RETURN_UBX_TUP2(sgn*s, e)
+ exp = ((i >> 23) & 0xff) - 173; // take into account normalization above (150+23)
+ TRACE_ARITH("decodeFloatInt s: " + (sgn * s) + " e: " + exp)
+ RETURN_UBX_TUP2(sgn*s, exp)
}
} else {
TRACE_ARITH("decodeFloatInt s: " + (sgn * (s|8388608)) + " e: " + (exp-150))
=====================================
rts/js/environment.js
=====================================
@@ -166,7 +166,7 @@ function h$getProgArgv(argc_v,argc_off,argv_v,argv_off) {
}
function h$setProgArgv(n, ptr_d, ptr_o) {
- args = [];
+ var args = [];
for(var i=0;i<n;i++) {
var off = ptr_o+4*i;
GET_ADDR(ptr_d,off,p,o);
=====================================
rts/js/thread.js
=====================================
@@ -138,6 +138,7 @@ function h$getThreadLabel(t) {
function h$listThreads() {
var r = h$newArray(0,null);
+ var t;
if (h$currentThread) r.push(h$currentThread);
=====================================
testsuite/tests/ghci/scripts/T9881.stdout
=====================================
@@ -19,19 +19,19 @@ instance Ord Data.ByteString.Lazy.ByteString
type Data.ByteString.ByteString :: *
data Data.ByteString.ByteString
- = bytestring-0.11.5.1:Data.ByteString.Internal.Type.BS {-# UNPACK #-}(GHC.ForeignPtr.ForeignPtr
+ = bytestring-0.11.4.0:Data.ByteString.Internal.Type.BS {-# UNPACK #-}(GHC.ForeignPtr.ForeignPtr
GHC.Word.Word8)
{-# UNPACK #-}Int
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
instance Monoid Data.ByteString.ByteString
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
instance Read Data.ByteString.ByteString
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
instance Semigroup Data.ByteString.ByteString
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
instance Show Data.ByteString.ByteString
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
instance Eq Data.ByteString.ByteString
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
instance Ord Data.ByteString.ByteString
- -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
+ -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
=====================================
testsuite/tests/ghci/scripts/ghci025.stdout
=====================================
@@ -54,7 +54,7 @@ Prelude.length :: Data.Foldable.Foldable t => t a -> GHC.Types.Int
type T.Integer :: *
data T.Integer = ...
T.length ::
- bytestring-0.11.5.1:Data.ByteString.Internal.Type.ByteString
+ bytestring-0.11.4.0:Data.ByteString.Internal.Type.ByteString
-> GHC.Types.Int
:browse! T
-- defined locally
=====================================
testsuite/tests/javascript/js-callback03.hs
=====================================
@@ -10,7 +10,7 @@ foreign import javascript "((x) => { globalF(x); })"
foreign import javascript "((x,y) => { return x + y })"
js_plus :: JSVal -> JSVal -> IO JSVal
-foreign import javascript "((g) => { globalG = g; })"
+foreign import javascript "((g) => { globalThis.globalG = g; })"
setG :: Callback (JSVal -> JSVal -> IO JSVal) -> IO ()
foreign import javascript "((x,y) => { return globalG(x,y); })"
=====================================
testsuite/tests/programs/seward-space-leak/test.T
=====================================
@@ -1,5 +1,4 @@
test('seward-space-leak', [extra_files(['Main.lhs'])
, when(fast(), skip)
- , js_broken(22352)
], multimod_compile_and_run,
['Main', ''])
=====================================
utils/haddock
=====================================
@@ -1 +1 @@
-Subproject commit 1313adce47bbfe77fa526d469b67043c1adcd42d
+Subproject commit 5877bcebce88afad40ae9decb0f6029681c51848
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9574d51be6f7a0b6e4d540c13fddf48ae0ac1d07...eedf468f9108d8ae27759f2785a7f55947449c71
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9574d51be6f7a0b6e4d540c13fddf48ae0ac1d07...eedf468f9108d8ae27759f2785a7f55947449c71
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/20230807/86e106cb/attachment-0001.html>
More information about the ghc-commits
mailing list