Beispiel #1
0
        public virtual PEAPI.Type ResolveInstance(CodeGen code_gen, GenericArguments gen_args)
        {
            PEAPI.GenericTypeInst gtri = null;
            string sig = gen_args.ToString();

            if (p_genericinst_table == null)
            {
                p_genericinst_table = new Hashtable();
            }
            else
            {
                gtri = p_genericinst_table [sig] as PEAPI.GenericTypeInst;
            }

            if (gtri == null)
            {
                if (!IsResolved)
                {
                    Resolve(code_gen);
                }

                gtri = new PEAPI.GenericTypeInst(PeapiType, gen_args.Resolve(code_gen));
                p_genericinst_table [sig] = gtri;
            }

            return(gtri);
        }
Beispiel #2
0
        public PEAPI.GenericMethodSig Resolve(CodeGen code_gen)
        {
            if (is_resolved)
            {
                return(sig);
            }

            sig         = new PEAPI.GenericMethodSig(gen_args.Resolve(code_gen));
            is_resolved = true;

            return(sig);
        }
Beispiel #3
0
        public void Resolve(CodeGen code_gen)
        {
            if (is_resolved)
            {
                return;
            }

            type_ref.Resolve(code_gen);

            type = new PEAPI.GenericTypeInst(type_ref.PeapiType, gen_args.Resolve(code_gen));

            is_resolved = true;
        }
Beispiel #4
0
                public virtual PEAPI.Type ResolveInstance (CodeGen code_gen, GenericArguments gen_args)
                {
                        PEAPI.GenericTypeInst gtri = null;
                        string sig = gen_args.ToString ();

                        if (p_genericinst_table == null)
                                p_genericinst_table = new Hashtable ();
                        else
                                gtri = p_genericinst_table [sig] as PEAPI.GenericTypeInst;

                        if (gtri == null) {
                                if (!IsResolved)
                                        Resolve (code_gen);

                                gtri = new PEAPI.GenericTypeInst (PeapiType, gen_args.Resolve (code_gen));
                                p_genericinst_table [sig] = gtri;
                        }
                        
                        return gtri;
                }
Beispiel #5
0
 public override void Resolve(GenericParameters type_gen_params, GenericParameters method_gen_params)
 {
     gen_args.Resolve(type_gen_params, method_gen_params);
 }