Merge pull request #2023 from juergenhoetzel/master
[mono.git] / mcs / tools / tuner / Mono.Tuner / Dispatcher.cs
index 439afd50e35f2afc5f9fe50dd3d8865494954fd1..9dcf5ee05afc4e9bc4a51658a00738dff404443d 100644 (file)
@@ -181,14 +181,26 @@ namespace Mono.Tuner {
 
                void DispatchAssembly (AssemblyDefinition assembly)
                {
-                       foreach (var substep in on_assemblies)
+                       foreach (var substep in on_assemblies) {
+                               var bs = substep as BaseSubStep;
+                               if (bs != null)
+                                       bs.Annotations.Push (substep);
                                substep.ProcessAssembly (assembly);
+                               if (bs != null)
+                                       bs.Annotations.Pop ();
+                       }
                }
 
                void DispatchType (TypeDefinition type)
                {
-                       foreach (var substep in on_types)
+                       foreach (var substep in on_types) {
+                               var bs = substep as BaseSubStep;
+                               if (bs != null)
+                                       bs.Annotations.Push (substep);
                                substep.ProcessType (type);
+                               if (bs != null)
+                                       bs.Annotations.Pop ();
+                       }
                }
 
                void DispatchField (FieldDefinition field)