}
+ir_function *
+glsl_type::generate_constructor_prototype(glsl_symbol_table *symtab) const
+{
+ /* FINISHME: Add support for non-array types. */
+ assert(base_type == GLSL_TYPE_ARRAY);
+
+ /* Generate the function name and add it to the symbol table.
+ */
+ ir_function *const f = new ir_function(name);
+
+ bool added = symtab->add_function(name, f);
+ assert(added);
+
+ ir_function_signature *const sig = new ir_function_signature(this);
+ f->signatures.push_tail(sig);
+
+ for (unsigned i = 0; i < length; i++) {
+ char *const param_name = (char *) malloc(10);
+
+ snprintf(param_name, 10, "p%08X", i);
+
+ ir_variable *var = new ir_variable(fields.array, param_name);
+
+ var->mode = ir_var_in;
+ sig->parameters.push_tail(var);
+ }
+
+ return f;
+}
+
+
/**
* Generate the function intro for a constructor
*
static const glsl_type *get_array_instance(const glsl_type *base,
unsigned elements);
+ class ir_function *generate_constructor_prototype(class glsl_symbol_table *)
+ const;
+
/**
* Query the total number of scalars that make up a scalar, vector or matrix
*/