[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua 5 VM questions
- From: Christian Müller <cm.abo@...>
- Date: Tue, 25 Jan 2005 11:57:12 +0100
I have some questions concerning the Lua 5 virtual machine since I am
currently designing a small vm as a students project. I read several mails
about the vm and also shortly looked at the source code.
1. I read that it is a register vm. How do you solve argument passing? I found
in "src_ldo.c" a comment that argument passing is done through a stack. Is
that correct? Do you deviate from the typical register based architecture in
that case to save memory traffic?
2. As far as I learned you do instruction encoding close to hardware
architectures. Therefore you always have to decode the opcode in contrast to
the JVM where opcode and arguments are stored in several independent bytes.
Is opcode decoding cheap (one might forgive my poor knowledge of C operator
Thanks a lot for your help!