Re: Simulating Lua states in Lua with only 250 lines of code
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Simulating Lua states in Lua with only 250 lines of code
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2015年6月24日 14:49:38 -0300
> Probably something like 5.1's setfenv()/getfenv(), but with bytecode
> instead?
In 5.1, the environment has a fixed location (a field in the closure
structure). In 5.2/5.3, the environment is the current _ENV, which
can be any upvalue or local variable.
-- Roberto