Use a growable, per-chunk bytecode instruction/line stack. Collect bc/lineinfo for prototype at the end.
Use a growable, per-chunk variable stack. Collect varinfo/uvname for prototype at the end.