public static void PrintFrame(Frame f) { Console.WriteLine(f.SimpleDescription); foreach (Scope scope in f.GetScopes()) { Console.WriteLine("scope : "); for (int i=0; i < scope.Count; ++i) Console.WriteLine(" " + scope.GetName(i) + " = " + scope.GetValue(i).ToString()); } }
/// <summary> /// Creates a shallow copy of the frame /// </summary> /// <returns></returns> public Frame Fork() { Frame f = new Frame(function, self, moduleInstance); f.moduleDef = moduleDef; foreach (Scope s in scopes) f.AddScope(s); return f; }