public static void Push(A_Program prog) { if (!InitCalled) { return; } procs.Add(prog); procIndexOfItemInCallStack.Add(procs.Count - 1); //ListViewItem lvi = callstackListView.Items.Add(""); //lvi.SubItems.Add("(Tachy)"); calls.Add("(Tachy)"); }
public static void Repl(string loadFile) { int start = Environment.TickCount; A_Program prog = null; for (int i = 0; i < 10; i++) { prog = new A_Program(); prog.LoadEmbededInitTachy(); } int end = Environment.TickCount; if (loadFile != null) { String init = File.OpenText(loadFile).ReadToEnd(); prog.Eval(new StringReader(init)); } else { while (true) { // Application.DoEvents(); StreamWriter str = new StreamWriter("transcript.ss", true); try { Console.WriteLine("(" + (end - start) + " ms)"); Console.Write("> "); String val = ReadAvailable(); str.WriteLine(val); start = Environment.TickCount; object result = prog.Eval(new StringReader(val)); end = Environment.TickCount; Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Tachy Error: " + e.Message); // + e.Message); // .Message); Console.WriteLine("Stacktrace: " + e.StackTrace); } str.Close(); } } }
public static void Push(A_Program prog) { if (!InitCalled) return; procs.Add(prog); procIndexOfItemInCallStack.Add(procs.Count - 1); //ListViewItem lvi = callstackListView.Items.Add(""); //lvi.SubItems.Add("(Tachy)"); calls.Add("(Tachy)"); }