<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git, branch wip/T21708</title>
<subtitle>gitlab.haskell.org: ghc/ghc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/'/>
<entry>
<title>Make keepAlive# out-of-line</title>
<updated>2022-07-15T22:16:28+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2022-06-30T19:06:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=d75c540d439510491b45f64c1113762dcb251ae1'/>
<id>d75c540d439510491b45f64c1113762dcb251ae1</id>
<content type='text'>
This is a naive approach to fixing the unsoundness noticed in #21708.
Specifically, we remove the lowering of `keepAlive#` via CorePrep and
instead turn it into an out-of-line primop.
This is simple, inefficient (since the continuation must now be heap
allocated), but good enough for 9.4.1. We will revisit this
(particiularly via #16098) in a future release.

Metric Increase:
    T4978
    T7257
    T9203
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a naive approach to fixing the unsoundness noticed in #21708.
Specifically, we remove the lowering of `keepAlive#` via CorePrep and
instead turn it into an out-of-line primop.
This is simple, inefficient (since the continuation must now be heap
allocated), but good enough for 9.4.1. We will revisit this
(particiularly via #16098) in a future release.

Metric Increase:
    T4978
    T7257
    T9203
</pre>
</div>
</content>
</entry>
<entry>
<title>Document RuntimeRep polymorphism limitations of catch#, et al</title>
<updated>2022-07-15T22:16:28+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2022-07-15T21:11:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=3d5f9ba19fea5455d778d2ee9c3fdcaad77d1db7'/>
<id>3d5f9ba19fea5455d778d2ee9c3fdcaad77d1db7</id>
<content type='text'>
As noted in #21868, several primops accepting continuations producing
RuntimeRep-polymorphic results aren't nearly as polymorphic as their
types suggest. Document this limitation and adapt the `UnliftedWeakPtr`
test to avoid breaking this limitation in `keepAlive#`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As noted in #21868, several primops accepting continuations producing
RuntimeRep-polymorphic results aren't nearly as polymorphic as their
types suggest. Document this limitation and adapt the `UnliftedWeakPtr`
test to avoid breaking this limitation in `keepAlive#`.
</pre>
</div>
</content>
</entry>
<entry>
<title>rts: Fix AdjustorPool bitmap manipulation</title>
<updated>2022-07-14T00:44:08+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2022-07-10T02:02:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=dcf8b30a1a5f802b1d8a22ea74499e2896a6ff16'/>
<id>dcf8b30a1a5f802b1d8a22ea74499e2896a6ff16</id>
<content type='text'>
Previously the implementation of bitmap_first_unset assumed that
`__builtin_clz` would accept `uint8_t` however it apparently rather
extends its argument to `unsigned int`.

To fix this we simply revert to a naive implementation since handling
the various corner cases with `clz` is quite tricky. This should be
fine given that AdjustorPool isn't particularly hot. Ideally we would
have a single, optimised bitmap implementation in the RTS but I'll leave
this for future work.

Fixes #21838.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously the implementation of bitmap_first_unset assumed that
`__builtin_clz` would accept `uint8_t` however it apparently rather
extends its argument to `unsigned int`.

To fix this we simply revert to a naive implementation since handling
the various corner cases with `clz` is quite tricky. This should be
fine given that AdjustorPool isn't particularly hot. Ideally we would
have a single, optimised bitmap implementation in the RTS but I'll leave
this for future work.

Fixes #21838.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix potential space leak that arise from ModuleGraphs retaining references</title>
<updated>2022-07-14T00:43:32+00:00</updated>
<author>
<name>Zubin Duggal</name>
<email>zubin.duggal@gmail.com</email>
</author>
<published>2022-07-05T09:28:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=a2f142f84bbc865f586ecc6ce94126c5427a86c1'/>
<id>a2f142f84bbc865f586ecc6ce94126c5427a86c1</id>
<content type='text'>
to previous ModuleGraphs, in particular the lazy `mg_non_boot` field.
This manifests in `extendMG`.

Solution: Delete `mg_non_boot` as it is only used for `mgLookupModule`, which
is only called in two places in the compiler, and should only be called at most
once for every home unit:

GHC.Driver.Make:
      mainModuleSrcPath :: Maybe String
      mainModuleSrcPath = do
        ms &lt;- mgLookupModule mod_graph (mainModIs hue)
        ml_hs_file (ms_location ms)

GHCI.UI:
listModuleLine modl line = do
   graph &lt;- GHC.getModuleGraph
   let this = GHC.mgLookupModule graph modl

Instead `mgLookupModule` can be a linear function that looks through the entire
list of `ModuleGraphNodes`

Fixes #21816
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to previous ModuleGraphs, in particular the lazy `mg_non_boot` field.
This manifests in `extendMG`.

Solution: Delete `mg_non_boot` as it is only used for `mgLookupModule`, which
is only called in two places in the compiler, and should only be called at most
once for every home unit:

GHC.Driver.Make:
      mainModuleSrcPath :: Maybe String
      mainModuleSrcPath = do
        ms &lt;- mgLookupModule mod_graph (mainModIs hue)
        ml_hs_file (ms_location ms)

GHCI.UI:
listModuleLine modl line = do
   graph &lt;- GHC.getModuleGraph
   let this = GHC.mgLookupModule graph modl

Instead `mgLookupModule` can be a linear function that looks through the entire
list of `ModuleGraphNodes`

Fixes #21816
</pre>
</div>
</content>
</entry>
<entry>
<title>Hadrian: update documentation of settings</title>
<updated>2022-07-13T18:00:56+00:00</updated>
<author>
<name>sheaf</name>
<email>sam.derbyshire@gmail.com</email>
</author>
<published>2022-07-11T10:30:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=6a9e44932945bfcc2f2eb169bd175ab029d9bf72'/>
<id>6a9e44932945bfcc2f2eb169bd175ab029d9bf72</id>
<content type='text'>
The documentation for key-value settings was a bit out of date.
This patch updates it to account for `cabal.configure.opts` and
`hsc2hs.run.opts`.

The user-settings document was also re-arranged, to make the key-value
settings more prominent (as it doesn't involve changing the Hadrian
source code, and thus doesn't require any recompilation of Hadrian).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation for key-value settings was a bit out of date.
This patch updates it to account for `cabal.configure.opts` and
`hsc2hs.run.opts`.

The user-settings document was also re-arranged, to make the key-value
settings more prominent (as it doesn't involve changing the Hadrian
source code, and thus doesn't require any recompilation of Hadrian).
</pre>
</div>
</content>
</entry>
<entry>
<title>testsuite: Factor out common parts from hiefile tests</title>
<updated>2022-07-13T18:00:18+00:00</updated>
<author>
<name>Zubin Duggal</name>
<email>zubin.duggal@gmail.com</email>
</author>
<published>2022-04-13T09:45:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=9c52e7fcacb8ba163e980c9765ebff5d91ae6f4a'/>
<id>9c52e7fcacb8ba163e980c9765ebff5d91ae6f4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>hie-files: Record location of filled in default method bindings</title>
<updated>2022-07-13T18:00:18+00:00</updated>
<author>
<name>Zubin Duggal</name>
<email>zubin.duggal@gmail.com</email>
</author>
<published>2022-03-24T05:51:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=c4989131563efca8692c341e7b08096ac9a3b53b'/>
<id>c4989131563efca8692c341e7b08096ac9a3b53b</id>
<content type='text'>
This is useful for hie files to reconstruct the evidence that default methods
depend on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful for hie files to reconstruct the evidence that default methods
depend on.
</pre>
</div>
</content>
</entry>
<entry>
<title>hie-files: Fix scopes for deriving clauses and instance signatures (#18425)</title>
<updated>2022-07-13T18:00:18+00:00</updated>
<author>
<name>Zubin Duggal</name>
<email>zubin.duggal@gmail.com</email>
</author>
<published>2022-03-17T14:11:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=e9d9f0784e8670c6b85f1bf80e26b571b08519b5'/>
<id>e9d9f0784e8670c6b85f1bf80e26b571b08519b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tarball</title>
<updated>2022-07-13T12:28:29+00:00</updated>
<author>
<name>Eric Lindblad</name>
<email>lindblad@gmx.us</email>
</author>
<published>2022-07-09T18:23:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=8b417ad54a91a7e12671cf059e0b5a3be43bbce2'/>
<id>8b417ad54a91a7e12671cf059e0b5a3be43bbce2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix bootstrap</title>
<updated>2022-07-13T12:28:29+00:00</updated>
<author>
<name>Eric Lindblad</name>
<email>lindblad@gmx.us</email>
</author>
<published>2022-07-08T19:49:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=61babb5edff00c2929ffbb615d8a3110db1b4b5b'/>
<id>61babb5edff00c2929ffbb615d8a3110db1b4b5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
