Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing epilogue? #201

Open
emilaxelsson opened this issue Nov 17, 2015 · 3 comments
Open

Missing epilogue? #201

emilaxelsson opened this issue Nov 17, 2015 · 3 comments

Comments

@emilaxelsson
Copy link
Member

The epilogue is discarded from the generated code here. confiscateBigBlock resets the epilogue in the CodeWriter 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

@pjonsson
Copy link
Member

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.

@emilaxelsson
Copy link
Member Author

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.

@pjonsson
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants