Derived type descriptors (see bug 566410) can be stack-allocated when they're "down args" being passed into inner function calls; but this will not work when they're being passed to object or closure constructors, since the constructed object will have unlimited extent. In these cases, we need to copy the derived type descriptor tree in question to the heap and pass the heap cell instead. This will require adding a new crate-level cache and probably keying by a hashcode of the stack of type descriptor applications that represent the derived type in question.
Sketched around 9ff12000b91d, roughly working now. Specific captures in closures and objs not yet working. Will file separately.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.