Esempio n. 1
0
 /// <summary>
 /// Specializes debug operations via the instance method
 /// <see cref="Specialize(in RewriterContext, IRContext, DebugAssertOperation)"/>
 /// of the parent <paramref name="data"/> instance.
 /// </summary>
 private static void Specialize(
     RewriterContext context,
     SpecializerData data,
     DebugAssertOperation value)
 {
     if (data.EnableAssertions)
     {
         data.Specializer.Specialize(context, data.Context, value);
     }
     else
     {
         context.Remove(value);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Removes or collects IO operations.
 /// </summary>
 private static void Specialize(
     RewriterContext context,
     SpecializerData data,
     WriteToOutput value)
 {
     if (data.EnableIOOperations)
     {
         data.ToImplement.Add(value);
     }
     else
     {
         context.Remove(value);
     }
 }