lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thursday 30 September 2004 19:31, Roberto Ierusalimschy wrote:
> Theoretically, you should be able to change the size of registers
> changing only the type Instruction in llimits.h (to "long long", say)
> plus some constants in lopcodes.h (SIZE_C, SIZE_B, SIZE_A). Have you
> tried that?

I had tried changing SIZE_C and SIZE_B to 25 (for a total register size of 64 
bits) but I didn't change the Instruction type to long long. It worked now 
and I can load my 512x512 texture just fine! Thanks for the hint and for 
writing such clean and well organized code (although your indentation sure is 
weird. Whitespaces aren't evil you know :). Well I'm perfectly happy with 
having to change a couple of macros and typedefs but maybe it would be useful 
to make this configurable in luaconf.h (although long longs aren't ansi C I 
know). What will the impact of this change be? I just noticed that compiling 
a script with a single instruction returning a table of 1000 doubles gives a 
binary of approx. 12k as opposed to the expected 8k the previous version 
does. I suppose every item in the constructor counts as an instruction an 
therefore carries the 4 byte overhead. Definitely not good but I'll see what 
I'll do. Compression seems to help a lot. Thanks again.

Dimitris