X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=ast.h;h=d899fb1d090a831a98bc90e49f940066668af239;hb=8d3e59f1f399d7c1f7604779f1d62e876c609d9e;hp=0dfd02a9cd1a3bb24204e89363e3998535f83153;hpb=03d3f3ab71ba280071f54cb60505212be6710f8e;p=mesa.git diff --git a/ast.h b/ast.h index 0dfd02a9cd1..d899fb1d090 100644 --- a/ast.h +++ b/ast.h @@ -432,6 +432,21 @@ public: char *identifier; int is_array; ast_expression *array_size; + + static void parameters_to_hir(simple_node *ast_parameters, + bool formal, exec_list *ir_parameters, + struct _mesa_glsl_parse_state *state); + +private: + /** Is this parameter declaration part of a formal parameter list? */ + bool formal_parameter; + + /** + * Is this parameter 'void' type? + * + * This field is set by \c ::hir. + */ + bool is_void; }; @@ -543,6 +558,8 @@ public: virtual void print(void) const; + virtual ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *); + enum ast_iteration_modes { ast_for, ast_while, @@ -555,6 +572,15 @@ public: ast_expression *rest_expression; ast_node *body; + +private: + /** + * Generate IR from the condition of a loop + * + * This is factored out of ::hir because some loops have the condition + * test at the top (for and while), and others have it at the end (do-while). + */ + void condition_to_hir(class ir_loop *, struct _mesa_glsl_parse_state *); };