Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break dependency between loading and Core.Compiler #56186

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

Keno
Copy link
Member

@Keno Keno commented Oct 16, 2024

This code was originally added in df81bf9 where Core.Compiler would keep an array of all the things it inferred, which could then be provieded to the runtime to be included in the package image. In 113efb6 keeping the array itself became a runtime service for locking considerations. As a result, the role of Core.Compiler here is a bit weird. It has the enable switch and the GC root, but all the actual state is being managed by the runtime.

It would be desirable to remove the Core.Compiler reference, so that loading.jl can function even if Core.Compiler does not exist (which is in theory supposed to be possible, even though we currently never run in such a configuration; that said, post trimming one might imagine useful instances of such a setup).

To do this, put the runtime fully in charge of managing this array. Core.Compiler will call the callback unconditionally for all newly inferred cis and the runtime can decide whether to save it or not.

Extracted from #56128

This code was originally added in df81bf9
where Core.Compiler would keep an array of all the things it inferred,
which could then be provieded to the runtime to be included in the
package image. In 113efb6 keeping the
array itself became a runtime service for locking considerations. As
a result, the role of Core.Compiler here is a bit weird. It has the
enable switch and the GC root, but all the actual state is being
managed by the runtime.

It would be desirable to remove the Core.Compiler reference, so that
loading.jl can function even if `Core.Compiler` does not exist (which
is in theory supposed to be possible, even though we currently
never run in such a configuration; that said, post trimming one might
imagine useful instances of such a setup).

To do this, put the runtime fully in charge of managing this array.
Core.Compiler will call the callback unconditionally for all newly
inferred cis and the runtime can decide whether to save it or not.

Extracted from #56128
@Keno Keno requested review from vtjnash and timholy October 16, 2024 09:36
@oscardssmith oscardssmith merged commit b7b79eb into master Oct 16, 2024
7 checks passed
@oscardssmith oscardssmith deleted the kf/newly_inferred branch October 16, 2024 18:49
Keno pushed a commit that referenced this pull request Oct 18, 2024
KristofferC pushed a commit that referenced this pull request Oct 21, 2024
This code was originally added in
df81bf9 where Core.Compiler would keep
an array of all the things it inferred, which could then be provieded to
the runtime to be included in the package image. In
113efb6 keeping the array itself became
a runtime service for locking considerations. As a result, the role of
Core.Compiler here is a bit weird. It has the enable switch and the GC
root, but all the actual state is being managed by the runtime.

It would be desirable to remove the Core.Compiler reference, so that
loading.jl can function even if `Core.Compiler` does not exist (which is
in theory supposed to be possible, even though we currently never run in
such a configuration; that said, post trimming one might imagine useful
instances of such a setup).

To do this, put the runtime fully in charge of managing this array.
Core.Compiler will call the callback unconditionally for all newly
inferred cis and the runtime can decide whether to save it or not.

Extracted from #56128
KristofferC pushed a commit that referenced this pull request Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants