protected void CompileTestCode() { platform.InitializeSimulation(simAdapter); var moduleLoader = new MosaModuleLoader(); moduleLoader.AddPrivatePath(System.IO.Directory.GetCurrentDirectory()); moduleLoader.LoadModuleFromFile("mscorlib.dll"); moduleLoader.LoadModuleFromFile("Mosa.Platform.Internal." + platform.Name + ".dll"); moduleLoader.LoadModuleFromFile("Mosa.Test.Collection.dll"); moduleLoader.LoadModuleFromFile("Mosa.Kernel." + platform.Name + "Test.dll"); compiler.Load(TypeSystem.Load(moduleLoader.CreateMetadata())); //compiler.Execute(); compiler.Execute(Environment.ProcessorCount); linker = compiler.Linker as SimLinker; //DumpSymbols(); //simAdapter.SimCPU.Monitor.DebugOutput = true; // DEBUG OPTION Run <int>(string.Empty, "Default", "AssemblyInit", true); simAdapter.SimCPU.Monitor.DebugOutput = false; // DEBUG OPTION }
private void CompileTestCode() { platform.InitializeSimulation(simAdapter); var moduleLoader = new MosaModuleLoader(); moduleLoader.AddPrivatePath(System.IO.Directory.GetCurrentDirectory()); moduleLoader.LoadModuleFromFile("mscorlib.dll"); moduleLoader.LoadModuleFromFile("Mosa.Runtime.dll"); moduleLoader.LoadModuleFromFile("Mosa.Runtime." + platform.Name + ".dll"); moduleLoader.LoadModuleFromFile("Mosa.Test.Collection.dll"); moduleLoader.LoadModuleFromFile("Mosa.Kernel." + platform.Name + "Test.dll"); Compiler.Load(TypeSystem.Load(moduleLoader.CreateMetadata())); //var threads = Compiler.CompilerOptions.UseMultipleThreadCompiler ? Environment.ProcessorCount : 1; //Compiler.Execute(threads); Compiler.Execute(Environment.ProcessorCount); }