// cell dump_ir - Dump intermediate representation for a source file

var shop = use('internal/shop')
var json = use('json')

var optimized = shop.compile_file(args[0])

var instrs = optimized.main.instructions
var i = 0
while (i < length(instrs)) {
  log.compile(text(i) + ': ' + json.encode(instrs[i]))
  i = i + 1
}
