6 ms·
Stack-based VMs are more common than just the JVM. Python and Ruby's bytecodes are stack-oriented. Stack machines are also still common for compilers where "g
by retrac 4y ago
Stack-based VMs are more common than just the JVM. Python and Ruby's bytecodes are stack-oriented. Stack machines are also still common for compilers where "good enough" code is acceptable. As you say, it's relatively easy to write a code generator for a stack machine.
- int_19h 4y agoCIL (.NET bytecode) is also stack-based, and perhaps the most interesting modern incarnation as well, because it is sufficiently full featured - pointers w/arithmetic, unions, stackalloc etc - to be a target for a C compiler.
- pjmlp 4y agoNo wonder, given that supporting C++ was one of its design goals, first with Managed C++ Extensions, followed by C++/CLI on .NET 2.0.