summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-04-07 12:35:34 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-07 17:23:23 -0700
commitf1ddca9f2143e377d2a70941dcedbb1f5c699e07 (patch)
treedcec974a31cbbf90c7c059532b6c9924342d68ca
parent0c824653952a67722c242616bb34a4796b42f660 (diff)
Clarify the types of various exec_list in ir.h
-rw-r--r--ast_function.cpp8
-rw-r--r--ir.h13
2 files changed, 13 insertions, 8 deletions
diff --git a/ast_function.cpp b/ast_function.cpp
index cd57c32040..3472b397cc 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 13d07155a4..7ae5e3b952 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;
};