From f1ddca9f2143e377d2a70941dcedbb1f5c699e07 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Apr 2010 12:35:34 -0700 Subject: [PATCH] Clarify the types of various exec_list in ir.h --- ast_function.cpp | 8 +++----- ir.h | 13 ++++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ast_function.cpp b/ast_function.cpp index cd57c32040b..3472b397cc1 100644 --- a/ast_function.cpp +++ b/ast_function.cpp @@ -38,7 +38,7 @@ process_parameters(exec_list *instructions, exec_list *actual_parameters, if (first != NULL) { simple_node *ptr = first; do { - ir_instruction *const result = + ir_rvalue *const result = ((ast_node *) ptr)->hir(instructions, state); ptr = ptr->next; @@ -71,10 +71,8 @@ process_call(exec_list *instructions, ir_function *f, exec_list_iterator formal_iter = sig->parameters.iterator(); while (actual_iter.has_next()) { - ir_rvalue *actual = - ((ir_instruction *) actual_iter.get())->as_rvalue(); - ir_variable *formal = - ((ir_instruction *) formal_iter.get())->as_variable(); + ir_rvalue *actual = (ir_rvalue *) actual_iter.get(); + ir_variable *formal = (ir_variable *) formal_iter.get(); assert(actual != NULL); assert(formal != NULL); diff --git a/ir.h b/ir.h index 13d07155a42..7ae5e3b952a 100644 --- a/ir.h +++ b/ir.h @@ -204,7 +204,10 @@ public: const struct glsl_type *return_type; /** - * List of function parameters stored as ir_variable objects. + * List of ir_variable of function parameters. + * + * This represents the storage. The paramaters passed in a particular + * call will be in ir_call::actual_paramaters. */ struct exec_list parameters; @@ -259,7 +262,7 @@ public: private: /** - * Set of overloaded functions with this name. + * List of ir_function_signature for each overloaded function with this name. */ struct exec_list signatures; }; @@ -288,7 +291,9 @@ public: } ir_rvalue *condition; + /** List of ir_instruction for the body of the then branch */ exec_list then_instructions; + /** List of ir_instruction for the body of the else branch */ exec_list else_instructions; }; @@ -321,7 +326,7 @@ public: return body_instructions.iterator(); } - /** List of instructions that make up the body of the loop. */ + /** List of ir_instruction that make up the body of the loop. */ exec_list body_instructions; /** @@ -497,6 +502,8 @@ private: } const ir_function_signature *callee; + + /* List of ir_rvalue of paramaters passed in this call. */ exec_list actual_parameters; }; -- 2.30.2