Inheritance: TargetType
コード例 #1
0
ファイル: MonoVoidType.cs プロジェクト: baulig/debugger
        public static MonoVoidType Create(MonoSymbolFile corlib, TargetMemoryAccess memory)
        {
            MonoVoidType type = new MonoVoidType (
                corlib, corlib.ModuleDefinition.Types ["System.Void"]);

            TargetAddress klass = corlib.MonoLanguage.MetadataHelper.GetVoidClass (memory);
            type.create_type (memory, klass);

            return type;
        }
コード例 #2
0
        public static MonoVoidType Create(MonoSymbolFile corlib, TargetMemoryAccess memory)
        {
            MonoVoidType type = new MonoVoidType(
                corlib, corlib.ModuleDefinition.GetType("System.Void"));

            TargetAddress klass = corlib.MonoLanguage.MetadataHelper.GetVoidClass(memory);

            type.create_type(memory, klass);

            return(type);
        }
コード例 #3
0
        public MonoBuiltinTypeInfo(MonoSymbolFile corlib, TargetMemoryAccess memory)
        {
            this.Corlib = corlib;

            MonoLanguageBackend mono = corlib.MonoLanguage;

            ObjectType = MonoObjectType.Create (corlib, memory);
            VoidType = MonoVoidType.Create (corlib, memory);

            StringType = MonoStringType.Create (corlib, memory);

            BooleanType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Boolean);
            CharType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Char);
            ByteType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Byte);
            SByteType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.SByte);
            Int16Type = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Int16);
            UInt16Type = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.UInt16);
            Int32Type = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Int32);
            UInt32Type = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.UInt32);
            Int64Type = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Int64);
            UInt64Type = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.UInt64);
            SingleType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Single);
            DoubleType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Double);

            IntType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.IntPtr);
            UIntType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.UIntPtr);

            DecimalType = MonoFundamentalType.Create (
                corlib, memory, FundamentalKind.Decimal);
            Cecil.TypeDefinition decimal_type = corlib.ModuleDefinition.GetType ("System.Decimal");
            corlib.AddType (decimal_type, DecimalType);

            TargetAddress klass = corlib.MonoLanguage.MetadataHelper.GetArrayClass (memory);
            Cecil.TypeDefinition array_type = corlib.ModuleDefinition.GetType ("System.Array");
            ArrayType = mono.CreateCoreType (corlib, array_type, memory, klass);
            mono.AddCoreType (array_type, ArrayType, ArrayType, klass);

            klass = corlib.MonoLanguage.MetadataHelper.GetDelegateClass (memory);
            Cecil.TypeDefinition delegate_type = corlib.ModuleDefinition.GetType ("System.Delegate");
            DelegateType = new MonoClassType (corlib, delegate_type);
            mono.AddCoreType (delegate_type, DelegateType, DelegateType, klass);

            klass = corlib.MonoLanguage.MetadataHelper.GetExceptionClass (memory);
            Cecil.TypeDefinition exception_type = corlib.ModuleDefinition.GetType ("System.Exception");
            ExceptionType = mono.CreateCoreType (corlib, exception_type, memory, klass);
            mono.AddCoreType (exception_type, ExceptionType, ExceptionType, klass);
        }