In ilasm/codegen:
[mono.git] / mcs / ilasm / codegen / CodeGen.cs
index f3d9bf02d1c8149b9a7c79e8547c0b90722e7862..b0b1803c18060a442523c60a46fda4794cb477ae 100644 (file)
@@ -171,7 +171,7 @@ namespace Mono.ILASM {
                 public GlobalMethodRef GetGlobalMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,\r
                                 string name, BaseTypeRef[] param, int gen_param_count)\r
                 {\r
-                        string key = MethodDef.CreateSignature (ret_type, name, param, gen_param_count);\r
+                        string key = MethodDef.CreateSignature (ret_type, call_conv, name, param, gen_param_count, true);\r
 \r
                         GlobalMethodRef methref = null;\r
 \r
@@ -515,13 +515,15 @@ namespace Mono.ILASM {
                         return methoddef.Resolve (this);\r
                 }\r
 \r
-                public PEAPI.Method ResolveVarargMethod (string signature,\r
+                public PEAPI.Method ResolveVarargMethod (string sig_only_required_params, string sig_with_optional_params,\r
                                 CodeGen code_gen, PEAPI.Type[] opt)\r
                 {\r
-                        MethodDef methoddef = (MethodDef) global_method_table[signature];\r
-                        methoddef.Resolve (code_gen);\r
+                        MethodDef methoddef = (MethodDef) global_method_table [sig_only_required_params];\r
+                        if (methoddef == null)\r
+                                Report.Error ("Unable to resolve global method : " + sig_only_required_params);\r
 \r
-                        return methoddef.GetVarargSig (opt);\r
+                        methoddef.Resolve (code_gen);\r
+                        return methoddef.GetVarargSig (opt, sig_with_optional_params);\r
                 }\r
 \r
                 public PEAPI.Field ResolveField (string name, string type_name)\r