Implementing a dynamic typed language with LLVM IR : <p>I'm trying to build a JIT compiler for a dynamic language using LLVM C API but I'm stuck at implementing dynamic types, for example in function definition, LLVM needs types for each argument but the type is unknown until runtime based on what the user passes, i googled this for a while but no any good resources about it anywhere, I also tried looking at Julia's source code to see how they did it, unfortunetely the code is big and complex and i have to eye jump everywhere to find such a small detail, from what i seen so far in it is they represent their types as an empty LLVM struct pointers and a func sig type that holds some extra data, but I'm very unsure of how that works or even if I'm explaining it right, any resources can be helpful, an example code is most appreciated, the example doesn't have to be in C API, C++ is also fine I'll convert it myself one way or the other.</p>

<p>Thanks in advance.</p>
