Weird ASTInterpreter output

I went over a massive package using ASTInterpreter (basically using commands n and s) and came across the following output. Why was such a long diagram printed and regular output omitted? Quite puzzled.

1|debug > s
Body`
├─ :(_6 = (Array{Any,1})(0))
│  ├─ _6
│  └─ Call
│     ├─ Array{Any,1}
│     └─ 0
├─ :(SSAValue(0) = (af.colon)(1,(Base.length)(_2) >> 1))
│  ├─ SSAValue(0)
│  └─ Call
│     ├─ af.colon
│     ├─ 1
│     └─ Call
│        ├─ Base.>>
│        ├─ Call
│        │  ├─ Base.length
│        │  └─ _2
│        └─ 1
├─ :(_7 = (Base.start)(SSAValue(0)))
│  ├─ _7
│  └─ Call
│     ├─ Base.start
│     └─ SSAValue(0)
├─ 4: 
├─ :(unless !((Base.done)(SSAValue(0),_7)) goto 14)
│  ├─ Call
│  │  ├─ Base.!
│  │  └─ Call
│  │     ├─ Base.done
│  │     ├─ SSAValue(0)
│  │     └─ _7
│  └─ 14
├─ :(SSAValue(1) = (Base.next)(SSAValue(0),_7))
│  ├─ SSAValue(1)
│  └─ Call
│     ├─ Base.next
│     ├─ SSAValue(0)
│     └─ _7
├─ :(_8 = (Core.getfield)(SSAValue(1),1))
│  ├─ _8
│  └─ Call
│     ├─ Core.getfield
│     ├─ SSAValue(1)
│     └─ 1
├─ :(_7 = (Core.getfield)(SSAValue(1),2))
│  ├─ _7
│  └─ Call
│     ├─ Core.getfield
│     ├─ SSAValue(1)
│     └─ 2
├─ :(_9 = _8 * 2 - 1)
│  ├─ _9
│  └─ Call
│     ├─ Base.-
│     ├─ Call
│     │  ├─ Base.*
│     │  ├─ _8
│     │  └─ 2
│     └─ 1
├─ :(_10 = (Core.arrayref)(_2,_9))
│  ├─ _10
│  └─ Call
│     ├─ Core.arrayref
│     ├─ _2
│     └─ _9
├─ Call
│  ├─ Core.ccall
│  ├─ :jl_array_ptr_1d_push
│  ├─ af.Void
│  ├─ Call
│  │  ├─ Core.svec
│  │  ├─ af.Any
│  │  └─ af.Any
│  ├─ _6
│  ├─ 0
│  ├─ Call
│  │  ├─ Core.tuple
│  │  ├─ _10
│  │  └─ Call
│  │     ├─ Core.arrayref
│  │     ├─ _2
│  │     └─ Call
│  │        ├─ Base.+
│  │        ├─ _9
│  │        └─ 1
│  └─ 0
├─ 12: 
├─ goto 4
├─ 14: 
└─ Return
   └─ Call
      ├─ af.#\#284
      ├─ _6
      ├─ _3
      ├─ _4
      └─ _5

I’ve seen this as well and my gut says it has something to do w/ keyword arguments. Definitely worth filing an issue with the steps to reproduce so it can be figured out.

Thanks for the comments! I’ll take some time to figure out an MWE and file a ticket. In the meanwhile, further comments are welcome.

It seems that Gallium and ASTInterpreter are not under active maintenance - there are a large number of issues unresolved and the last commit was pushed 3 months ago. :confused:

There’s only so much time in the day ;). 0.6 and other projects have taken a lot of my time lately, but worry not, there’ll be new and improved versions of both of these packages for 0.6.

Regarding the output above, that’s what ASTInterpreter does when it doesn’t have any source information. This can happen for functions generated by the front end, or for generated functions. For the keyword argument case, it generally tries to hide those from you, but it doesn’t always succeed.

2 Likes

Thanks so much for the comments. I realize that you created the Julia debugger single-handedly. Thanks for the hard work, without which I would probably have to print the value of every single variable for debugging. Really appreciate.

I’ll wait until the release of 0.6. For the time-being, the most urgent concern is another question I raised. If you can leave me a hint briefly, I’ll be most grateful.

Again, thanks!!