summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-11 14:50:30 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-03-11 14:57:26 -0800
commit471471f83471481db0445e73f8c89e6a9149838e (patch)
tree29aed0e3d5964c57264ca66ca67a258d53b516fa /ir.h
parentcdb8d54b6808b13092cb85e44cf02e4e91c3a669 (diff)
Initial pass at resolving function calls
The code is still really rough and *REALLY* incomplete. This at least passes the first few trivially simple test cases.
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/ir.h b/ir.h
index 136b45b72b..5acf611e74 100644
--- a/ir.h
+++ b/ir.h
@@ -161,10 +161,18 @@ public:
}
/**
+ * Find a signature that matches a set of actual parameters.
+ */
+ const ir_function_signature *matching_signature(exec_list *actual_param);
+
+ /**
* Name of the function.
*/
const char *name;
+ /**
+ * Set of overloaded functions with this name.
+ */
struct exec_list signatures;
};
/*@}*/
@@ -283,10 +291,10 @@ public:
*/
class ir_call : public ir_instruction {
public:
- ir_call()
- : ir_instruction(ir_op_call), callee(NULL)
+ ir_call(const ir_function_signature *callee, exec_list *actual_parameters)
+ : ir_instruction(ir_op_call), callee(callee)
{
- /* empty */
+ actual_parameters->move_nodes_to(& this->actual_parameters);
}
virtual void accept(ir_visitor *v)
@@ -300,7 +308,13 @@ public:
static ir_call *get_error_instruction();
private:
- ir_function_signature *callee;
+ ir_call()
+ : ir_instruction(ir_op_call), callee(NULL)
+ {
+ /* empty */
+ }
+
+ const ir_function_signature *callee;
exec_list actual_parameters;
};