simple-virtual-machine
simple-virtual-machine copied to clipboard
Should not post inc the ip
https://github.com/parrt/simple-virtual-machine/blob/2e8c0186d1cfc90043bd1e3e085bd317801a9378/src/vm/VM.java#L91
The ip should not be moved forward after updating it
ip = code[ip];
Ah good point. That's a waste of an increment. no doubt I was just being consistent or maybe it was a cut-and-paste error . haha
👍 But again thanks for the work in compilers. Especially the book "Language Implementation Patterns" I got it back in 2011 and still read it today. I was actually revisiting this talk and implementing the svm while learning rust.