// ----------------------------------------------------------------------------- // file="Program" // Project: StgSharp // Copyright (c) Nitload. // SPDX-License-Identifier: MIT // ----------------------------------------------------------------------------- using Nitload.Common.HighPerformance.Memory; using Nitload.Common.Internal; using Nitload.Common.Timing; using Nitload.Common.Timing; using Nitload.Graphics; using Nitload.Mathematics; using Nitload.Mathematics.Numeric; using System; using System.Runtime.InteropServices; namespace Nitload { internal static partial class Program { private static bool _hasError; private static string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp"; internal static unsafe void Main( string[] args ) { // Select the managed-only emitter preview before initializing the normal runtime. if (args.Length > 0 && args[0] == "--regex-preview") { Environment.ExitCode = TestRegexGenerate.Run(args[1..]); return; } try { World.Initialize(new() { TimingConfig = new TimeSourceStartupConfiguration() }) // .UseModule() // .UseModule() .InitializeModule(); // TestRegexAnalyse.Run(); _ = TestRegexGenerate.Run("abc|123"); // TestHlsf(); // TlsfStressTest.Run(); // TestSwiss(); // TestL4Prefetch(); // TestMatrix(); /**/ } catch (Exception ex) { Console.WriteLine(ex); _ = Console.ReadLine(); _hasError = true; /* World.WriteLog($"{ex}", LogType.Error); Dialogue.PostError(ex); /**/ // World.Terminate(-1); /**/ } finally { if (!_hasError) { Console.WriteLine("Program has exited with no error, press any key to exit."); _ = Console.ReadKey(); } World.Terminate(0); } /**/ } } }