#How to make a custom codegen backend/questions whether it's a good idea

1 messages · Page 1 of 1 (latest)

hybrid oyster
#

I want to write a virtual machine for zig. My idea is to use AIR instructions as bytecode; from what I can tell they look similar in format to Java's bytecode. Using AIR will save me a lot of work since the information is already there. Now, my idea to get the AIR out of the compiler is to make a custom codegen backend which writes the AIR instructions to a file/files, like Java's class files. Then my vm will read the outputed files.

nimble sequoia
#

are you prepared to rearchitect your entire VM every few months?

hybrid oyster
#

I'm doing this for 0.14.1 only for now

nimble sequoia
#

asking because AIR has absolutely no guarantees about this kind of thing

#

and you'd get a much more useful VM if you chose the operations that you actually need