示例#1
0
        public unsafe Type EmitType(BCSYM_NamedRoot *pSymbol)
        {
            BCITER_CHILD bciter_child;
            TypeBuilder  builder = this.DefineType(BCSYM.PNamedRoot((BCSYM modopt(IsConst) * modopt(IsConst) modopt(IsConst))pSymbol));

            this.m_types.Add(builder.Name, builder);
            ushort *numPtr2 = BCSYM_NamedRoot.GetCompiler(pSymbol)[12][900];

            BCITER_CHILD.Init(&bciter_child, pSymbol, false, false, false);
            for (BCSYM_NamedRoot *rootPtr = BCITER_CHILD.GetNext(&bciter_child); rootPtr != null; rootPtr = BCITER_CHILD.GetNext(&bciter_child))
            {
                if (((byte)((*(((byte *)rootPtr)) * 3)[&?s_rgBilkindInfo@BCSYM@@1QBUBilkindInfo@@B] & 0x40)) != 0)
示例#2
0
        public unsafe void FindMethods(BCSYM_NamedRoot *pAnonymousType, TypeBuilder typeBuilder, ref ConstructorBuilder ctorBuilder, ref MethodBuilder toStringBuilder, ref MethodBuilder equalsObjBuilder, ref MethodBuilder equalsTypeBuilder, ref MethodBuilder getHashBuilder)
        {
            BCITER_CHILD bciter_child;
            Compiler *   compilerPtr = BCSYM_NamedRoot.GetCompiler(pAnonymousType);
            ushort *     numPtr4     = Compiler.AddString(compilerPtr, & ?? _C@_1BC@GFPIDKBJ@?$AAT?$AAo?$AAS?$AAt?$AAr?$AAi?$AAn?$AAg?$AA?$AA@);
            ushort *     numPtr3     = Compiler.AddString(compilerPtr, & ?? _C@_1O@FOCMPMJF@?$AAE?$AAq?$AAu?$AAa?$AAl?$AAs?$AA?$AA@);
            ushort *     numPtr2     = Compiler.AddString(compilerPtr, & ?? _C@_1BI@KCPDAEGD@?$AAG?$AAe?$AAt?$AAH?$AAa?$AAs?$AAh?$AAC?$AAo?$AAd?$AAe?$AA?$AA@);
            ushort *     numPtr      = *((ushort **)(*(((int *)(compilerPtr + 12))) + 900));

            BCITER_CHILD.Init(&bciter_child, pAnonymousType, false, false, false);
            for (BCSYM_NamedRoot *rootPtr = BCITER_CHILD.GetNext(&bciter_child); rootPtr != null; rootPtr = BCITER_CHILD.GetNext(&bciter_child))
            {
                if (BCSYM.IsProc((BCSYM * modopt(IsConst) modopt(IsConst))rootPtr))
                {
                    int num = *((int *)(rootPtr + 12));
                    if (StringPool.IsEqual((ushort modopt(IsConst) *)num, (ushort modopt(IsConst) *)numPtr4))
                    {
                        toStringBuilder = this.DefineMethod(typeBuilder, (BCSYM_Proc *)rootPtr);
                    }