[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: About ROMable Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 14 Jan 2009 17:04:57 -0200
> So I'm wondering whether we could keep them in flash instead of using scarce
> memory resources.
It should be feasible if you dump bytecode with struct headers, especially
for strings. You'll also need to add a DONTCOLLECT flag to everything that
might be collectable, like luaS_fix does. The only issue I see is that
ROM bytecode might have strings that are already in the pool and you don't
want duplication of those. In that case, you'll need to free the copy in the
pool and point it to the copy in ROM. This would required changing the struct
that holds strings to explicitly store a pointer to the string data instead
of assuming it's in the tail of the struct itself.
I'd be very interested in seeing all this working. I'm willing to help if you
need any advice on bytecode format and the like.
This is actually the oldest item in my wish list. See