Пример #1
0
        PEAPI.Type GetType(CodeGen code_gen, PEAPI.CustomModifier modifier, BaseTypeRef klass)
        {
            klass.Resolve(code_gen);
            var bcr = klass as BaseClassRef;

            if (bcr != null)
            {
                return(new PEAPI.CustomModifiedType(peapi_type, modifier, bcr.PeapiClass));
            }

            var pt = klass as PrimitiveTypeRef;

            return(new PEAPI.CustomModifiedType(peapi_type, modifier, code_gen.PEFile.AddPrimitiveType((PEAPI.PrimitiveType)pt.PeapiType)));

            throw new NotSupportedException(klass.GetType().ToString());
        }
Пример #2
0
        public void MakeCustomModified(CodeGen code_gen, PEAPI.CustomModifier modifier,
                                       BaseClassRef klass)
        {
            use_type_spec = true;
            conversion_list.Add(ConversionMethod.MakeCustomModified);
            conversion_list.Add(modifier);
            conversion_list.Add(klass);

            if (modifier == PEAPI.CustomModifier.modreq)
            {
                SigMod += ("modreq (" + klass.FullName + ")");
            }
            else if (modifier == PEAPI.CustomModifier.modopt)
            {
                SigMod += ("modopt (" + klass.FullName + ")");
            }
        }
Пример #3
0
        public void MakeCustomModified(CodeGen code_gen, PEAPI.CustomModifier modifier,
                                       BaseTypeRef klass)
        {
            PEAPI.Type type;

            use_type_spec = true;

            Pair p = new Pair(peapi_type, modifier.ToString());

            type = type_table [p] as PEAPI.Type;
            if (type == null)
            {
                type           = GetType(code_gen, modifier, klass);
                type_table [p] = type;
            }
            peapi_type = type;
        }
Пример #4
0
 public void MakeCustomModified(CodeGen code_gen,
                                PEAPI.CustomModifier modifier, BaseClassRef klass)
 {
     type_ref.MakeCustomModified(code_gen, modifier, klass);
 }