문제

I know how register based and how stack based virtual machines work independently. I know the advantages and disadvantages of both. What I want to know is that has anyone ever tried to merge the two?

I tried to search the net for the existence of such a virtual machine, but to no avail. The best result I got was an article on a hybrid virtual machine (HyVM). If such a virtual machine was indeed created for a programming language, I would be interested in having a look at its source code to understand how it works.

Perhaps someone could point me in the right direction to find such a virtual machine, or link me to an article or blog post that elaborates in this topic.

도움이 되었습니까?

해결책

Take a look at Forth. It uses a VM, is mainly stack oriented but allows to store values almost in the way you suggest.

In addition, the VM is quite small, so it is easy to explore and to port it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top