On 11 November 2011 02:56, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></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 "maybe you meant this" candidate signatures.<br>
<br>
The second has to deal with void/non-void functions, pre-call implicit<br>
conversions for "in" parmeters, and post-call "out" 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 <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br></blockquote><div><br>Very sensible. Thanks for making this refactoring a separate commit.<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div></div>