lua-users home
lua-l archive

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


[ late reply to an old message from last October, mostly to get a
  reference to the (to be) new thread into this one should somebody
  use the archive ]

On Wed, Oct 25, 2006 at 12:49 -0300, Luiz Henrique de Figueiredo wrote:
> 
> We'd be especially interested in changes needed to please a compiler
> or in any assumptions made by the Lua core that failed in your platform.
> Thanks.

As I tried to "port" Lua to the PalmOS environment lately there were a
few things I needed to change in the Lua 5.1.1 source tree.  Some of
them were necessary to circumvent this system's limitations, others I'm
not yet done investigating (they seem to be compiler or optimizer
related, I had to "unroll" a few preprocessor macros into "real"
routines before things started working correctly; although the "spirit"
of the source did not change at all, explicitely formulating the code
"magically" removed funny effects; having a routine with a prototype
instead of a mere preprocessor macro might as well have triggered some
type propagation which could have been missing before -- I don't know).

I intend to release that PalmOS port under the MIT license as Lua itself
was released under.  But the Lua core is not completely functional yet
and the current source is more of a hack than something "presentable".
Especially those program flow control instructions like "for" or "if"
seem to break the software (damage either the VM's "pc" upon execution
or the "go wild" in the parser's jump control determination upon
compiling).  I suspect that this is related to the fact that the "int"
datatype only has 16bits on PalmOS.  I did spot a bug in the Instruction
handling for the "below 32bits int" case, but that only solved part of
the problem and I still didn't grok completely how the Bx/sBx operand
"encoding" works.  The list archive suggests that there are other 16bit
ports of Lua, even to m68k embedded systems, and they seem to work after
the fixes of almost exactly one year ago.


Once these problems have been sorted out and the basic functionality is
there, I will do some cleanup and probably create a luaforge project.
I'm aware that there are other PalmOS implementations of Lua, but
several issues with these projects made me start another one.  The most
important reason was that I wanted to have "all the fun" which comes
with such a thing. :)  In a kind of Zen way that journey was more
important to me than the actual result ...

The currently accumulated modifications which I have made to the Lua
source tree I intend to discuss here much earlier in another (new)
thread -- probably with "(Another) PalmOS port of Lua" or a similar
subject.  After I have found some time to summarize what's happened so
far, and maybe after trying some more to find out what's going wrong
there.  I feel that none of this is urgent enough to be rushed into the
upcoming 5.1.2 release, it may even be not important enough to make it
at all into the upstream.  So don't mind if I should be silent for a few
more weeks ...  ( I'm having fun then. :> )


virtually yours
Gerhard Sittig
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.