Exemplo n.º 1
0
 public void AddRawLLVMTypeMapping(string className, ClepsType rawLLVMTypeMap)
 {
     Debug.Assert(LoadedClassesAndMembers.ContainsKey(className));
     Debug.Assert(!RawLLVMTypeMappingClasses.ContainsKey(rawLLVMTypeMap));
     RawLLVMTypeMappingClasses.Add(rawLLVMTypeMap, LoadedClassesAndMembers[className]);
     LoadedClassesAndMembers[className].AddRawLLVMTypeMapping(rawLLVMTypeMap);
 }
Exemplo n.º 2
0
        public void AddNewMember(string className, string memberName, bool isStatic, ClepsType memberType)
        {
            Debug.Assert(LoadedClassesAndMembers.ContainsKey(className));
            LoadedClassesAndMembers[className].AddNewMember(memberName, isStatic, memberType);

            if (memberType.IsFunctionType && isStatic &&
                (
                    memberType.FunctionReturnType == ClepsType.GetBasicType("System.Types.Int32", new List <uint>() /* array dims */, 0 /* ptrIndirectionLevel */) ||
                    memberType.FunctionReturnType == ClepsType.GetBasicType("System.LLVMTypes.I32", new List <uint>() /* array dims */, 0 /* ptrIndirectionLevel */)
                ) &&
                memberType.FunctionParameters.Count == 0 && memberName == "Main")
            {
                string fullyQualifiedName = className + "." + memberName;
                MainFunctionFullNames.Add(fullyQualifiedName);
            }
        }
Exemplo n.º 3
0
 public bool ClassContainsRawLLVMTypeMapping(string className)
 {
     Debug.Assert(LoadedClassesAndMembers.ContainsKey(className));
     return(LoadedClassesAndMembers[className].RawLLVMTypeMap != null);
 }
Exemplo n.º 4
0
 public bool DoesClassContainMember(string className, string memberName, bool isStatic)
 {
     Debug.Assert(LoadedClassesAndMembers.ContainsKey(className));
     return(LoadedClassesAndMembers[className].DoesClassContainMember(memberName, isStatic));
 }
Exemplo n.º 5
0
 public void AddNewClass(string className)
 {
     Debug.Assert(!LoadedClassesAndMembers.ContainsKey(className));
     LoadedClassesAndMembers.Add(className, new ClepsClass(className));
 }
Exemplo n.º 6
0
 public bool IsClassLoaded(string className)
 {
     return(LoadedClassesAndMembers.ContainsKey(className));
 }