[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: virtual machine [was Re: [ANNOUNCE] Lua 5.0 (alpha) now available]
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 20 Aug 2002 14:06:37 -0300
> Are there any docs on this?
Only `lopcodes.h'.
> How many registers are there and how many are the same after a return
> from a function call?
There are up to 250 registers for each function. Actually they are
allocated on the stack. We call them "registers" because opcodes can
access them directly.
> Is there a return register?
> How does it deal with lua's multiple return values?
The parameters go on the "upper" registers, and also returns on the
upper registers. (That is, during function calls there is a "dual" view
between registers and stack.)
> Just curious - do you think this reflects the fact that the hw lua
> typically runs on is register based?
No. There is no relationship between Lua registers (actually some space
pre-allocated in the Lua stack) and the CPU registers (something not
visible from C code).
-- Roberto