/// <summary> /// Finds a runtime method, which represents the requested method. /// </summary> /// <exception cref="MissingMethodException">The sought method is not found.</exception> /// <param name="ns">The namespace of the sought method.</param> /// <param name="type">The type, which contains the sought method.</param> /// <param name="method">The method to find.</param> /// <returns>An instance of <see cref="RuntimeMethod"/>.</returns> private RuntimeMethod FindMethod(string ns, string type, string method) { foreach (RuntimeType t in typeSystem.GetAllTypes()) { if (t.Name != type) { continue; } if (!string.IsNullOrEmpty(ns)) { if (t.Namespace != ns) { continue; } } foreach (RuntimeMethod m in t.Methods) { if (m.Name == method) { return(m); } } break; } throw new MissingMethodException(ns + "." + type, method); }
private void ResolveLayouts() { // Enumerate all types and do an appropriate type layout foreach (RuntimeType type in typeSystem.GetAllTypes()) { ResolveType(type); } }
public CompilationScheduler(ITypeSystem typeSystem, bool compileAllMethods) { this.typeSystem = typeSystem; this.compileAllMethods = compileAllMethods; if (compileAllMethods) { // forces all types to get compiled foreach (RuntimeType type in typeSystem.GetAllTypes()) { CompileType(type); } } }