lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
> For the Lua core, isn't it a simple matter of defining the correct
> luai_num* macros and LUA_NUMBER_SCAN, LUA_NUMBER_FMTin luaconf.h?
> Or do you mean the libraries as well?

For my boot code I load only the base, table, and string libraries, plus
a few of my own libraries for direct access to memory, processor
registers, etc.

For 5.1.2 I used Asko's lnum patch first, so some of what I said may
have been a reflection of mods made by the lnum patch. I was organized
enough to take the base 5.1.2, apply lnum, then apply any changes I
needed, then make a patch out of the result. That patch is 149k! Not
factorial, just emphasis. :) It's large because it's a context diff and
because the lnum patch is also configurable, so a ton of #ifdefs are
added (as opposed to just replacing it with the values I want).

In my earlier port of 5.0 I had a lot of trouble determining which
macros needed to be set in order to get it all. While I cannot say
exactly what was missing back then, I do distinctly remember not being
able to find a complete list anywhere. The lists that I found were not
sufficient. I remember that there were a few calls where casting was
necessary, plus there was the issue with floating point instructions
being generated as described in
http://lua-users.org/lists/lua-l/2008-02/msg00785.html.

I know that my platform is atypical, but if a smaller set of options
could be found then I'd love to see them in the main Lua source tree.
The criteria might be:

  (0) 100% compatible where applicable (language/bytecode?).
  (1) Integer-only controlled by a single #define.
  (2) No impact on the desktop.
  (3) Small impact on the source tree.

Bonuses would be:

  (4) Mixed integer/FP for systems with emulated FP.

This is definitely something I'm capable of doing. I keep saying that
I'll get to it, but with soccer and baseball season starting, all my
time will be spent watching my kids play. I'll see what I can do; at a
minimum I have the Lua source with me on my laptop these days, so I can
definitely play around with it.

Doug

-- 
Innovative Concepts, Inc. www.innocon.com 703-893-2007 x220