Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC

Commits:

12 changed files:

Changes:

  • compiler/GHC/Core/Unfold.hs
    ... ... @@ -637,6 +637,7 @@ sizeExpr opts !bOMB_OUT_SIZE top_args expr
    637 637
             where
    
    638 638
               is_top_arg (Var v) | v `elem` top_args = Just v
    
    639 639
               is_top_arg (Cast e _) = is_top_arg e
    
    640
    +          is_top_arg (Tick _t e) = is_top_arg e
    
    640 641
               is_top_arg _ = Nothing
    
    641 642
     
    
    642 643
           where
    

  • compiler/GHC/Parser/Lexer.x
    ... ... @@ -145,7 +145,7 @@ import GHC.Parser.String
    145 145
     $unispace    = \x05 -- Trick Alex into handling Unicode. See Note [Unicode in Alex].
    
    146 146
     $nl          = [\n\r\f]
    
    147 147
     $space       = [\ $unispace]
    
    148
    -$whitechar   = [$nl \v $space]
    
    148
    +$whitechar   = [$nl \t \v $space]
    
    149 149
     $white_no_nl = $whitechar # \n -- TODO #8424
    
    150 150
     $tab         = \t
    
    151 151
     
    
    ... ... @@ -248,7 +248,7 @@ haskell :-
    248 248
     -- Alex "Rules"
    
    249 249
     
    
    250 250
     -- everywhere: skip whitespace
    
    251
    -$white_no_nl+ ;
    
    251
    +($white_no_nl # \t)+ ;
    
    252 252
     $tab          { warnTab }
    
    253 253
     
    
    254 254
     -- Everywhere: deal with nested comments.  We explicitly rule out
    

  • compiler/GHC/Parser/Lexer/String.x
    ... ... @@ -25,7 +25,7 @@ import GHC.Utils.Panic (panic)
    25 25
     $unispace    = \x05 -- Trick Alex into handling Unicode. See Note [Unicode in Alex].
    
    26 26
     $nl          = [\n\r\f]
    
    27 27
     $space       = [\ $unispace]
    
    28
    -$whitechar   = [$nl \v $space]
    
    28
    +$whitechar   = [$nl \t \v $space]
    
    29 29
     $tab         = \t
    
    30 30
     
    
    31 31
     $ascdigit  = 0-9
    

  • libraries/ghc-internal/src/GHC/Internal/Base.hs
    ... ... @@ -1353,9 +1353,9 @@ class Applicative m => Monad m where
    1353 1353
         --    bs a
    
    1354 1354
         -- @
    
    1355 1355
         --
    
    1356
    -    -- An alternative name for this function is \'bind\', but some people
    
    1357
    -    -- may refer to it as \'flatMap\', which results from it being equivalent
    
    1358
    -    -- to
    
    1356
    +    -- An alternative name for this function is \'bind\', because it
    
    1357
    +    -- is used to introduce bindings in monadic contexts, but some people may
    
    1358
    +    -- refer to it as \'flatMap\', which results from it being equivalent to
    
    1359 1359
         --
    
    1360 1360
         -- @\\x f -> 'join' ('fmap' f x) :: Monad m => m a -> (a -> m b) -> m b@
    
    1361 1361
         --
    

  • m4/fptools_set_c_ld_flags.m4
    ... ... @@ -109,9 +109,6 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
    109 109
             $2="$$2 -mcmodel=medium"
    
    110 110
             ;;
    
    111 111
     
    
    112
    -    javascript*)
    
    113
    -        $3="$$3 -sEXPORTED_RUNTIME_METHODS=HEAP8,HEAPU8"
    
    114
    -
    
    115 112
         esac
    
    116 113
     
    
    117 114
         AC_MSG_RESULT([done])
    

  • rts/js/mem.js
    1 1
     //#OPTIONS:CPP
    
    2
    -//#OPTIONS:EMCC:EXPORTED_RUNTIME_METHODS=addFunction,removeFunction,getEmptyTableSlot,HEAP8
    
    2
    +//#OPTIONS:EMCC:EXPORTED_RUNTIME_METHODS=addFunction,removeFunction,getEmptyTableSlot,HEAP8,HEAPU8
    
    3 3
     
    
    4 4
     // #define GHCJS_TRACE_META 1
    
    5 5
     
    

  • testsuite/driver/testlib.py
    ... ... @@ -3005,7 +3005,7 @@ def normalise_errmsg(s: str) -> str:
    3005 3005
         # Emscripten displays cache info and old emcc doesn't support EMCC_LOGGING=0
    
    3006 3006
         s = re.sub('cache:INFO: .*\n', '', s)
    
    3007 3007
         # Old emcc warns when we export HEAP8 but new one requires it (see #26290)
    
    3008
    -    s = s.replace('warning: invalid item in EXPORTED_RUNTIME_METHODS: HEAP8\nemcc: warning: warnings in JS library compilation [-Wjs-compiler]\n','')
    
    3008
    +    s = s.replace('warning: invalid item in EXPORTED_RUNTIME_METHODS: HEAP8\nwarning: invalid item in EXPORTED_RUNTIME_METHODS: HEAPU8\nemcc: warning: warnings in JS library compilation [-Wjs-compiler]\n','')
    
    3009 3009
     
    
    3010 3010
         return s
    
    3011 3011
     
    

  • testsuite/tests/parser/should_run/T26415.hs
    1
    +{-# LANGUAGE MultilineStrings #-}
    
    2
    +
    
    3
    +main :: IO ()
    
    4
    +main = do
    
    5
    +  -- The below strings contain the characters ['\\', '\t', '\\']
    
    6
    +  print "\	\"
    
    7
    +  print """\	\"""

  • testsuite/tests/parser/should_run/T26415.stdout
    1
    +""
    
    2
    +""

  • testsuite/tests/parser/should_run/all.T
    ... ... @@ -27,6 +27,7 @@ test('RecordDotSyntax4', [extra_files(['RecordDotSyntaxA.hs'])], multimod_compil
    27 27
     test('RecordDotSyntax5', normal, compile_and_run, [''])
    
    28 28
     test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script'])
    
    29 29
     test('T25937', normal, compile_and_run, [''])
    
    30
    +test('T26415', normal, compile_and_run, [''])
    
    30 31
     
    
    31 32
     # Multiline strings
    
    32 33
     test('MultilineStrings', normal, compile_and_run, [''])
    

  • utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
    ... ... @@ -324,10 +324,6 @@ addPlatformDepLinkFlags archOs cc ccLink0 = do
    324 324
         ArchOS ArchPPC OSAIX ->
    
    325 325
           -- We need `-D_THREAD_SAFE` to unlock the thread-local `errno`.
    
    326 326
           return $ ccLink2 & over _prgFlags (++["-D_THREAD_SAFE","-Wl,-bnotextro"])
    
    327
    -    ArchOS ArchJavaScript OSGhcjs ->
    
    328
    -      -- Since https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#407---041525
    
    329
    -      -- the emcc linker does not export the HEAP8 memory view which is used by the js RTS by default anymore.
    
    330
    -      return $ ccLink2 & _prgFlags %++ "-sEXPORTED_RUNTIME_METHODS=HEAP8,HEAPU8"
    
    331 327
         _ ->
    
    332 328
           return ccLink2
    
    333 329
     
    

  • utils/jsffi/dyld.mjs
    1
    -#!/usr/bin/env -S node --disable-warning=ExperimentalWarning --max-old-space-size=65536 --no-turbo-fast-api-calls --wasm-lazy-validation
    
    1
    +#!/usr/bin/env -S node --disable-warning=ExperimentalWarning --max-old-space-size=65536 --wasm-lazy-validation
    
    2 2
     
    
    3 3
     // Note [The Wasm Dynamic Linker]
    
    4 4
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~