Binary Matching Restrictions
Tue May 4 21:05:29 CEST 2010
Curious as to why functions had to end with a tail call to a function that performs a binary match instruction in order for optimizations to be applied, I was reading beam_bsm.erl in compiler-4.6.5. The comments for btb_reaches_match/3 seem to imply that this is not actually necessary. Only that the match context is not copied or passed to a BIF. I tried to trace the code to get an idea for why the optimization is not applied (despite the comments indicating it should be), but it is still unclear to me. Any documentation I should read to better understand what's going on here?
More information about the erlang-questions