static private WriteCurrentEnvironment ( StringBuilder sb ) : void | ||
sb | StringBuilder | |
return | void |
static void HandleContext(Vm vm) { var stackTraceSb = new StringBuilder (); vm.WriteStackTrace (stackTraceSb); var stackTrace = stackTraceSb.ToString (); var currentEnvironmentSb = new StringBuilder (); vm.WriteCurrentEnvironment (currentEnvironmentSb); var currentEnvironment = currentEnvironmentSb.ToString (); var result = new HashInstance (); result.Add (Value.Make ("stack"), Value.Make (stackTrace)); result.Add (Value.Make ("environment"), Value.Make (currentEnvironment)); vm.IncrementCells (6 + stackTrace.Length + currentEnvironment.Length); vm.stack.Push (Value.Make (result)); vm.programCounter ++; return; }