Eval a CodeInfo object?


Digging through the Julia AST docs I’ve got curious how far we can go with the lowered code representation. In particular:

  1. Can we evaluate CodeInfo object as a whole?
  2. Can we evaluate each its expression (in .code field) step by step?
  3. Can we run type inference and/or compile CodeInfo object into a callable object (e.g. a function)?

I did all of these extensively in Espresso.jl for surface AST, but it has its drawbacks, so I’d like to know what I can do with the lowered version.