-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
type inference runtime correctness (oldworld) #17057
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
d952dd4
to
cb2ea2c
Compare
@@ -1,5 +1,5 @@ | |||
// This file is a part of Julia. License is MIT: http://julialang.org/license | |||
|
|||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
7a69201
to
6e6cc4e
Compare
32bee7b
to
90e700f
Compare
416322b
to
7529828
Compare
when this is ready for a pkgeval run, let me know - should definitely evaluate the scale of what this is going to break |
e80758c
to
f3b35db
Compare
@@ -34,10 +34,18 @@ typealias VarTable Array{Any,1} | |||
type VarState | |||
typ | |||
undef::Bool | |||
function VarState(typ::ANY, undef::Bool) | |||
if isa(typ, DataType) && isdefined(typ, :instance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it would catch more cases to put this in abstract_eval instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, although that would miss the specific case I cared about (turning singleton arguments into Const
values).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. In that case it would make more sense to do the transformation at the point where the arguments are received. VarState
is wrapper-like, so it's confusing if it changes the thing you're wrapping in addition to wrapping it.
4dcda90
to
cb1b4b8
Compare
backport of changes in #17057 that don't require new worlds
Did inlining semantics change with this PR? For example: @noinline child() = return nothing
parent() = child()
@code_llvm parent() on f27c6f3: define void @julia_parent_60601() #0 {
top:
call void @julia_child_60602() #0
ret void
} on master (44d7677): define void @julia_parent_61546() #0 {
top:
ret void
} Expected? |
devdocs that explain what a backedge is / means would be good to add before too long |
Due to JuliaLang/julia#17057, method definitions happening inside an `eval` are not immediataly visible outside the eval (which is still at an older world age).
Due to JuliaLang/julia#17057, method definitions happening inside an `eval` are not immediataly visible outside the eval (which is still at an older world age).
After #17057, building the system image seems to take significantly more stack space, resulting in a StackOverflowError.
This
starts toimplement[s]the runtime structures to tracktype-inference correctness of our statically computed type inference information. It handles ensuring that old (on stack) code won't see mutations to the method tables.Next step will be to[It now] tracks this information more carefully through inference to build and store all of the edges for invalidation to ensure that evaluating new code only sees the newest code.TODO:
optimize=false
flag tocode_typed
@generated
function examplefinish
to add the backedge to the right MethodInstance even while resolving cyclesLater followup work:
fix #265