2 ms·
Hunh. Yuck. So how does that work at the instruction level? It seems like the generated code needs to take one of two wildly divergent paths depending on whe
by ajross 18y ago
Hunh. Yuck. So how does that work at the instruction level? It seems like the generated code needs to take one of two wildly divergent paths depending on whether or not a scope includes a lambda or not. Either that, or you need to malloc the stack frame of every function that gets called, which is equally a mess.
- orib 18y agohttp://people.debian.org/~aaronl/Usenix88-lexic.pdf http://people.debian.org/~aaronl/Usenix88-lexic.pdf ddescribes non-escaping lexical closures for C++. With a bit of work (automated clone-env-on-escape, for example) you can have efficient closures that don't totally suck.