From an LLVM perspective, we assume all variables can have allocas created for them and that they can be loaded from them. So we would need to handle the case of variable-sized types or a routine for determining the size of an alloca.
From a usability standpoint, C is the only language that I can think of that supports function pointers but not closures, so it might be a good idea to wait until we have those first...
Consider the protosnirk program
We emit
for the line
let bar = main
.From an LLVM perspective, we assume all variables can have
alloca
s created for them and that they can be loaded from them. So we would need to handle the case of variable-sized types or a routine for determining the size of analloca
.From a usability standpoint, C is the only language that I can think of that supports function pointers but not closures, so it might be a good idea to wait until we have those first...