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

unhandled LimitedAccuracy in annotate_slottypes! #442

Closed
KristofferC opened this issue Apr 26, 2023 · 0 comments · Fixed by #445
Closed

unhandled LimitedAccuracy in annotate_slottypes! #442

KristofferC opened this issue Apr 26, 2023 · 0 comments · Fixed by #445

Comments

@KristofferC
Copy link
Member

Using @snoopr on OmniPackage.jl on master and then trying to ascend into one of the invalidations gives an error in Julia.

I am not sure where the core issue is, opening here for now.

julia> trees[end].backedges[end]
MethodInstance for Base.Broadcast.materialize(::Base.Broadcast.Broadcasted) at depth 1 with 1 children

julia> ascend(trees[end].backedges[end])
Choose a call for analysis (q to quit):
     materialize(::Base.Broadcast.Broadcasted)
 >     #surfaceplot#135(::Symbol, ::Type{UnicodePlots.BrailleCanvas}, ::Symbol, ::Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, ::typeof(UnicodePlots.surfaceplot), ::AbstractVecOrMat, ::AbstractVecOrMat, ::AbstractVector)
ERROR: unhandled LimitedAccuracy
Stacktrace:
   [1] error(s::String)
     @ Core.Compiler ./error.jl:35
   [2] widenconst(::Core.Compiler.LimitedAccuracy)
     @ Core.Compiler ./compiler/typelattice.jl:733
   [3] record_slot_assign!(sv::Core.Compiler.InferenceState)
     @ Core.Compiler ./compiler/typeinfer.jl:601
   [4] annotate_slottypes!
     @ ~/.julia/packages/Cthulhu/KIvdU/src/interpreter.jl:143 [inlined]
   [5] Cthulhu.InferredSource(state::Core.Compiler.InferenceState)
     @ Cthulhu ~/.julia/packages/Cthulhu/KIvdU/src/interpreter.jl:153
   [6] finish(state::Core.Compiler.InferenceState, interp::Cthulhu.CthulhuInterpreter)
     @ Cthulhu ~/.julia/packages/Cthulhu/KIvdU/src/interpreter.jl:171

cc @aviatesk

aviatesk added a commit that referenced this issue Apr 27, 2023
On nightly Cthulhu.jl tries to generate `src.slottypes::Vector{Any}`
even when there is heavy recursion detected (xref #418), but it turns
out that `record_slot_assign!(sv)` works only when `sv.ssavaluetypes`
does not contain any `LimitedAccuracy`ies (#442).

Luckily, while working on #418, we added the support in TypedSyntax
for the `src.slottypes === nothing` case, so we can use it and remove
the code to generate `src.slottypes::Vector{Any}`

Fixes #442.
aviatesk added a commit that referenced this issue Apr 27, 2023
On nightly Cthulhu.jl tries to generate `src.slottypes::Vector{Any}`
even when there is heavy recursion detected (xref #418), but it turns
out that `record_slot_assign!(sv)` works only when `sv.ssavaluetypes`
does not contain any `LimitedAccuracy`ies (#442).

Luckily, while working on #418, we added the support in TypedSyntax
for the `src.slottypes === nothing` case, so we can use it and remove
the code to generate `src.slottypes::Vector{Any}`

Fixes #442.
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 a pull request may close this issue.

1 participant