| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,19 +88,19 @@ private ConcreteFunction maybe_uncache_variable_captures(ConcreteFunction concre | |||
| 88 | 88 | ||
| 89 | 89 | public override (IList<Trackable>, IDictionary<Trackable, IEnumerable<TrackableReference>>) breadth_first_traversal() | |
| 90 | 90 | { | |
| 91 | - Trackable get_merged_trackable(Trackable x) | ||
| 91 | + void merged_trackable(Trackable x) | ||
| 92 | 92 | { | |
| 93 | 93 | // TODO: complete it with new definitions `Asset` and `TrackableConstant`. | |
| 94 | - return x; | ||
| 95 | 94 | } | |
| 95 | + | ||
| 96 | 96 | var trackable_objects = base.breadth_first_traversal(); | |
| 97 | 97 | ||
| 98 | 98 | foreach(var obj in _children_cache.Keys) | |
| 99 | 99 | { | |
| 100 | 100 | // skip the deletion of cache (maybe do it later). | |
| 101 | 101 | foreach(var pair in _children_cache[obj]) | |
| 102 | 102 | { | |
| 103 | - _children_cache[obj][pair.Key] = get_merged_trackable(pair.Value); | ||
| 103 | + merged_trackable(pair.Value); | ||
| 104 | 104 | } | |
| 105 | 105 | } | |
| 106 | 106 | ||
@@ -109,15 +109,11 @@ Trackable get_merged_trackable(Trackable x) | |||
| 109 | 109 | ||
| 110 | 110 | public List<(string, Trackable)> list_dependencies(Trackable obj) | |
| 111 | 111 | { | |
| 112 | - IDictionary<string, Trackable> children; | ||
| 113 | - if (!_children_cache.ContainsKey(obj)) | ||
| 112 | + if (!_children_cache.TryGetValue(obj, out var children)) | ||
| 114 | 113 | { | |
| 115 | 114 | children= new Dictionary<string, Trackable>(); | |
| 116 | 115 | } | |
| 117 | - else | ||
| 118 | - { | ||
| 119 | - children= _children_cache[obj]; | ||
| 120 | - } | ||
| 116 | + | ||
| 121 | 117 | List<(string, Trackable)> res = new(); | |
| 122 | 118 | foreach(var pair in obj.deserialization_dependencies(children)) | |
| 123 | 119 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments