- FunctionDeclaration *&stage_decl = stage->functions[func.name];
- vector<FunctionDeclaration *> &decls = declarations[func.name];
+ if(func.signature.empty())
+ {
+ string param_types;
+ for(NodeArray<VariableDeclaration>::const_iterator i=func.parameters.begin(); i!=func.parameters.end(); ++i)
+ {
+ if((*i)->type_declaration)
+ append(param_types, ",", (*i)->type_declaration->name);
+ else
+ return;
+ }
+ func.signature = format("(%s)", param_types);
+ r_any_resolved = true;
+ }
+
+ string key = func.name+func.signature;
+ FunctionDeclaration *&stage_decl = stage->functions[key];
+ vector<FunctionDeclaration *> &decls = declarations[key];