[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Add quotRem rules (#22152)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Apr 13 23:57:04 UTC 2023



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


Commits:
59321879 by Sylvain Henry at 2023-04-13T08:50:33-04:00
Add quotRem rules (#22152)

  case quotRemInt# x y of
     (# q, _ #) -> body
  ====>
   case quotInt# x y of
     q -> body

  case quotRemInt# x y of
     (# _, r #) -> body
  ====>
   case remInt# x y of
     r -> body

- - - - -
4dd02122 by Sylvain Henry at 2023-04-13T08:50:33-04:00
Add quot folding rule (#22152)

   (x / l1) / l2
   l1 and l2 /= 0
   l1*l2 doesn't overflow
   ==> x / (l1 * l2)

- - - - -
1148ac72 by Sylvain Henry at 2023-04-13T08:50:33-04:00
Make Int64/Word64 division ok for speculation too.

Only when the divisor is definitely non-zero.

- - - - -
8af401cc by Sylvain Henry at 2023-04-13T08:50:33-04:00
Make WordQuotRem2Op ok-for-speculation too

- - - - -
27d2978e by Josh Meredith at 2023-04-13T08:51:09-04:00
Base/JS: GHC.JS.Foreign.Callback module (issue 23126)

* Add the Callback module for "exporting" Haskell functions
to be available to plain JavaScript code

* Fix some primitives defined in GHC.JS.Prim

* Add a JavaScript section to the user guide with instructions
on how to use the JavaScript FFI, building up to using Callbacks
to interact with the browser

* Add tests for the JavaScript FFI and Callbacks

- - - - -
18a451d2 by Adam Sandberg Ericsson at 2023-04-13T19:56:59-04:00
rts: improve memory ordering and add some comments in the StablePtr implementation

- - - - -
6813e725 by Matthew Pickering at 2023-04-13T19:57:00-04:00
docs: Generate docs/index.html with version number

* Generate docs/index.html to include the version of the ghc library

* This also fixes the packageVersions interpolations which were
  - Missing an interpolation for `LIBRARY_ghc_VERSION`
  - Double quoting the version so that "9.7" was being inserted.

Fixes #23121

- - - - -


30 changed files:

- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Types/Literal.hs
- docs/index.html → docs/index.html.in
- docs/users_guide/index.rst
- + docs/users_guide/javascript.rst
- hadrian/src/Rules/Documentation.hs
- hadrian/src/Rules/Generate.hs
- + libraries/base/GHC/JS/Foreign/Callback.hs
- libraries/base/GHC/JS/Prim.hs
- libraries/base/base.cabal
- rts/StablePtr.c
- testsuite/tests/javascript/all.T
- + testsuite/tests/javascript/js-callback01.hs
- + testsuite/tests/javascript/js-callback01.stdout
- + testsuite/tests/javascript/js-callback02.hs
- + testsuite/tests/javascript/js-callback02.stdout
- + testsuite/tests/javascript/js-callback03.hs
- + testsuite/tests/javascript/js-callback03.stdout
- + testsuite/tests/javascript/js-callback04.hs
- + testsuite/tests/javascript/js-callback04.stdout
- + testsuite/tests/javascript/js-callback05.hs
- + testsuite/tests/javascript/js-callback05.stdout
- + testsuite/tests/javascript/js-ffi-array.hs
- + testsuite/tests/javascript/js-ffi-array.stdout
- + testsuite/tests/javascript/js-ffi-int.hs
- + testsuite/tests/javascript/js-ffi-int.stdout
- + testsuite/tests/javascript/js-ffi-isNull.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f435268da08a9f6f4c0ec7581755ff48f9044327...6813e72540043bc52fa86e66e916f4e911682728

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f435268da08a9f6f4c0ec7581755ff48f9044327...6813e72540043bc52fa86e66e916f4e911682728
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/20230413/cdcd439d/attachment.html>


More information about the ghc-commits mailing list