/// <summary> /// Updates this macro analysis cache with a tweak to /// the graph. The update is not performed in place: instead, /// a derived cache is created. /// </summary> /// <param name="update">A tweak to the graph.</param> /// <returns> /// A macro analysis cache that incorporates the update. /// </returns> /// <remarks>This method is thread-safe.</remarks> public MacroAnalysisCache Update(FlowGraphUpdate update) { var newCaches = new List <FlowGraphAnalysisCache>(); updateLock.EnterReadLock(); try { foreach (var cache in distinctCaches) { newCaches.Add(cache.Update(update)); } } finally { updateLock.ExitReadLock(); } return(new MacroAnalysisCache(newCaches, cacheIndices, cacheRefCounts)); }
/// <summary> /// Updates this flow graph analysis cache with a tweak to /// the graph. The update is not performed in place: instead, /// a derived cache is created. /// </summary> /// <param name="update">A tweak to the graph.</param> /// <returns> /// A flow graph analysis cache that incorporates the update. /// </returns> /// <remarks>This method is thread-safe.</remarks> public abstract FlowGraphAnalysisCache Update(FlowGraphUpdate update);