Skip to content
Snippets Groups Projects
  1. Feb 10, 2023
  2. Feb 09, 2023
    • Ben Gamari's avatar
      nativeGen/AArch64: Emit Atomic{Read,Write} inline · 94844882
      Ben Gamari authored
      Previously the AtomicRead and AtomicWrite operations were emitted as
      out-of-line calls. However, these tend to be very important for
      performance, especially the RELAXED case (which only exists for
      ThreadSanitizer checking).
      
      Fixes #22115.
      
      (cherry picked from commit 6e52fcb9)
      94844882
    • Aaron Allen's avatar
      Rework plugin initialisation points · 11686fb4
      Aaron Allen authored and Ben Gamari's avatar Ben Gamari committed
      
      In general this patch pushes plugin initialisation points to earlier in
      the pipeline. As plugins can modify the `HscEnv`, it's imperative that
      the plugins are initialised as soon as possible and used thereafter.
      
      For example, there are some new tests which modify hsc_logger and other
      hooks which failed to fire before (and now do)
      
      One consequence of this change is that the error for specifying the
      usage of a HPT plugin from the command line has changed, because it's
      now attempted to be loaded at initialisation rather than causing a
      cyclic module import.
      
      Closes #21279
      
      Co-authored-by: default avatarMatthew Pickering <matthewtpickering@gmail.com>
      (cherry picked from commit c31e87bb)
      11686fb4
    • Matthew Pickering's avatar
      driver: Use hooks from plugin_hsc_env · 31a90769
      Matthew Pickering authored and Ben Gamari's avatar Ben Gamari committed
      This fixes a bug in oneshot mode where hooks modified in a plugin
      wouldn't be used in oneshot mode because we neglected to use the right
      hsc_env. This was observed by @csabahruska.
      
      (cherry picked from commit cc72e712)
      31a90769
    • Andreas Klebinger's avatar
      Fix some correctness issues around tag inference when targeting the bytecode generator. · bea77fc4
      Andreas Klebinger authored
      * Let binders are now always assumed untagged for bytecode.
      * Imported referenced are now always assumed to be untagged for bytecode.
      
      Fixes #22840
      
      (cherry picked from commit 382bd7da)
      bea77fc4
    • Simon Peyton Jones's avatar
      Improve treatment of type applications in patterns · fcdf9f9b
      Simon Peyton Jones authored and Ben Gamari's avatar Ben Gamari committed
      This patch fixes a subtle bug in the typechecking of type
      applications in patterns, e.g.
         f (MkT @Int @a x y) = ...
      
      See Note [Type applications in patterns] in GHC.Tc.Gen.Pat.
      
      This fixes #19847, #22383, #19577, #21501
      
      (cherry picked from commit 9f95db54)
      fcdf9f9b
    • Cheng Shao's avatar
      docs: 9.6 release notes for wasm backend · 5dfa01e7
      Cheng Shao authored and Matthew Pickering's avatar Matthew Pickering committed
      (cherry picked from commit 1ffe770c)
      5dfa01e7
    • sheaf's avatar
      Fix tyvar scoping within class SPECIALISE pragmas · 71decd09
      sheaf authored and Matthew Pickering's avatar Matthew Pickering committed
      Type variables from class/instance headers scope over class/instance
      method type signatures, but DO NOT scope over the type signatures in
      SPECIALISE and SPECIALISE instance pragmas.
      
      The logic in GHC.Rename.Bind.rnMethodBinds correctly accounted for
      SPECIALISE inline pragmas, but forgot to apply the same treatment
      to method SPECIALISE pragmas, which lead to a Core Lint failure with
      an out-of-scope type variable. This patch makes sure we apply the same
      logic for both cases.
      
      Fixes #22913
      
      (cherry picked from commit 9ee761bf)
      71decd09
    • Matthew Pickering's avatar
      Revert "Don't keep exit join points so much" · 03bc710d
      Matthew Pickering authored
      This reverts commit caced757.
      
      It seems the patch "Don't keep exit join points so much" is causing
      wide-spread regressions in the bytestring library benchmarks. If I
      revert it then the 9.6 numbers are better on average than 9.4.
      
      See ghc/ghc#22893 (comment 479525)
      
      -------------------------
      Metric Decrease:
          MultiComponentModules
          MultiComponentModulesRecomp
          MultiLayerModules
          MultiLayerModulesRecomp
          MultiLayerModulesTH_Make
          T12150
          T13386
          T13719
          T21839c
          T3294
          parsing001
      -------------------------
      
      (cherry picked from commit 7eac2468)
      03bc710d
    • Cheng Shao's avatar
      testsuite: use concurrent.futures.ThreadPoolExecutor in the driver · 5df968c3
      Cheng Shao authored and Matthew Pickering's avatar Matthew Pickering committed
      The testsuite driver used to create one thread per test case, and
      explicitly use semaphore and locks for rate limiting and
      synchronization. This is a bad practice in any language, and
      occasionally may result in livelock conditions (e.g. #22889). This
      patch uses concurrent.futures.ThreadPoolExecutor for scheduling test
      case runs, which is simpler and more robust.
      
      (cherry picked from commit ca6673e3)
      5df968c3
    • Cheng Shao's avatar
      testsuite: remove config.use_threads · b0dee831
      Cheng Shao authored and Matthew Pickering's avatar Matthew Pickering committed
      This patch simplifies the testsuite driver by removing the use_threads
      config field. It's just a degenerate case of threads=1.
      
      (cherry picked from commit 633f2799)
      b0dee831
    • sheaf's avatar
      Bump transformers to 0.6.1.0 · ef79d013
      sheaf authored and Matthew Pickering's avatar Matthew Pickering committed
      This allows us to avoid orphans for Foldable1 instances,
      fixing #22898.
      
      Updates transformers submodule.
      
      (cherry picked from commit 2ea1a6bc)
      ef79d013
  3. Feb 08, 2023
    • Sylvain Henry's avatar
      JS: replace "js" architecture with "javascript" · bafa3899
      Sylvain Henry authored
      
      Despite Cabal supporting any architecture name, `cabal --check` only
      supports a few built-in ones. Sadly `cabal --check` is used by Hackage
      hence using any non built-in name in a package (e.g. `arch(js)`) is
      rejected and the package is prevented from being uploaded on Hackage.
      
      Luckily built-in support for the `javascript` architecture was added for
      GHCJS a while ago. In order to allow newer `base` to be uploaded on
      Hackage we make the switch from `js` to `javascript` architecture.
      
      Fixes #22740.
      
      Co-authored-by: default avatarBen Gamari <ben@smart-cactus.org>
      (cherry picked from commit 6636b670)
      bafa3899
    • Ben Gamari's avatar
      Revert "Use fix-sized equality primops for fixed size boxed types" · dce53f5c
      Ben Gamari authored
      This reverts commit 024020c3.
      
      This was never applied to master/9.6 originally.
      
      See #20405 for why using these primops is a bad idea.
      
      (cherry picked from commit b1d109ad)
      (cherry picked from commit 92916194)
      dce53f5c
    • sheaf's avatar
      Don't allow . in overloaded labels · 8ab4d956
      sheaf authored and Ben Gamari's avatar Ben Gamari committed
      This patch removes . from the list of allowed characters in a non-quoted
      overloaded label, as it was realised this steals syntax, e.g. (#.).
      
      Users who want this functionality will have to add quotes around the
      label, e.g. `#"17.28"`.
      
      Fixes #22821
      
      (cherry picked from commit b17fb3d9)
      8ab4d956
    • Luite Stegeman's avatar
      Fix marking async exceptions in the JS backend · 2ec1c359
      Luite Stegeman authored and Ben Gamari's avatar Ben Gamari committed
      Async exceptions are posted as a pair of the exception and
      the thread object. This fixes the marking pass to correctly
      follow the two elements of the pair.
      
      Potentially fixes #22836
      
      (cherry picked from commit 77a8234c)
      2ec1c359
    • Ben Gamari's avatar
      Bump Windows toolchain · 18d1c5f9
      Ben Gamari authored
      Updates to LLVM 14, hopefully fixing #21964.
      
      (cherry picked from commit b2bb3e62)
      18d1c5f9
    • Tamar Christina's avatar
      linker: Fix BFD import libraries · 81873448
      Tamar Christina authored and Ben Gamari's avatar Ben Gamari committed
      This commit fixes the BFD style import library support in the runtime
      linker.  This was accidentally broken during the refactoring to clang
      and went unnoticed because clang itself is unable to generate the BFD
      style import libraries.
      
      With this change we can not link against both GCC or Clang produced
      libraries again and intermix code produced by both compilers.
      
      (cherry picked from commit 48e39195)
      81873448
    • Ryan Scott's avatar
      Windows: Remove mingwex dependency · 2c7f85fe
      Ryan Scott authored
      The clang based toolchain uses ucrt as its math library
      and so mingwex is no longer needed.  In fact using mingwex
      will cause incompatibilities as the default routines in both
      have differing ULPs and string formatting modifiers.
      
      ```
      $ LIBRARY_PATH=/mingw64/lib ghc/_build/stage1/bin/ghc Bug.hs -fforce-recomp && ./Bug.exe
      [1 of 2] Compiling Main             ( Bug.hs, Bug.o )
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__imp___p__environ'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__hscore_get_errno'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziError_errnoToIOError_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziWindows_failIf2_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePageziAPI_mkCodePageEncoding_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePage_currentCodePage_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncoding_getForeignEncoding_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziString_withCStringLen1_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziInternals_zdwflushCharReadBuffer_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziText_hGetBuf1_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziFingerprint_fingerprintString_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_DataziTypeableziInternal_mkTrCon_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziException_errorCallWithCallStackException_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziErr_error_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `base_DataziMaybe_fromJust1_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `templatezmhaskell_LanguageziHaskellziTHziSyntax_IntPrimL_con_info'
      ghc.exe: ^^ Could not load 'templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure', dependency unresolved. See top entry above.
      
      <no location info>: error:
      
      GHC.ByteCode.Linker.lookupCE
      During interactive linking, GHCi couldn't find the following symbol:
        templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure
      This may be due to you not asking GHCi to load extra object files,
      archives or DLLs needed by your current session.  Restart GHCi, specifying
      the missing library using the -L/path/to/object/dir and -lmissinglibname
      flags, or simply by naming the relevant files on the GHCi command line.
      Alternatively, this link failure might indicate a bug in GHCi.
      If you suspect the latter, please report this as a GHC bug:
        https://www.haskell.org/ghc/reportabug
      ```
      
      (cherry picked from commit de1d1512)
      2c7f85fe
    • Bodigrim's avatar
      Fix colors in emacs terminal · 51397a53
      Bodigrim authored
      (cherry picked from commit 5a54ac0b)
      51397a53
    • Ben Gamari's avatar
      Revert "Use fix-sized bit-fiddling primops for fixed size boxed types" · c6c96a3a
      Ben Gamari authored
      This reverts commit 4512ad2d.
      
      This was never applied to master/9.6 originally.
      
      (cherry picked from commit a44bdc27)
      (cherry picked from commit 25537dfd)
      c6c96a3a
    • Andreas Klebinger's avatar
      Fix CallerCC potentially shadowing other cost centres. · 86698692
      Andreas Klebinger authored
      Add a CallerCC cost centre flavour for cost centres added by the
      CallerCC pass. This avoids potential accidental shadowing between
      CCs added by user annotations and ones added by CallerCC.
      
      (cherry picked from commit bf3f88a1)
      86698692
    • Bodigrim's avatar
      Bump submodule containers to 0.6.7 · 18942043
      Bodigrim authored
      Metric Decrease:
          ManyConstructors
          T10421
          T12425
          T12707
          T13035
          T13379
          T15164
          T1969
          T783
          T9198
          T9961
          WWRec
      
      (cherry picked from commit 31358198)
      18942043
    • Matthew Pickering's avatar
      Disable unfolding sharing for interface files with core definitions · cbd60c81
      Matthew Pickering authored and Ben Gamari's avatar Ben Gamari committed
      Ticket #22807 pointed out that the RHS sharing was not compatible with
      -fignore-interface-pragmas because the flag would remove unfoldings from
      identifiers before the `extra-decls` field was populated.
      
      For the 9.6 timescale the only solution is to disable this sharing,
      which will make interface files bigger but this is acceptable for the
      first release of `-fwrite-if-simplified-core`.
      
      For 9.8 it would be good to fix this by implementing #20056 due to the
      large number of other bugs that would fix.
      
      I also improved the error message in tc_iface_binding to avoid the "no match
      in record selector" error but it should never happen now as the entire
      sharing logic is disabled.
      
      Also added the currently broken test for #22807 which could be fixed by
      !6080
      
      Fixes #22807
      
      (cherry picked from commit 0ada4547)
      cbd60c81
  4. Feb 01, 2023
Loading