A short post about types and polymorphism
Hi all. I usually write somewhat long-winded posts, but today I'm going to try and make an exception. Today I want to talk about the expression template language used to map the high-level MoarVM instructions to low-level constructs that the JIT compiler can easily work with: This 'language' was designed back in 2015 subject to three constraints: It should make it easy to develop 'templates' for MoarVM instructions, so we can map the ~800 or so different instructions supported by the interpreter to something the JIT compiler can work with. It should be simple to process and analyze; specifically, it should be suitable as input to the instruction selection process (the tiler). It should be simple to implement, both from the frontend (meaning the perl program that compiles a template file to a C header) and the backend (meaning the C code that combines templates into the IR that is compiled). Recently I've been working on adding support for floating point