On Monday, 23 November 2015 at 21:05:29 UTC, Walter Bright wrote:
The code looks quite good. I've been trying to adjust things, however, so there are no pushes and pops in the code, trying to preallocate everything needed in the function prolog.

Wouldn't you still need to restore the stack before leaving the function (tail call in this case)?

For a single register, push/pop is probably still cheaper than setting up RBP and having the extra mov/sub.

dmd rewrites try-catch-finally into try-{try-catch}-finally, which makes it easier to generate code, because fewer special cases and fewer bugs. I've become a big fan of that technique

Except that we actually need to flatten all the nesting into a single landing pad anyway. How would you do this in DMD? I didn't realize you could even have multiple EH table entries attached to a single code location.

 — David

Reply via email to