-
Notifications
You must be signed in to change notification settings - Fork 33
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
@interpreter^2 fails #228
Comments
This now works if we disable julia> f() = @interpret 1+1
f (generic function with 1 method)
julia> @interpret f()
2 If I add it back (note that I run the check to see that we are not double adding a julia> JuliaInterpreter.debug_recycle[] = true;
julia> @interpret f()
ERROR: add_int: types of a and b must match
Stacktrace:
[1] #evaluate_call_recurse!#37(::Bool, ::Function, ::Any, ::Frame, ::Expr) at C:\Users\Kristoffer\Debugging\JuliaInterpreter\src\interpret.jl:216
[2] evaluate_call_recurse! at C:\Users\Kristoffer\Debugging\JuliaInterpreter\src\interpret.jl:205 [inlined]
[3] eval_rhs(::Any, ::Frame, ::Expr) at C:\Users\Kristoffer\Debugging\JuliaInterpreter\src\interpret.jl:371 We have some kind of corruption because the value of Edit: Changing |
Here is a MWE of an error (with struct S
a::Float64
end
f() = @interpret S(1.0) julia> f()
S(1.0)
julia> @interpret f()
S(0.0) |
For anyone that would like to debug the nested interpretation and want to keep your sanity. Duplicate JuliaInterpreter into a new package (JuliaInterpreter2) and do something like
Otherwise you don't know which print statements comes from the innner or outer interpretation etc... |
I think there might be confusion with SSAValues from the outer interpreter getting mixed with SSAValues of the inner interpreter. Presumably, we would need some "tagging" system to tag SSAVaulues from differents nesting level of interpretation. |
Would be cool if this would work:
Might be problematic with our globals and so on.
The text was updated successfully, but these errors were encountered: