Exemple #1
0
        public IRType GetPointerType(IRType pValueAtPointerType)
        {
            IRType type = null;

            if (!PointerTypes.TryGetValue(pValueAtPointerType, out type))
            {
                type             = System_IntPtr.Clone();
                type.PointerType = pValueAtPointerType;
                PointerTypes.Add(pValueAtPointerType, type);
            }
            return(type);
        }
Exemple #2
0
        public IRType GetArrayType(IRType pElementType)
        {
            IRType type = null;

            if (!ArrayTypes.TryGetValue(pElementType, out type))
            {
                type           = System_Array.Clone();
                type.ArrayType = pElementType;
                ArrayTypes.Add(pElementType, type);
            }
            if (pElementType.IsTemporaryVar != type.ArrayType.IsTemporaryVar || pElementType.IsTemporaryMVar != type.ArrayType.IsTemporaryMVar)
            {
                throw new Exception();
            }
            return(type);
        }