[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 8 commits: Add sized primitive literal syntax
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu May 4 08:53:51 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
931c8d82 by Ben Orchard at 2023-05-03T20:16:18-04:00
Add sized primitive literal syntax
Adds a new LANGUAGE pragma ExtendedLiterals, which enables defining
unboxed numeric literals such as `0xFF#Word8 :: Word8#`.
Implements GHC proposal 0451:
https://github.com/ghc-proposals/ghc-proposals/blob/b384a538b34f79d18a0201455b7b3c473bc8c936/proposals/0451-sized-literals.rst
Fixes #21422.
Bumps haddock submodule.
Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io>
- - - - -
f3460845 by Bodigrim at 2023-05-03T20:16:57-04:00
Document instances of Double
- - - - -
1e9caa1a by Sylvain Henry at 2023-05-03T20:17:37-04:00
Bump Cabal submodule (#22356)
- - - - -
4eafb52a by sheaf at 2023-05-03T20:18:16-04:00
Don't forget to check the parent in an export list
Commit 3f374399 introduced a bug which caused us to forget to include
the parent of an export item of the form T(..) (that is, IEThingAll)
when checking for duplicate exports.
Fixes #23318
- - - - -
8fde4ac8 by amesgen at 2023-05-03T20:18:57-04:00
Fix unlit path in cross bindists
- - - - -
070511c8 by Josh Meredith at 2023-05-04T04:53:42-04:00
JS: fix bounds checking (Issue 23123)
* For ByteArray-based bounds-checking, the JavaScript backend must use the
`len` field, instead of the inbuild JavaScript `length` field.
* Range-based operations must also check both the start and end of the range
for bounds
* All indicies are valid for ranges of size zero, since they are essentially no-ops
* For cases of ByteArray accesses (e.g. read as Int), the end index is
(i * sizeof(type) + sizeof(type) - 1), while the previous implementation
uses (i + sizeof(type) - 1). In the Int32 example, this is (i * 4 + 3)
* IndexByteArrayOp_Word8As* primitives use byte array indicies (unlike
the previous point), but now check both start and end indicies
* Byte array copies now check if the arrays are the same by identity and
then if the ranges overlap.
- - - - -
b06809ec by Sylvain Henry at 2023-05-04T04:53:42-04:00
Fix remaining issues with bound checking (#23123)
While fixing these I've also changed the way we store addresses into
ByteArray#. Addr# are composed of two parts: a JavaScript array and an
offset (32-bit number).
Suppose we want to store an Addr# in a ByteArray# foo at offset i.
Before this patch, we were storing both fields as a tuple in the "arr"
array field:
foo.arr[i] = [addr_arr, addr_offset];
Now we only store the array part in the "arr" field and the offset
directly in the array:
foo.dv.setInt32(i, addr_offset):
foo.arr[i] = addr_arr;
It avoids wasting space for the tuple.
- - - - -
bbe91801 by Andrei Borzenkov at 2023-05-04T04:53:47-04:00
Improved documentation for the Data.OldList.nub function
There was recomentation to use map head . group . sort instead of nub
function, but containers library has more suitable and efficient
analogue
- - - - -
30 changed files:
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/Lit.hs
- docs/users_guide/9.8.1-notes.rst
- + docs/users_guide/exts/extended_literals.rst
- docs/users_guide/exts/literals.rst
- docs/users_guide/exts/primitives.rst
- docs/users_guide/exts/stolen_syntax.rst
- hadrian/bindist/Makefile
- libraries/Cabal
- libraries/base/Data/OldList.hs
- libraries/base/GHC/Float.hs
- libraries/base/GHC/Real.hs
- libraries/base/jsbits/base.js
- libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
- rts/js/environment.js
- rts/js/mem.js
- rts/js/profiling.js
- rts/js/staticpointer.js
- rts/js/string.js
- testsuite/tests/codeGen/should_fail/all.T
- testsuite/tests/codeGen/should_run/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f64c919de724052ad7943615e7aeabe9eda3b9f0...bbe918016f9e7bcfd7800affebda90eab8663ee2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f64c919de724052ad7943615e7aeabe9eda3b9f0...bbe918016f9e7bcfd7800affebda90eab8663ee2
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/20230504/3817fca1/attachment.html>
More information about the ghc-commits
mailing list