: base ("", is_valuetypeinst, conv_list, sig_mod)
{
if (class_ref is GenericTypeInst)
- throw new ArgumentException (String.Format ("Cannot create nested GenericInst, '{0}' '{1}'", class_ref.FullName, gen_args.ToString ()));
+ throw new InternalErrorException ("Cannot create nested GenericInst, '" +
+ class_ref.FullName + "' '" + gen_args.ToString () + "'");
this.class_ref = class_ref;
this.gen_args = gen_args;
get { return class_ref.FullName + gen_args.ToString () + SigMod; }
}
- public override BaseClassRef Clone ()
+ public override BaseTypeRef Clone ()
{
//Clone'd instance shares the class_ref and gen_args,
//as its basically used to create modified types (arrays etc)
gen_args.Resolve (type_gen_params, method_gen_params);
}
- public override IMethodRef GetMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
+ protected override BaseMethodRef CreateMethodRef (BaseTypeRef ret_type,
+ PEAPI.CallConv call_conv, string name, BaseTypeRef[] param, int gen_param_count)
+ {
+ throw new InternalErrorException ("Should not be called");
+ }
+
+ public override BaseMethodRef GetMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
string meth_name, BaseTypeRef[] param, int gen_param_count)
{
/* Note: Using FullName here as we are caching in a static hashtable */
- string key = FullName + MethodDef.CreateSignature (ret_type, meth_name, param, gen_param_count);
+ string key = FullName + MethodDef.CreateSignature (ret_type, call_conv, meth_name, param, gen_param_count, true);
TypeSpecMethodRef mr = s_method_table [key] as TypeSpecMethodRef;
if (mr == null) {
mr = new TypeSpecMethodRef (this, call_conv, ret_type, meth_name, param, gen_param_count);
return mr;
}
- public override IFieldRef CreateFieldRef (BaseTypeRef ret_type, string field_name)
+ protected override IFieldRef CreateFieldRef (BaseTypeRef ret_type, string field_name)
{
/* Note: Using FullName here as we are caching in a static hashtable */
string key = FullName + ret_type.FullName + field_name;