[Mesa-dev] [PATCH 2/3] glsl: Split code to generate an ir_call out from match_function_by_name.
Paul Berry
stereotype441 at gmail.com
Mon Nov 14 10:28:45 PST 2011
On 11 November 2011 02:56, Kenneth Graunke <kenneth at whitecape.org> wrote:
> match_function_by_name performs two fairly separate tasks:
> 1. Hunt down the appropriate ir_function_signature for the callee.
> 2. Generate the actual ir_call (assuming we found the callee).
>
> Both of these are complicated. The first has to handle exact/inexact
> matches, lazy importing of built-in prototypes, different scoping rules
> for 1.10, 1.20+, and ES. Not to mention printing a user-friendly error
> message with pretty-printed "maybe you meant this" candidate signatures.
>
> The second has to deal with void/non-void functions, pre-call implicit
> conversions for "in" parmeters, and post-call "out" call conversions.
>
> Trying to do both in one function is just too unwieldy. Time to split.
>
> This patch purely moves the code to generate an ir_call into a separate
> function and reindents it. Otherwise, the code is identical.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>
Very sensible. Thanks for making this refactoring a separate commit.
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111114/a171245d/attachment.htm>
More information about the mesa-dev
mailing list