Open emilaxelsson opened 9 years ago
I don't have everything cached in my head but I think epilogues typically contain memory deallocation and similar constructs. You might have found a bug, or maybe local functions typically have variables that have a larger scope. Without having looked carefully at it my guess is that it should be at the end of the block defined in the tellDef
on line 282.
OK, thanks. I guess the right thing to do is to make some examples (or maybe there already are some) and check the generated code. I'll leave the issue open until I have time to do this.
Yes, a future that contains something that allocates memory (sequential
perhaps?) that is not immediately written into the result array is my guess. My second guess is a future that has a local future inside its body and waits for that future before returning.
The epilogue is discarded from the generated code here.
confiscateBigBlock
resets the epilogue in theCodeWriter
so the epilogue is only present in the result of the bind, but there it is ignored (the second wildcard).(Note: I have just changed the type of
confiscateBigBlock
a bit but the code is equivalent to how it was before.)I'm a bit lost in the code generation. Where should the epilogue go?
@pjonsson, @emwap