public static void RunFeature(MonoLinkerFeature feature) { bool supported; switch (feature) { case MonoLinkerFeature.Martin: supported = MonoLinkerSupport.IsFeatureSupported(MonoLinkerFeature.Martin); break; case MonoLinkerFeature.Unknown: supported = MonoLinkerSupport.IsFeatureSupported(MonoLinkerFeature.Unknown); break; case MonoLinkerFeature.ReflectionEmit: Console.Error.WriteLine("REFLECTION EMIT"); supported = false; break; default: throw new AssertionException(); } Console.WriteLine($"DONE: {supported}"); }
public void SetFeatureEnabled(MonoLinkerFeature feature, bool enabled) { if (feature == MonoLinkerFeature.Unknown) { throw new OptimizerException($"Cannot modify `{nameof (MonoLinkerFeature.Unknown)}`."); } _enabled_features [feature] = enabled; }
public bool IsFeatureEnabled(MonoLinkerFeature feature) { if (_enabled_features.TryGetValue(feature, out var value)) { return(value); } return(!DisableAll); }
RequireFeatureConditional(BasicBlockScanner scanner, MonoLinkerFeature feature) : base(scanner) { Feature = feature; }
IsFeatureSupportedConditional(BasicBlockScanner scanner, MonoLinkerFeature feature) : base(scanner) { Feature = feature; }
public static void RequireFeature(MonoLinkerFeature feature) { }
public static bool IsFeatureSupported(MonoLinkerFeature feature) => true;