[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: main function has more than 200 local variables
- From: Rob Kendrick <lua-l@...>
- Date: Mon, 15 Jun 2009 16:46:22 +0100
On Mon, 15 Jun 2009 10:41:27 -0500
Sivan Thiruvengadam <rajskm@gmail.com> wrote:
> I am using LUA on Handheld Pocket PC based device. When i try to load
> a file which has around 500 local variables, the lua loadfile
> function throws the above error?
My understanding is that the Lua VM has a limited number of registers
(into which locals are placed), and the compiler has no mechanism to
spill excess elsewhere (in order to simplify the register allocator).
I may be hopelessly confused, however.
> Is there a fix already available and if so, please point me to that.
> And also if there is a better way to handle this please enlighten me.
Try putting them in a table instead? They're surprisingly quick, just
not as quick, as locals.
B.