public void FlushInlineQueue() { bool action = false; lock (recompileSet) { foreach (var method in recompileSet) { lock (scheduleQueue) { AddToQueue(method); } } recompileSet.Clear(); action = recompileSet.Count != 0; } if (action) { Compiler.PostCompilerTraceEvent(CompilerEvent.InlineMethodsScheduled); } }
public void FlushInlineQueue() { bool action = false; lock (inlineQueue) { foreach (var item in inlineQueue) { var method = item.Key; var timestamp = item.Value; var methodData = Compiler.CompilerData.GetMethodData(method); if (methodData.InlineTimestamp > timestamp) { continue; // nothing to do } lock (scheduleQueue) { if (!scheduleSet.Contains(method)) { scheduleQueue.Enqueue(method); scheduleSet.Add(method); action = true; } } } inlineQueue.Clear(); } if (action) { Compiler.PostCompilerTraceEvent(CompilerEvent.InlineMethodsScheduled); } }