public void Load(TypeSystem typeSystem) { TypeSystem = typeSystem; TypeLayout = new MosaTypeLayout(typeSystem, CompilerOptions.Architecture.NativePointerSize, CompilerOptions.Architecture.NativeAlignment); CompilationScheduler = new CompilationScheduler(); }
public void ExecuteCompile() { ExecuteCompilePass(); while (CompilationScheduler.StartNextPass()) { ExecuteCompilePass(); } }
public void ExecuteThreadedCompile(int threads) { ExecuteThreadedCompilePass(threads); while (CompilationScheduler.StartNextPass()) { ExecuteThreadedCompilePass(threads); } }
private MosaMethod CompilerMethodInQueue(int threadID = 0) { var method = CompilationScheduler.GetMethodToCompile(); if (method == null) { return(null); } return(CompileMethod(method, threadID)); }
public void ScheduleAll() { //HACK - for debugging // Mosa.Platform.Internal.x86.Runtime::GetProtectedRegionEntryByAddress //var type = TypeSystem.GetTypeByName("Mosa.Platform.Internal.x86", "Runtime"); //var method = type.FindMethodByName("GetProtectedRegionEntryByAddress"); //CompilationScheduler.Schedule(method); //ENDHACK CompilationScheduler.ScheduleAll(TypeSystem); }
public void Load(TypeSystem typeSystem) { lock (_lock) { //if (Stage != CompileStage.Initial) // return; TypeSystem = typeSystem; TypeLayout = new MosaTypeLayout(typeSystem, CompilerOptions.Architecture.NativePointerSize, CompilerOptions.Architecture.NativeAlignment); Linker = null; Compiler = null; CompilationScheduler = new CompilationScheduler(); Stage = CompileStage.Loaded; } }
private void ExecuteCompilePass() { while (true) { var method = CompilationScheduler.GetMethodToCompile(); if (method == null) { return; } CompileMethod(method, null, 0); CompilerTrace.UpdatedCompilerProgress( CompilationScheduler.TotalMethods, CompilationScheduler.TotalMethods - CompilationScheduler.TotalQueuedMethods ); } }
private void CompileWorker(int threadID) { while (true) { var method = CompilationScheduler.GetMethodToCompile(); if (method == null) { return; } // only one method can be compiled at a time lock (method) { CompileMethod(method, null, threadID); } CompilerTrace.UpdatedCompilerProgress(CompilationScheduler.TotalMethods, CompilationScheduler.TotalMethods - CompilationScheduler.TotalQueuedMethods); } }
public void Schedule(MosaMethod method) { CompilationScheduler.Schedule(method); }
public void Schedule(MosaType type) { CompilationScheduler.Schedule(type); }
public void ScheduleAll() { CompilationScheduler.ScheduleAll(TypeSystem); }