diff options
author | Kenneth Graunke <[email protected]> | 2012-03-28 15:57:50 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-04-02 14:15:29 -0700 |
commit | 909e8899671a45bcc865fe303a8cb697a25634aa (patch) | |
tree | 60248635747d7d004cd133c1fa61916776a044a5 /src/glsl/ir_hv_accept.cpp | |
parent | 0405bd08ca0e01ebc68891ee1ff47d320983f775 (diff) |
glsl: Split up function matching and call generation a bit more.
We used to have one big function, match_signature_by_name, which found
a matching signature, performed out-parameter conversions, and generated
the ir_call. As the code for matching against built-in functions became
more complicated, I split it internally, creating generate_call().
However, I left the same awkward interface. This patch splits it into
three functions:
1. match_signature_by_name()
This now takes a name, a list of parameters, the symbol table, and
returns an ir_function_signature. Simple and one purpose: matching.
2. no_matching_function_error()
Generate the "no matching function" error and list of prototypes.
This was complex enough that I felt it deserved its own function.
3. generate_call()
Do the out-parameter conversion and generate the ir_call. This
could probably use more splitting.
The caller now has a more natural workflow: find a matching signature,
then either generate an error or a call.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir_hv_accept.cpp')
0 files changed, 0 insertions, 0 deletions