Example #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);
        }
Example #2
0
                public override void ResolveNoTypeSpec (CodeGen code_gen)
                {
                        if (is_resolved)
                                return;

                        class_ref.Resolve (code_gen);
                        p_gen_inst = (PEAPI.GenericTypeInst) class_ref.ResolveInstance (code_gen, gen_args);

                        type = Modify (code_gen, p_gen_inst);

                        is_resolved = true;
                }
Example #3
0
        public override void ResolveNoTypeSpec(CodeGen code_gen)
        {
            if (is_resolved)
            {
                return;
            }

            class_ref.Resolve(code_gen);
            p_gen_inst = (PEAPI.GenericTypeInst)class_ref.ResolveInstance(code_gen, gen_args);

            type = Modify(code_gen, p_gen_inst);

            is_resolved = true;
        }
Example #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;
                }