Last active
October 5, 2018 16:24
-
-
Save blegat/c2109508c3ebad65b94de4ea1b565510 to your computer and use it in GitHub Desktop.
iterate_inferred_nothing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Polyhedra | |
h = HyperPlane([0, 1], 1) ∩ HyperPlane([0, 1], -1) | |
code = Any[ | |
Expr(:(=), Core.SlotNumber(1), 0), | |
Expr(:call, GlobalRef(Main, :hyperplanes), GlobalRef(Main, :h)), | |
Expr(:(=), Core.SlotNumber(2), Expr(:call, Base.iterate, Base.SSAValue(2))), | |
Expr(:call, Core.:(===), Core.SlotNumber(2), nothing), | |
Expr(:call, Base.not_int, Base.SSAValue(4)), | |
Expr(:gotoifnot, Base.SSAValue(5), 16), | |
Core.SlotNumber(2), | |
Expr(:(=), Core.SlotNumber(3), Expr(:call, Core.getfield, Base.SSAValue(7), 1)), | |
Expr(:call, Core.getfield, Base.SSAValue(7), 2), | |
Expr(:(=), Core.SlotNumber(1), Expr(:call, Main.:(+), Core.SlotNumber(1), 1)), | |
Expr(:(=), Core.SlotNumber(2), Expr(:call, Base.iterate, Base.SSAValue(2), Base.SSAValue(9))), | |
Expr(:call, Core.:(===), Core.SlotNumber(2), nothing), | |
Expr(:call, Base.not_int, Base.SSAValue(12)), | |
Expr(:gotoifnot, Base.SSAValue(13), 16), | |
Base.GotoNode(7), | |
Expr(:call, Main.println, Core.SlotNumber(1)), | |
Expr(:return, Base.SSAValue(16))] | |
linetable = Any[Core.LineInfoNode(Main, Symbol("top-level scope"), Symbol("/home/blegat/.julia/dev/Polyhedra/ko.jl"), 4, 0), | |
Core.LineInfoNode(Main, Symbol("top-level scope"), Symbol("/home/blegat/.julia/dev/Polyhedra/ko.jl"), 5, 0), | |
Core.LineInfoNode(Main, Symbol("top-level scope"), Symbol("/home/blegat/.julia/dev/Polyhedra/ko.jl"), 6, 0), | |
Core.LineInfoNode(Main, Symbol("top-level scope"), Symbol("/home/blegat/.julia/dev/Polyhedra/ko.jl"), 8, 0)] | |
info = ccall(:jl_new_code_info_uninit, Ref{Base.CodeInfo}, ()) | |
info.code = code | |
info.codelocs=Int32[1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4] | |
info.method_for_inference_limit_heuristics=nothing | |
info.ssavaluetypes=17 | |
info.linetable=linetable | |
info.ssaflags=UInt8[] | |
info.slotflags=UInt8[0x00, 0x00, 0x10] | |
info.slotnames=Any[:i, Symbol("#temp#"), :a] | |
info.inferred=false | |
info.inlineable=false | |
info.propagate_inbounds=false | |
info.pure=false | |
method = ccall(:jl_new_method_instance_uninit, Ref{Base.MethodInstance}, ()) | |
method.def = Main | |
method.specTypes = Tuple{} | |
method.rettype = Any | |
method.sparam_vals = Core.svec() | |
method.inferred = info | |
Core.Compiler.typeinf_ext(method, UInt(0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It currently returns the correct code:
although it seems to be exactly what gdb was printing. Any idea where the difference could lie ?