public List <SemanticTypeMask_I> Calculate(SemanticModuleMask_I convertedModule, List <SemanticTypeMask_I> inputs) { var results = new Dictionary <string, SemanticTypeMask_I>(); var list = results.Values.ToList(); PutInDependencyOrder(list); return(list); }
//public BoundModule Build(BoundRuntimicModelMask_I semanticModel, UnifiedModuleNode unifiedModuleNode) //{ // var boundModule = Modules.Creation.Create(unifiedModuleNode.AssemblyNode.Semantic, unifiedModuleNode.ModuleDefinition); // unifiedModuleNode.Semantic = boundModule; // return boundModule; //} public void BuildOut(RuntimicSystemModel semanticModel, SemanticModuleMask_I moduleEntry) { // If the module is bound, then build it out with bound types. if (moduleEntry.IsBound()) { BuildOut(semanticModel, (BoundModule_I)moduleEntry); } // If the module is semantic, then build it out with semantic types. else if (moduleEntry.IsSemantic()) { var semanticModule = (SemanticModule_I)moduleEntry; Semantic.Metadata.Members.Types.Ensuring.EnsureTypes(semanticModel, semanticModule); } }
public SemanticTypeMask_I Add(RuntimicSystemModel model, SemanticModuleMask_I module, SemanticTypeDefinitionMask_I entry) { // 1.) Add the semantic type to the module // 1.a) Add by resolution name Add(module.Types.ByResolutionName, entry); // 1.b) Add by defintion name Add(module.Types.DefinitionsByName, entry); // 2) Add the semantic to type to the base class // nothin to do right now // 3) Add semantic type to model Infrastructure.Models.Semantic.Types.Ensure(model, entry); return(entry); }
public ConvertedType_I Get(ILConversion conversion, SemanticModuleMask_I module, TypeReference input) { string resolutionName = Types.Naming.GetResolutionName(input); if (!module.Types.ByResolutionName.TryGetValue(resolutionName, out SemanticTypeMask_I typeEntry)) { return(null); } ConvertedType_I converetedType = typeEntry as ConvertedType_I; if (converetedType == null) { throw new System.Exception("Expected convereted type."); } return(converetedType); }
public SemanticTypeMask_I GetBaseType(ILConversion conversion, SemanticModuleMask_I boundModule, TypeDefinition typeDefinition) { if (typeDefinition.BaseType == null) { return(null); } var resolutionName = Types.Naming.GetResolutionName(typeDefinition.BaseType); var result = Models.Types.Get(conversion.RuntimicSystem, resolutionName); if (result != null) { return(result); } //return Execution.Types.Ensuring.Ensure(conversion.Model, typeDefinition.BaseType, null, null); throw new System.Exception("Fix"); }
public SemanticTypeMask_I Add(RuntimicSystemModel semanticModel, SemanticModuleMask_I module, SemanticTypeDefinitionMask_I entry) { Add(module.Types.ByResolutionName, entry); Models.Types.Collection.Add(semanticModel, entry); if (entry.IsDefinition() && entry is SemanticTypeDefinitionMask_I definitionMask) { Add(module.Types.DefinitionsByName, definitionMask); //Models.Types.Ensure(semanticModel, definitionMask); } if (entry.IsReference() && entry is TypeReferenceMask_I referenceMask) { Add(module.Types.ReferencesByName, referenceMask); } return(entry); }
/// <summary> /// Declare all the modules and its members, and then define the members by filling in instructions. /// </summary> /// <param name="moduleEntry"></param> public void DeclareAndDefine(SemanticModuleMask_I moduleEntry) { //moduleEntry.Types.InDependencyOrder = ILConversion.Types.DeclareAll(moduleEntry); // If the module is not converted, then there is no need to build out the rest of the model at this time, as // the remainder ofthe information can be fetched from the type system directly as it is required. if (!moduleEntry.IsConverted()) { return; } //ILConversion.Fields.DeclareAll(moduleEntry); //ILConversion.Methods.DeclareAll(moduleEntry); //ILConversion.Properties.DeclareAll(moduleEntry); //ILConversion.Events.DeclareAll(moduleEntry); //ILConversion.Instructions.DeclareAll(moduleEntry); //ILConversion.Semantic.Types.CreateAll(moduleEntry); }
public void AddModule(SemanticModuleMask_I moduleEntry) { var assemblyEntry = moduleEntry.Assembly; assemblyEntry.Modules.Add(moduleEntry.Name, moduleEntry); }
public SemanticTypeMask_I Get(InfrastructureRuntimicModelMask_I semanticModel, SemanticModuleMask_I module, TypeReference input) { string resolutionName = Types.Naming.GetResolutionName(input); if (!module.Types.ByResolutionName.TryGetValue(resolutionName, out SemanticTypeMask_I typeEntry)) { return(null); } return(typeEntry); }
public SemanticTypeDefinition CreateType(InfrastructureRuntimicModelMask_I model, SemanticModuleMask_I moduleEntry, System.Type typeReference) { //var convertedType = (SemanticTypeDefinition)this.Infrastructure.Semantic.Metadata.Members.Types.Creation.CreateType //<SemanticGenericArrayTypeDefinition, // SemanticGenericStructTypeDefinition, // SemanticGenericDelegateTypeDefinition, // SemanticGenericClassTypeDefinition, // SemanticGenericInterfaceTypeDefinition, // SemanticGenericNestedStructTypeDefinition, // SemanticGenericNestedDelegateTypeDefinition, // SemanticGenericNestedArrayTypeDefinition, // SemanticGenericNestedClassTypeDefinition, // SemanticGenericNestedInterfaceTypeDefinition, // SemanticNestedEnumTypeDefinition, // SemanticNestedStructTypeDefinition, // SemanticNestedDelegateTypeDefinition, // SemanticNestedArrayTypeDefinition, // SemanticNestedClassTypeDefinition, // SemanticNestedInterfaceTypeDefinition, // SemanticSimpleClTypeDefinition, // SemanticEnumTypeDefinition, // SemanticStructTypeDefinition, // SemanticDelegateTypeDefinition, // SemanticArrayTypeDefinition, // SemanticClassTypeDefinition, // SemanticInterfaceTypeDefinition>(model, moduleEntry, typeReference); throw new System.NotImplementedException(); }
public object Ensure(RuntimicSystemModel semanticModel, SemanticModuleMask_I semanticModule, TypeReference input) { throw new NotImplementedException(); }
public void EnsureTypes(RuntimicSystemModel semanticModel, SemanticModuleMask_I moduleEntry) { throw new NotImplementedException(); }