From f07c53e38d55f0c7c648b7818798138d91053527 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Thu, 18 May 2023 09:19:43 +1000 Subject: core: improve eval frame handling Now callers to JimInvokeCommand() are expected to push and eval frame. Then we no longer need to carry currentScriptObj, argc, argv in the interp since these are in the current eval frame. Note that this change simply renames some unused fields in Jim_Interp for ABI compatibility, but these will be removed in due course. Signed-off-by: Steve Bennett --- stdlib.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stdlib.tcl') diff --git a/stdlib.tcl b/stdlib.tcl index 804a499..5945185 100644 --- a/stdlib.tcl +++ b/stdlib.tcl @@ -38,9 +38,9 @@ proc function {value} { # (deepest level first) proc stacktrace {{skip 0}} { set frames {} - loop level 2 [info frame]+1 { + loop level $skip+1 [info frame] { set frame [info frame -$level] - if {$frame(level) > $skip && [dict exists $frame proc]} { + if {[dict exists $frame proc]} { lappend frames $frame(proc) $frame(file) $frame(line) } } -- cgit v1.1