summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-31 18:23:21 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-31 18:23:21 -0700
commit92318a947958892497722772b03c643ebc943294 (patch)
tree587010b36f066b2fe77dd638353d7a9b954335d6 /ast.h
parentacce380a3f6df56d44460c0b066b4791cc0f9732 (diff)
Add ast_function::hir
ast_function::hir consists of bits pulled out of ast_function_definition::hir. In fact, the later uses the former to do a lot of its processing. Several class private data fields were added to ast_function to facilitate communicate between the two. This causes the following tests to pass: glslparsertest/shaders/CorrectModule.frag This causes the following tests to fail. These shaders were previously failing to compile, but they were all failing for the wrong reasons. glslparsertest/shaders/function9.frag glslparsertest/shaders/function10.frag
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index d21be7e..8035259 100644
--- a/ast.h
+++ b/ast.h
@@ -444,10 +444,36 @@ public:
virtual void print(void) const;
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
ast_fully_specified_type *return_type;
char *identifier;
struct simple_node parameters;
+
+private:
+ /**
+ * Is this prototype part of the function definition?
+ *
+ * Used by ast_function_definition::hir to process the parameters, etc.
+ * of the function.
+ *
+ * \sa ::hir
+ */
+ bool is_definition;
+
+ /**
+ * Function signature corresponding to this function prototype instance
+ *
+ * Used by ast_function_definition::hir to process the parameters, etc.
+ * of the function.
+ *
+ * \sa ::hir
+ */
+ class ir_function_signature *signature;
+
+ friend class ast_function_definition;
};