コード例 #1
0
        public BaseMethodRef GetMethodRef(BaseTypeRef ret_type, PEAPI.CallConv call_conv,
                                          string name, BaseTypeRef[] param, int gen_param_count)
        {
            string            key = type_ref.FullName + MethodDef.CreateSignature(ret_type, name, param, gen_param_count) + type_ref.SigMod;
            TypeSpecMethodRef mr  = method_table [key] as TypeSpecMethodRef;

            if (mr == null)
            {
                mr = new TypeSpecMethodRef(this, ret_type, call_conv, name, param, gen_param_count);
                method_table [key] = mr;
            }

            return(mr);
        }
コード例 #2
0
ファイル: GenericTypeInst.cs プロジェクト: pmq20/mono_forked
        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, 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);
                s_method_table [key] = mr;
            }

            return(mr);
        }
コード例 #3
0
        public override BaseMethodRef GetMethodRef(BaseTypeRef ret_type, PEAPI.CallConv call_conv,
                                                   string name, BaseTypeRef[] param, int gen_param_count)
        {
            /* Use FullName also here, as we are caching in a static hashtable */
            string            key = FullName + MethodDef.CreateSignature(ret_type, call_conv, name, param, gen_param_count, true);
            TypeSpecMethodRef mr  = s_method_table [key] as TypeSpecMethodRef;

            if (mr != null)
            {
                return(mr);
            }

            //FIXME: generic methodref for primitive type?
            mr = new TypeSpecMethodRef(this, call_conv, ret_type, name, param, gen_param_count);
            s_method_table [key] = mr;
            return(mr);
        }
コード例 #4
0
ファイル: ExternTypeRefInst.cs プロジェクト: nobled/mono
		public BaseMethodRef GetMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
				string name, BaseTypeRef[] param, int gen_param_count)
		{
			string key = type_ref.FullName + MethodDef.CreateSignature (ret_type, name, param, gen_param_count) + type_ref.SigMod;
			TypeSpecMethodRef mr = method_table [key] as TypeSpecMethodRef;
			if (mr == null) {	 
				mr = new TypeSpecMethodRef (this, ret_type, call_conv, name, param, gen_param_count);
				method_table [key] = mr;
			}

			return mr;
		}
コード例 #5
0
ファイル: GenericTypeInst.cs プロジェクト: mono/mono
                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, 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);
                                s_method_table [key] = mr;
                        }

                        return mr;
                }
コード例 #6
0
ファイル: PrimitiveTypeRef.cs プロジェクト: nobled/mono
                public override BaseMethodRef GetMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
                                string name, BaseTypeRef[] param, int gen_param_count)
                {
                        /* Use FullName also here, as we are caching in a static hashtable */
                        string key = FullName + MethodDef.CreateSignature (ret_type, call_conv, name, param, gen_param_count, true);
                        TypeSpecMethodRef mr = s_method_table [key] as TypeSpecMethodRef;
                        if (mr != null)
                                return mr;

			//FIXME: generic methodref for primitive type?
                        mr = new TypeSpecMethodRef (this, call_conv, ret_type, name, param, gen_param_count);
                        s_method_table [key] = mr;
                        return mr;
                }