summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-10-07 13:03:53 -0700
committerIan Romanick <[email protected]>2015-10-12 10:15:13 -0700
commit05e4601c6b9ce456cc4a4c395677a22125d889d2 (patch)
treedc08265aebe77aea22198a6a18f70a7af6c42680 /src/glsl/ast.h
parentbb329f2ff6e8bf8910a467b09f69a4d843689617 (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.h')
-rw-r--r--src/glsl/ast.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 4c314366133..67faacd0ef8 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -62,6 +62,8 @@ public:
virtual ir_rvalue *hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
+ virtual bool has_sequence_subexpression() const;
+
/**
* Retrieve the source location of an AST node
*
@@ -221,6 +223,8 @@ public:
virtual void hir_no_rvalue(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
+ virtual bool has_sequence_subexpression() const;
+
ir_rvalue *do_hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state,
bool needs_rvalue);
@@ -299,6 +303,8 @@ public:
virtual void hir_no_rvalue(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
+ virtual bool has_sequence_subexpression() const;
+
private:
/**
* Is this function call actually a constructor?