Background: I have written a toy Lisp interpreter that I am trying to add LLVM JIT functionality to. For the moment, have imposed the following limitations:
- Only integer values are allowed in functions
- Variables may only reference formal parameters
Given:
compile :: [Value] -- List of Formal Parameters
-> [Value] -- Body of function
-> CodeGenModule(Function a)`
Question: How do I generate a function where the number of parameters equals the length of the Formal Parameters list?