http://www.cs.indiana.edu/~dyb/
(See also Lua's upvalues for a way to optimize closure variable access that's a bit simpler than his display closures).
Yes! In fact, that's how the C version of the interpreter in my book implements closures. It's pretty brilliant. <3 those Lua folks.
Or perhaps do you have a link about how it works?
http://www.cs.indiana.edu/~dyb/
(See also Lua's upvalues for a way to optimize closure variable access that's a bit simpler than his display closures).