[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [proposal] Type metatables per environment
- From: Miles Bader <miles@...>
- Date: Fri, 23 Dec 2011 04:49:43 +0900
Daurnimator <firstname.lastname@example.org> writes:
>> Soooo what are the details? How does the compiler implement this?
>> How would it impact performance?
>> Do you mean that, for instance, OP_GETTABLE would need a 4th argument
>> to pass in _ENV? ... and _every_ indexing operation (maybe the most
>> common operation in Lua bytecode) would then need to get and pass in
> A not too odd assumption to make is that the current environment (ie, _ENV)
> is always available for a function/VM instruction.
Maybe so, but in the 5.2 VM, access to _ENV always seems to be
explicit, not implicit ... _ENV is treated like any other local
variable in the top-level chunk.
XML is like violence. If it doesn't solve your problem, you're not
using enough of it.