diff options
author | Ian Romanick <[email protected]> | 2015-10-07 13:03:53 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-10-12 10:15:13 -0700 |
commit | 05e4601c6b9ce456cc4a4c395677a22125d889d2 (patch) | |
tree | dc08265aebe77aea22198a6a18f70a7af6c42680 /src/glsl/ast_function.cpp | |
parent | bb329f2ff6e8bf8910a467b09f69a4d843689617 (diff) |
glsl: Add method to determine whether an expression contains the sequence operator
This will be used in the next patch to enforce some language sematics.
v2: Fix inverted logic in
ast_function_expression::has_sequence_subexpression. The method
originally had a different name and a different meaning. I fixed the
logic in ast_to_hir.cpp, but I only changed the names in
ast_function.cpp.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Marta Lofstedt <[email protected]> [v1]
Reviewed-by: Matt Turner <[email protected]>
Cc: "10.6 11.0" <[email protected]>
Diffstat (limited to 'src/glsl/ast_function.cpp')
-rw-r--r-- | src/glsl/ast_function.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 6538992ae0e..b72eb3ffb9e 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -1999,6 +1999,17 @@ ast_function_expression::hir(exec_list *instructions, unreachable("not reached"); } +bool +ast_function_expression::has_sequence_subexpression() const +{ + foreach_list_typed(const ast_node, ast, link, &this->expressions) { + if (ast->has_sequence_subexpression()) + return true; + } + + return false; +} + ir_rvalue * ast_aggregate_initializer::hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) |