On Thu, Oct 5, 2017 at 3:16 AM, Peter Cawley <corsix@xxxxxxxxxx> wrote:
As mentioned above, the only IR you need is SNAP 0. Once you have
that, you need to go to your Lua source, identify which locals are
live, consider them in lexicographical order of definition, and line
them up 1:1 with SNAP entries - noting that function arguments count
as locals for this purpose (and obviously are lexicographically before
everything declared using the "local" keyword), for-loops count as an
extra three, etc.