Skip to content
Snippets Groups Projects
  1. Jan 31, 2024
  2. Nov 01, 2023
  3. Jun 13, 2023
  4. Apr 27, 2023
  5. Apr 25, 2023
  6. Apr 21, 2023
  7. Mar 25, 2023
    • Cheng Shao's avatar
      testsuite: add the rts_clearMemory test case · d9ae24ad
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch adds a standalone test case for rts_clearMemory that mimics
      how it's typically used by wasm backend users and ensures this RTS API
      isn't broken by future RTS refactorings. Fixes #23901.
      d9ae24ad
    • Cheng Shao's avatar
      rts: use performBlockingMajorGC in hs_perform_gc and fix ffi023 · b2d14d0b
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch does a few things:
      
      - Add the missing RtsSymbols.c entry of performBlockingMajorGC
      - Make hs_perform_gc call performBlockingMajorGC, which restores
        previous behavior
      - Use hs_perform_gc in ffi023
      - Remove rts_clearMemory() call in ffi023, it now works again in some
        test ways previously marked as broken. Fixes #23089
      b2d14d0b
  8. Mar 08, 2023
  9. Mar 03, 2023
  10. Feb 15, 2023
    • Cheng Shao's avatar
      rts: add the rts_clearMemory function · 9ca51f9e
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch adds the rts_clearMemory function that does its best to
      zero out unused RTS memory for a wasm backend use case. See the
      comment above rts_clearMemory() prototype declaration for more
      detailed explanation. Closes #22920.
      9ca51f9e
  11. Feb 09, 2023
  12. Jan 28, 2023
  13. Jan 18, 2023
    • Sylvain Henry's avatar
      testsuite: req_smp --> req_target_smp, req_ghc_smp · 06036d93
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      See #22630 and !9552
      
      This commit:
       - splits req_smp into req_target_smp and req_ghc_smp
       - changes the testsuite driver to calculate req_ghc_smp
       - changes a handful of tests to use req_target_smp instead of req_smp
       - changes a handful of tests to use req_host_smp when needed
      
      The problem:
       - the problem this solves is the ambiguity surrounding req_smp
       - on master req_smp was used to express the constraint that the program
       being compiled supports smp _and_ that the host RTS (i.e., the RTS used
       to compile the program) supported smp. Normally that is fine, but in
       cross compilation this is not always the case as was discovered in #22630.
      
      The solution:
       - Differentiate the two constraints:
         - use req_target_smp to say the RTS the compiled program is linked
         with (and the platform) supports smp
         - use req_host_smp to say the RTS the host is linked with supports smp
      
      WIP: fix req_smp (target vs ghc)
      
      add flag to separate bootstrapper
      
      split req_smp -> req_target_smp and req_ghc_smp
      
      update tests smp flags
      
      cleanup and add some docstrings
      
      only set ghc_with_smp to bootstrapper on S1 or CC
      
      Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1
      and cross compiling
      
      test the RTS in config/ghc not hadrian
      
      re-add ghc_with_smp
      
      fix and align req names
      
      fix T11760 to use req_host_smp
      
      test the rts directly, avoid python 3.5 limitation
      
      test the compiler in a try block
      
      align out of tree and in tree withSMP flags
      
      mark failing tests as host req smp
      
      testsuite: req_host_smp --> req_ghc_smp
      
      Fix ghc vs host, fix ghc_with_smp leftover
      06036d93
  14. Jan 12, 2023
  15. Nov 29, 2022
  16. Nov 25, 2022
    • Vladislav Zavialov's avatar
      Print unticked promoted data constructors (#20531) · 13d627bb
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      
      Before this patch, GHC unconditionally printed ticks before promoted
      data constructors:
      
      	ghci> type T = True  -- unticked (user-written)
      	ghci> :kind! T
      	T :: Bool
      	= 'True              -- ticked (compiler output)
      
      After this patch, GHC prints ticks only when necessary:
      
      	ghci> type F = False    -- unticked (user-written)
      	ghci> :kind! F
      	F :: Bool
      	= False                 -- unticked (compiler output)
      
      	ghci> data False        -- introduce ambiguity
      	ghci> :kind! F
      	F :: Bool
      	= 'False                -- ticked by necessity (compiler output)
      
      The old behavior can be enabled by -fprint-redundant-promotion-ticks.
      
      Summary of changes:
      * Rename PrintUnqualified to NamePprCtx
      * Add QueryPromotionTick to it
      * Consult the GlobalRdrEnv to decide whether to print a tick (see mkPromTick)
      * Introduce -fprint-redundant-promotion-ticks
      
      Co-authored-by: default avatarArtyom Kuznetsov <hi@wzrd.ht>
      13d627bb
  17. Nov 23, 2022
    • Alex D's avatar
      CApiFFI: add ConstPtr for encoding const-qualified pointer return types (#22043) · 99aca26b
      Alex D authored and Marge Bot's avatar Marge Bot committed
      Previously, when using `capi` calling convention in foreign declarations,
      code generator failed to handle const-cualified pointer return types.
      This resulted in CC toolchain throwing `-Wincompatible-pointer-types-discards-qualifiers`
      warning.
      
      `Foreign.C.Types.ConstPtr` newtype was introduced to handle these cases -
      special treatment was put in place to generate appropritetly qualified C
      wrapper that no longer triggers the above mentioned warning.
      
      Fixes #22043
      99aca26b
  18. Oct 26, 2022
  19. Sep 13, 2022
    • sheaf's avatar
      Diagnostic codes: acccept test changes · 362cca13
      sheaf authored and Marge Bot's avatar Marge Bot committed
      The testsuite output now contains diagnostic codes, so many tests need
      to be updated at once.
      We decided it was best to keep the diagnostic codes in the testsuite
      output, so that contributors don't inadvertently make changes to the
      diagnostic codes.
      362cca13
  20. Sep 12, 2022
  21. Jul 01, 2022
    • Alex D's avatar
      Fix panic with UnliftedFFITypes+CApiFFI (#14624) · d0722170
      Alex D authored and Marge Bot's avatar Marge Bot committed
      When declaring foreign import using CAPI calling convention, using
      unlifted unboxed types would result in compiler panic. There was
      an attempt to fix the situation in #9274, however it only addressed
      some of the ByteArray cases.
      
      This patch fixes other missed cases for all prims that may be used
      as basic foreign types.
      d0722170
  22. May 04, 2022
  23. Apr 27, 2022
    • sheaf's avatar
      Ensure that Any is Boxed in FFI imports/exports · 8bef471a
      sheaf authored and Marge Bot's avatar Marge Bot committed
      We should only accept the type `Any` in foreign import/export
      declarations when it has type `Type` or `UnliftedType`.
      This patch adds a kind check, and a special error message triggered by
      occurrences of `Any` in foreign import/export declarations at other
      kinds.
      
      Fixes #21305
      8bef471a
  24. Apr 06, 2022
    • Zubin's avatar
      Add warnings for file header pragmas that appear in the body of a module (#20385) · babb47d2
      Zubin authored and Marge Bot's avatar Marge Bot committed
      Once we are done parsing the header of a module to obtain the options, we
      look through the rest of the tokens in order to determine if they contain any
      misplaced file header pragmas that would usually be ignored, potentially
      resulting in bad error messages.
      
      The warnings are reported immediately so that later errors don't shadow
      over potentially helpful warnings.
      
      Metric Increase:
        T13719
      babb47d2
  25. Apr 01, 2022
  26. Mar 16, 2022
  27. Jan 19, 2022
  28. Dec 22, 2021
    • Matthew Pickering's avatar
      testsuite: Remove reqlib modifier · 3ed90911
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The reqlib modifer was supposed to indicate that a test needed a certain
      library in order to work. If the library happened to be installed then
      the test would run as normal.
      
      However, CI has never run these tests as the packages have not been
      installed and we don't want out tests to depend on things which might
      get externally broken by updating the compiler.
      
      The new strategy is to run these tests in head.hackage, where the tests
      have been cabalised as well as possible. Some tests couldn't be
      transferred into the normal style testsuite but it's better than never
      running any of the reqlib tests. head.hackage!169
      
      A few submodules also had reqlib tests and have been updated to remove
      it.
      
      Closes #16264 #20032 #17764 #16561
      3ed90911
  29. Sep 08, 2021
  30. May 20, 2021
    • Sylvain Henry's avatar
      Cmm: fix sinking after suspendThread · f192e623
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Suppose a safe call: myCall(x,y,z)
      
      It is lowered into three unsafe calls in Cmm:
      
        r = suspendThread(...);
        myCall(x,y,z);
        resumeThread(r);
      
      Consider the following situation for myCall arguments:
      
        x = Sp[..] -- stack
        y = Hp[..] -- heap
        z = R1     -- global register
        r = suspendThread(...);
        myCall(x,y,z);
        resumeThread(r);
      
      The sink pass assumes that unsafe calls clobber memory (heap and stack),
      hence x and y assignments are not sunk after `suspendThread`. The sink
      pass also correctly handles global register clobbering for all unsafe
      calls, except `suspendThread`!
      
      `suspendThread` is special because it releases the capability the thread
      is running on. Hence the sink pass must also take into account global
      registers that are mapped into memory (in the capability).
      
      In the example above, we could get:
      
        r = suspendThread(...);
        z = R1
        myCall(x,y,z);
        resumeThread(r);
      
      But this transformation isn't valid if R1 is (BaseReg->rR1) as BaseReg
      is invalid between suspendThread and resumeThread. This caused argument
      corruption at least with the C backend ("unregisterised") in #19237.
      
      Fix #19237
      f192e623
  31. Mar 29, 2021
    • Alfredo Di Napoli's avatar
      Add `MessageClass`, rework `Severity` and add `DiagnosticReason`. · c30af951
      Alfredo Di Napoli authored
      Other than that:
      
      * Fix T16167,json,json2,T7478,T10637 tests to reflect the introduction of
        the `MessageClass` type
      
      * Remove `makeIntoWarning`
      
      * Remove `warningsToMessages`
      
      * Refactor GHC.Tc.Errors
      
        1. Refactors GHC.Tc.Errors so that we use `DiagnosticReason` for "choices"
           (defer types errors, holes, etc);
      
        2. We get rid of `reportWarning` and `reportError` in favour of a general
           `reportDiagnostic`.
      
      * Introduce `DiagnosticReason`, `Severity` is an enum: This big commit makes
        `Severity` a simple enumeration, and introduces the concept of `DiagnosticReason`,
        which classifies the /reason/ why we are emitting a particular diagnostic.
        It also adds a monomorphic `DiagnosticMessage` type which is used for
        generic messages.
      
      * The `Severity` is computed (for now) from the reason, statically.
        Later improvement will add a `diagReasonSeverity` function to compute
        the `Severity` taking `DynFlags` into account.
      
      * Rename `logWarnings` into `logDiagnostics`
      
      * Add note and expand description of the `mkHoleError` function
      c30af951
  32. Mar 10, 2021
  33. Mar 07, 2021
    • Ben Gamari's avatar
      Implement BoxedRep proposal · 3e082f8f
      Ben Gamari authored
      This implements the BoxedRep proposal, refactoring the `RuntimeRep`
      hierarchy from:
      
      ```haskell
      data RuntimeRep = LiftedPtrRep | UnliftedPtrRep | ...
      ```
      
      to
      
      ```haskell
      data RuntimeRep = BoxedRep Levity | ...
      data Levity = Lifted | Unlifted
      ```
      
      Updates binary, haddock submodules.
      
      Closes #17526.
      
      Metric Increase:
          T12545
      3e082f8f
  34. Mar 03, 2021
    • Sylvain Henry's avatar
      Fix array and cleanup conversion primops (#19026) · d8dc0f96
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      The first change makes the array ones use the proper fixed-size types,
      which also means that just like before, they can be used without
      explicit conversions with the boxed sized types. (Before, it was Int# /
      Word# on both sides, now it is fixed sized on both sides).
      
      For the second change, don't use "extend" or "narrow" in some of the
      user-facing primops names for conversions.
      
        - Names like `narrowInt32#` are misleading when `Int` is 32-bits.
      
        - Names like `extendInt64#` are flat-out wrong when `Int is
          32-bits.
      
        - `narrow{Int,Word}<N>#` however map a type to itself, and so don't
          suffer from this problem. They are left as-is.
      
      These changes are batched together because Alex happend to use the array
      ops. We can only use released versions of Alex at this time, sadly, and
      I don't want to have to have a release thatwon't work for the final GHC
      9.2. So by combining these we get all the changes for Alex done at once.
      
      Bump hackage state in a few places, and also make that workflow slightly
      easier for the future.
      
      Bump minimum Alex version
      
      Bump Cabal, array, bytestring, containers, text, and binary submodules
      d8dc0f96
Loading