[LLVMdev] dynamic typing system
jo at durchholz.org
Mon Aug 16 14:17:15 PDT 2010
Am 16.08.2010 22:26, schrieb Alec Benzer:
> The other option, I guess, would be stack allocations with alloca
> instructions? I don't need to worry about the sizes of types or about
> calling free, but now my objects can't live on past the scope of a function,
> which may complicate things.
That's putting it mildly.
If locally created objects can outlive the stack frame, you need a heap.
(Unless your language is specifically geared towards region analysis,
but your post doesn't sound as if that's the part of the learning curve
Some language infrastructures actually allocated everything on the heap.
Stack-based allocation would be added as an optimization then. (This
might be reasonable, or the worst idea ever, depending on specifics of
More information about the llvm-dev