diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-01 13:49:10 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-01 13:49:10 -0800 |
commit | 18238de6c34a1a32c452f1006ed13d8adc1bc9d7 (patch) | |
tree | 756dfbb1024f3819842004b3f5fe684ff3b40759 /ast.h | |
parent | d59673c9de9f14e6aefcdb0b06751d935385c4aa (diff) |
Make AST->HIR conversion a method of ast_node, re-enable
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -37,6 +37,8 @@ class ast_node : public simple_node { public: virtual ~ast_node(); virtual void print(void) const; + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); /** * Retrieve the source location of an AST node @@ -149,6 +151,9 @@ public: static const char *operator_string(enum ast_operators op); + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); + virtual void print(void) const; enum ast_operators oper; @@ -193,6 +198,9 @@ public: ast_compound_statement(int new_scope, ast_node *statements); virtual void print(void) const; + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); + int new_scope; struct simple_node statements; }; @@ -330,6 +338,9 @@ public: ast_declarator_list(ast_fully_specified_type *); virtual void print(void) const; + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); + ast_fully_specified_type *type; struct simple_node declarations; @@ -348,6 +359,9 @@ class ast_parameter_declarator : public ast_node { public: virtual void print(void) const; + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); + ast_fully_specified_type *type; char *identifier; int is_array; @@ -392,6 +406,9 @@ public: ast_expression_statement(ast_expression *); virtual void print(void) const; + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); + ast_expression *expression; }; @@ -466,6 +483,9 @@ class ast_function_definition : public ast_node { public: virtual void print(void) const; + virtual ir_instruction *hir(struct simple_node *instructions, + struct _mesa_glsl_parse_state *state); + ast_function *prototype; ast_compound_statement *body; }; |