[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Generation of luaB_pairs() in parser?
- From: Jason_Chown@...
- Date: Fri, 30 Jan 2004 09:08:16 +0000
Hi,
Could anyone point me to where the code generator emits the implied
pairs(t) in "for k,v in t do"? It doesn't seem to actually call pairs()...
Reasoning: For scoping and memory efficiency we are using many threads,
with each thread sharing access to a single global state for the mapping of
our API (it was too expensive to map every function into many states). This
requires a metatable hit to thunk to the global state, which means the
lua_rawget() in luaB_pairs() needs to be changed to a lua_gettable(). This
works for "for k,v in pairs(t) do" but the implied pairs() in for "k,v, in
t do" isn't working, so I'm guessing the code generators inserts the code
literally.
Jason Chown
Head Programmer
SCEE Studio Liverpool
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster@scee.net
This footnote also confirms that this email message has been checked
for all known viruses.
**********************************************************************
SCEE 2004