I have little experience (actually not) in this area, so you can check out some of them for yourself (or maybe someone can correct me where necessary?).
The two languages โโI'm currently working with are C # and Java, so I'm naturally prone to their methodologies. As most people know, both are compiled into byte code, and both platforms (CLR and JVM) use JIT (at least in major implementations). Also, I would suggest that the jitter for each platform is written in C / C ++, but I really don't know for sure.
All of these languages โโand their respective platforms are very similar to your situation (except for the dynamic part, but I'm not sure if that matters). Also, since they are such main languages, I am sure that their implementation can serve as a good guide for your design.
From this perspective, I know for sure that both the CLR and the JVM are stack based architectures. Some of the benefits that I remember for stack-based vs case-based are:
- Smaller generated code
- Simplified Interpreters
- Simple compilers
- and etc.
In addition, I believe that the stack-based will be a little more intuitive and readable, but this is a subjective thing, and, as I said, I have not seen too much byte code yet.
Some Benefits of Register-Based Architecture
- Less instructions need to be followed.
- Faster interpreters (follows from # 1)
- Can be more easily translated to machine code, since most conventional hardware is based on registration
- and etc.
Of course, there are always ways to compensate for the flaws for everyone, but I think they describe the obvious things to consider.
Ken Wayne VanderLinde
source share