This is a collection of bytecode/IR examples for compiler developers. View it at http://andrewbaxter.github.io/semicompiled/!
Each example is expected to be minimal to show off a specific piece of syntax. The examples are chosen to both demonstrate all features of the given bytecode/IR with frontend code to show what might generate that bytecode. There are also examples for frontend uses that produce unusual bytecode/IR.
If you find an example that has important bits optimized out, cases that have been missed, ways to get clearer output, etc. please let me know!