Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Request: Build a JVM (java virtual machine)


JVM might be much more involved project but here is a simple virtual machine - https://github.com/skx/simple.vm


That's my project, and it seems to be surprisingly popular, yet something I've never really received any feedback on.

At the time I wrote it I was modeling the opcodes on the Z80, but I guess I simplified once I'd got it working enough to make myself happy. (Lots of toy-virtual machines, of which this definitely is one, don't implement labels or "decompilers".)


http://craftinginterpreters.com/ part 2 (still a work in progress) will show you how to write a VM and compile a language to its bytecode.

It won't be the JVM but it could be a good start


This is the closest that I could find - https://github.com/lihaoyi/Metascala

Need to find some time to look more and actually try and work thru it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: