Translating G-Machine source to LLVM IR
问题 I'm implementing a simple lazy functional language with LLVM as its backend in Haskell. I've read two books written by Simon Peyton Jones ("The implementation of functional programming languages", as well as "Implementing functional languages: the tutorial") and based on that I managed to implement the G-Machine compiler and interpreter. I'm now currently stuck on the problem of generating LLVM IR code from G-Machine instructions. The main problem is that G-Machine is a stack machine whereas