On 11 November 2011 02:56, Kenneth Graunke <span dir="ltr">&lt;<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
match_function_by_name performs two fairly separate tasks:<br>
1. Hunt down the appropriate ir_function_signature for the callee.<br>
2. Generate the actual ir_call (assuming we found the callee).<br>
<br>
Both of these are complicated.  The first has to handle exact/inexact<br>
matches, lazy importing of built-in prototypes, different scoping rules<br>
for 1.10, 1.20+, and ES.  Not to mention printing a user-friendly error<br>
message with pretty-printed &quot;maybe you meant this&quot; candidate signatures.<br>
<br>
The second has to deal with void/non-void functions, pre-call implicit<br>
conversions for &quot;in&quot; parmeters, and post-call &quot;out&quot; call conversions.<br>
<br>
Trying to do both in one function is just too unwieldy.  Time to split.<br>
<br>
This patch purely moves the code to generate an ir_call into a separate<br>
function and reindents it.  Otherwise, the code is identical.<br>
<br>
Signed-off-by: Kenneth Graunke &lt;<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>&gt;<br></blockquote><div><br>Very sensible.  Thanks for making this refactoring a separate commit.<br><br>Reviewed-by: Paul Berry &lt;<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>&gt;<br>
</div></div>