Artifacts Associated With Ticket 2868499fffffffffffffffffffffffffffffffff
Ticket change [35b8947a8a] (rid 106989) by ferrieux on 2009-09-27 23:57:21:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Here is a crude but functional implementation of TIP #348. The variable ::errorStack, comes to life when defined (which is not the case by default, to avoid any performance hit). While unwinding, it is populated by substituted argslists as described in the TIP. It is automatically reset (to the empty list) whenever ::errorInfo is. (But this leaves it enabled. To disable it, unset it.) (Among crudities: uses ::errorStack instead of ::tcl::errorStack, doesn't pay attention to code style, no test cases. Also, it inserts two fields in the private interp structure, right in the middle, not at the end. ABI hazard, don't forget to 'make clean' after applying ;-)
- foundin initialized to: "TIP Implementation"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ferrieux"
- subsystem initialized to: "None"
- title initialized to: "TIP #348: Substituted errorStack"
- type initialized to: "Patch"
Ticket change [f359738d82] (rid 129691) by ferrieux on 2009-09-28 06:57:24:
- icomment:
File Added - 344544: errorstack.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [83f9e360ec] (rid 117469) by ferrieux on 2009-09-29 05:48:07:
- icomment:
File Added - 344684: errorstack.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [1e1b792821] (rid 90922) by ferrieux on 2009-09-29 05:48:21:
- icomment:
File Deleted - 344544:
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [cbbff9ad72] (rid 95574) by ferrieux on 2009-09-29 06:00:27:
- icomment:
First slight improvement: explicitly skip iPtr->rootFramePtr, like in [info level $n], since the root frame will always have argc==0. This removes the parasitic {} always found at the end of ::errorStack, and also an extra one generated by [tailcall] and [coroutine]. Next improvements planned: (1) make the on/off switch more efficient by using a linked boolean var rather than the existence of ::errorStack which costs a hash lookup when negative. (2) make the list building slightly more efficient by using a backbone of Tcl_Obj as Cons'es (linked list), and turning it into a Tcl list only in a read trace attached to ::errorStack (instead of directly lappending as is currently the case. This construction is wasted in caught, expected exception handling where the errorStack is not used). (3) proper ::tcl namespace + test cases. - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [cba1bb95d8] (rid 95552) by ferrieux on 2009-10-05 07:40:46:
- icomment:
File Added - 345341: errorstack.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [07de58fa25] (rid 89478) by ferrieux on 2009-10-05 07:41:09:
- icomment:
File Deleted - 344684:
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [e50ad78712] (rid 88062) by ferrieux on 2009-10-05 07:46:02:
- icomment:
Mostly done. - now the var is ::tcl::errorStack and the flag is ::tcl::useErrorStack - zero overhead when ::tcl::useErrorStack is 0 (default) - uses a read trace to postpone var machinery until real use - uses an optimized in-place lappend/reset to keep the list intrep as much as possible (just as fast as the linked list approach IMO) TBD: test cases.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [f0dbc2dc00] (rid 109269) by ferrieux on 2009-10-05 15:11:33:
- icomment:
File Added - 345369: errorstack.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [e00a9951b2] (rid 115122) by ferrieux on 2009-10-05 15:11:43:
- icomment:
File Deleted - 345341:
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [0c69681eb1] (rid 114171) by ferrieux on 2009-10-05 15:12:36:
- icomment:
Complete with test cases now.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack.patch" [61322c985b] (rid 92204) by ferrieux on 2009-10-07 14:04:27.
Ticket change [31812654cd] (rid 93438) by ferrieux on 2009-10-07 14:04:27:
- icomment:
File Added - 345590: errorstack.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [4e8bd71357] (rid 125663) by ferrieux on 2009-10-07 14:04:37:
- icomment:
File Deleted - 345369:
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [41e5b92b90] (rid 116273) by ferrieux on 2009-10-20 23:12:30:
- icomment:
File Added - 347441: errorstack2.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack2.patch" [b42788ec90] (rid 124979) by ferrieux on 2009-10-20 23:12:30.
Ticket change [cdb0ad937f] (rid 95935) by ferrieux on 2009-10-20 23:17:22:
- icomment:
Attaching a new patch, errorstack2.patch, fulfilling Joe's request of [info errostack ?interp?] and [dict get $d -errostack]. I left the ::tcl::useErrorStack control variable for perf measurements: 0 --> pristine HEAD 1 --> just [info errorstack] 2 ---> adds options dict entry -errorstack Note the implementation still uses ckalloc-based Tcl_NewListObj for argslist, pending proof that optimization is needed. Here are the figures: Case: Ten-fold catch ladder use=0 -> 74.7924 microseconds per iteration Case: Ten-fold catch ladder use=1 -> 76.7888 microseconds per iteration Case: Ten-fold catch ladder use=2 -> 77.1977 microseconds per iteration Case: Single Catch with opt dict use=0 -> 19.2613 microseconds per iteration Case: Single Catch with opt dict use=1 -> 19.7608 microseconds per iteration Case: Single Catch with opt dict use=2 -> 20.2815 microseconds per iteration with code: for {set i 1} {$i<10} {incr i} { proc f$i x "f[expr {$i+1}] \$x" } proc f10 x {error F10:$x} proc boo {} {error BOO} proc catchloop {} { for {set i 0} {$i<100000} {incr i} { if {[catch boo m d]} continue } } foreach {mm ss} { "Ten-fold catch ladder" {catch {f1 12}} "Single Catch with opt dict" {catch boo m d} } { foreach v {0 1 2} { set ::tcl::useErrorStack $v puts "Case: $mm use=$v -> [time $ss 10000]" } } - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack3.patch" [911f8ee6e4] (rid 120576) by ferrieux on 2009-10-23 07:56:29.
Ticket change [1b092ac426] (rid 123077) by ferrieux on 2009-10-23 07:56:29:
- icomment:
File Added - 347809: errorstack3.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [1b89364d0f] (rid 123168) by ferrieux on 2009-10-23 08:03:15:
- icomment:
Extended patch adds bit value 4 as "flat list", ie errorstack is built as 2 foo bar 1 baz 2 gnu gnats instead of {foo bar} baz {gnu gnats} Hence: use=0 : pristine use=1 : info errorstack use=2 : + dict use=5 : 1 + flatlist use=6 : 2 + flatlist Timings below: Case: Ten-fold catch ladder use=0 -> 101.3854 microseconds per iteration Case: Ten-fold catch ladder use=1 -> 106.2653 microseconds per iteration Case: Ten-fold catch ladder use=2 -> 106.8439 microseconds per iteration Case: Ten-fold catch ladder use=5 -> 103.5229 microseconds per iteration Case: Ten-fold catch ladder use=6 -> 103.7669 microseconds per iteration Case: Single Catch with opt dict use=0 -> 25.814 microseconds per iteration Case: Single Catch with opt dict use=1 -> 26.2905 microseconds per iteration Case: Single Catch with opt dict use=2 -> 27.0002 microseconds per iteration Case: Single Catch with opt dict use=5 -> 26.0665 microseconds per iteration Case: Single Catch with opt dict use=6 -> 26.783 microseconds per iteration Conclusion: while the gain for a tight catch loop is negligible, for a ten-fold catch ladder building a long errorstack it is substantial: the flatlist roughly divides the overhead by three. However, the flatlist is a bit less convenient for the programmer. It could be postprocessed into a nested list in [info errorstack] but not int the options dict... - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [32325c613e] (rid 93571) by ferrieux on 2009-10-31 22:59:31:
- icomment:
File Added - 348989: errorstack4.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack4.patch" [69be186b6b] (rid 103303) by ferrieux on 2009-10-31 22:59:31.
Ticket change [934f76953a] (rid 105791) by ferrieux on 2009-10-31 23:01:39:
- icomment:
Patch now restricted as per Joe's recommendations on tclcore: - always on - non-flat list - with options dict Test suite now needs fixes wherever the options dict was checked in extenso...
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [7e18e481ce] (rid 97350) by ferrieux on 2009-10-31 23:36:43:
- icomment:
File Added - 348992: errorstack5.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack5.patch" [375a04c653] (rid 107255) by ferrieux on 2009-10-31 23:36:43.
Ticket change [f93cccae73] (rid 91673) by ferrieux on 2009-10-31 23:37:42:
- icomment:
Test suite now fixed. Thanks to -match glob :)
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack6.patch" [9aea29eec5] (rid 111033) by ferrieux on 2009-11-04 00:20:26.
Ticket change [517ef17f94] (rid 126149) by ferrieux on 2009-11-04 00:20:26:
- icomment:
File Added - 349392: errorstack6.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [eeb53d5d71] (rid 108862) by ferrieux on 2009-11-09 20:26:18:
- icomment:
File Added - 350135: errorstack7.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack7.patch" [39679faea9] (rid 112381) by ferrieux on 2009-11-09 20:26:18.
Ticket change [c43e10b3f3] (rid 111812) by ferrieux on 2009-11-09 20:26:40:
- icomment:
Added documentatoin in catch.n and info.n.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [ce74a21506] (rid 96058) by dgp on 2009-12-16 00:42:39:
- assignee changed to: "dgp"
- priority changed to: "9 Immediate"
Add attachment "errorstack8.patch" [fac3342a29] (rid 91936) by ferrieux on 2010-02-08 17:08:22.
Ticket change [b771eb5900] (rid 125600) by ferrieux on 2010-02-08 17:08:22:
- icomment:
File Added - 362053: errorstack8.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [64d94d6132] (rid 92841) by ferrieux on 2010-02-08 17:08:38:
- icomment:
Patch updated to HEAD.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack9.patch" [010489cc34] (rid 119407) by ferrieux on 2010-03-17 07:57:34.
Ticket change [2c0a06a175] (rid 118838) by ferrieux on 2010-03-17 07:57:35:
- icomment:
File Added - 367044: errorstack9.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [e32cdd97e2] (rid 87748) by ferrieux on 2010-03-17 07:59:06:
- icomment:
Patch re-updated to HEAD, and now includes two updates suggested by dgp: (a) restriction of -errorstack dict option to TCL_ERROR cases (b) simplification of the internal [lappend] used
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [00fc057a88] (rid 119402) by dgp on 2010-03-17 21:01:29:
- icomment:
-errorstack is like -errorcode in that it wants a list argument. This patch suffers from the same bug as 2383005. Both bugs should be fixed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2cd0927865] (rid 118975) by dgp on 2010-03-17 21:03:44:
- icomment:
Need to examine whether Tcl_SaveInterpState and friends need to give the -errorstack dict entry any special treatment like errorInfo and errorCode receive, or whether it's fully covered by the returnOpts dict.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [412979783c] (rid 116142) by dgp on 2010-03-17 21:50:59:
- icomment:
TclProcessReturn() does not appear to have anything in it to pull a -errorstack value out of the options dict to be stored in the iPtr->errorstack field.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [a6f605c41c] (rid 98701) by ferrieux on 2010-03-18 00:46:11:
- icomment:
No, -errorstack is just a readonly optsDict member. Even Joe, who asked for it in the first place, didn't ask for a [return -errorstack]. Personally I believe(d) that restricting ourselves to [info/interp errorstack] is(was) even better, but I yielded. Question1: do you think that a read-only optsDict member is out of question ? Question2: where's your preference between: (a) a read-write opt (b) no opt, just [info/interp errorstack] ? - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [5579a5ec4f] (rid 94140) by dgp on 2010-03-18 00:52:21:
- icomment:
um, that's novel. :) I might be convinced to make this one special, but in that case I don't think the right thing to do with [return -errorstack] is to just let it silently fail. If we are to disallow it, raise an error. I was wondering myself about whether [info errostack] would be sufficient. The issue appears to come down to whether or not the value of -errorstack ought to be considered part of the "state" of the interp -- those values saved and restored by Tcl_*InterpState() and cable to be [catch]-ed and re-raised by [return -options]. Since you call -errorstack a sister of -errorinfo, my first assumption is that it is part of that state, and needs to be part of that save/restore capability, and for that reason needs to be writable via the [return] command.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [1c79b2a9b5] (rid 90611) by ferrieux on 2010-03-18 03:47:03:
- icomment:
Ah, OK. Just noticed that [return -foo bar something] just populates the dict with key -foo and value bar. I had wrongly assumed that only the meaningful ones were passed, erroring on others. Anyway I accept the argument of symmetry with errorinfo. Will shortly upload an update including the r/w option.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [1148a911da] (rid 95113) by ferrieux on 2010-03-18 05:30:17:
- icomment:
File Added - 367176: errorstack10.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack10.patch" [66cd1b82ab] (rid 102786) by ferrieux on 2010-03-18 05:30:17.
Ticket change [4f0647f217] (rid 125753) by ferrieux on 2010-03-18 05:39:45:
- icomment:
Attached patch doing as promised, [return -errorstack], and a new test case checking that this affects [info errorstack] on subsequent [catch] as expected. Note that it also includes the fix for 2383005. Note however, that in both cases if a non-list like "{}a" is passed to [return -errorstack/errorcode], the resulting error message remains the final arg of [return -code error ...] instead of 'list element in braces followed by "a" instead of space'. I suspect this is the work of Tcl_TransferResult but I'm not familiar with that part, I'd appreciate help (ipso facto solving 2383005). - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [7ea7ffd7ee] (rid 97453) by ferrieux on 2010-03-18 05:57:58:
- icomment:
Let's handle that tiny issue in the bug 2383005 itself.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [80b8965b40] (rid 116915) by ferrieux on 2010-03-19 06:07:50:
- icomment:
File Added - 367319: errorstack11.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack11.patch" [6d4297d91c] (rid 128663) by ferrieux on 2010-03-19 06:07:50.
Ticket change [9c3fda5586] (rid 96117) by ferrieux on 2010-03-19 06:08:43:
- icomment:
Patch updated to include the cleaner MergeRetOpts-based check for listness of -errorstack values, and a test case.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack12.patch" [f8eb684bda] (rid 91617) by ferrieux on 2010-03-24 04:24:04.
Ticket change [cfd1556dbd] (rid 113052) by ferrieux on 2010-03-24 04:24:04:
- icomment:
File Added - 367943: errorstack12.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [f3d01a20c8] (rid 129785) by ferrieux on 2010-03-24 04:25:07:
- icomment:
Thanks to Miguel for the hint: varFramePtr != framePtr is the simple check for [uplevel] spurious echoes. Patch updated.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [1197d5b194] (rid 95173) by ferrieux on 2010-03-24 22:55:23:
- icomment:
Attaching patch displaying the uplevel slots as {uplevel $relativelevel}. - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack13.patch" [366f1c1eca] (rid 107101) by ferrieux on 2010-03-24 22:58:05.
Ticket change [09cbe55da0] (rid 113715) by ferrieux on 2010-03-24 22:58:05:
- icomment:
File Added - 368071: errorstack13.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [3556713450] (rid 106907) by dgp on 2010-03-25 02:35:05:
- icomment:
In the latest patch the uplevel entries don't appear to happen at the toplevel. Contrast: % proc foo {} {uplevel 1 bar} % proc bar {} {error baz} % catch foo m o 1 % dict get $o -errorstack bar foo % % proc wrap {} {foo} % catch wrap m o 1 % dict get $o -errorstack bar {uplevel 1} foo wrap The uplevel entry between bar and foo doesn't get inserted when foo is called from level #0. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0a3ecf9405] (rid 113784) by dgp on 2010-03-25 03:21:06:
- icomment:
File Added - 368110: 2868499.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [ea959940f2] (rid 103402) by dgp on 2010-03-25 03:22:51:
- icomment:
ok, that logic wasn't hard to correct. see new patch. Not a huge deal, but I notice that the constructed uplevel entries always reports the relative level difference, even when it was a command using an absolute level, like [uplevel #0] that caused the branch in the tree of CallFrames.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [178294e829] (rid 122507) by dgp on 2010-03-25 03:24:44:
- icomment:
oops, uploaded that patch before learning that result-6.4 needs an update to match it.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [5ec0f4af87] (rid 115680) by dgp on 2010-03-25 03:45:34:
- icomment:
There remains an offset in the timing of appends to -errorinfo and -errorstack: proc myEval script { if {[catch {uplevel 1 $script} m o] == 1} { puts EI:[dict get $o -errorinfo]\n puts ES:[dict get $o -errorstack] } } proc foo {} {error bar} myEval foo OUTPUT: EI:bar while executing "error bar" (procedure "foo" line 1) invoked from within "foo" ("uplevel" body line 1) invoked from within "uplevel 1 $script" ES:foo {uplevel 1} {myEval foo} It is clear that the each Tcl_LogCommandInfo call is appending to -errorinfo text related to the commands that have completed their evaluation, while it appends to -errorstack information about the current context which has not yet been terminated. Parallel appends would be less confusing. If -errorstack construction could be changed to match -errorinfo, then the [control::eval] command would already handle -errorstack correctly as written. With the current patch, the [control::eval] command needs to have code added to strip a final {uplevel 1} from the -errorstack to fully disguise the wrapping replacement. The analogous issue would impact [control::ascaller] too. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3075b76c87] (rid 93260) by ferrieux on 2010-03-25 04:40:14:
- icomment:
Re the relative levels: this is both intentional and hard to avoid. - Intentional, because only a relative level allows unambiguous interpretation of the scopes when the error stack is not taken from toplevel (eg in a deep [catch]), hence the lat item is not at level 1. {uplevel N} simply means you need to skip N (non-uplevel) items on the right to find the scope. - Hard to avoid, because the exact nature of the scope-shifting operation can be very varied, and distinguishing absolute and relative uplevels would imply re-parsing the text or just-run bytecode (eeek). - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [5afd0409ba] (rid 118239) by ferrieux on 2010-03-25 05:02:58:
- icomment:
Re syncing errorinfo and errorstack, I believe you're asking too much for little gain. The current approach is to record the (valuable) dynamic objv[] when it's available *and* we manage to be called. We manage to be called by the T_LCI "vehicle", which is nicer than the duplicated code that was in place before, but any higher frequency would be much more complex. Delaying the recording of the objv[] after its initial availability amounts to shifting the list at the end, I don't see the point.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [b0d2129227] (rid 98045) by ferrieux on 2010-03-26 04:45:09:
- icomment:
File Added - 368223: errorstack14.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "errorstack14.patch" [4f3edfaa7e] (rid 125794) by ferrieux on 2010-03-26 04:45:09.
Ticket change [714d259bf8] (rid 100648) by ferrieux on 2010-03-26 04:46:50:
- icomment:
Uploaded errorstack14.patch implementing solution "fast, flat, out-of-band". CALL {foo x y} UP 1 CALL {bar z} CALL {gnu t} Docs and minimal tests updated accordingly. - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [7ba5e967ae] (rid 96945) by dgp on 2010-03-30 01:45:14:
- icomment:
Several of the results in the new/revised tests are checking for {UP 1} as the last element of the errorstack. This is exposing details of the tcltest framework. This is likely only a theoretical problem, but more robust tests won't do this as protection again possible coding changes in future versions of the tcltest package. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f7e027b77c] (rid 91447) by ferrieux on 2010-03-30 01:47:32:
- icomment:
Yes. Will shortly replace them by a glob match with a trailing star.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [3f4d1caaea] (rid 121435) by dgp on 2010-03-30 01:52:14:
- icomment:
Since the revised structure of the -errorstack value demands that it be a list with an even number of elements, that check should be added to [return -errorstack $value].
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [b584fe9d63] (rid 125260) by dgp on 2010-03-31 01:56:09:
- icomment:
Attached a demo script that puts the new feature through its paces with many commands that push CallFrames. Could be a starting point for coverage tests for the test suite.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [38298bd5c9] (rid 112157) by dgp on 2010-03-31 01:57:32:
- icomment:
File Added - 368850: stack.tcl
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "stack.tcl" [5c02c19efc] (rid 118423) by dgp on 2010-03-31 01:57:32.
Add attachment "errorstack15.patch" [98b3ff1731] (rid 110655) by ferrieux on 2010-03-31 21:16:26.
Ticket change [2698483782] (rid 88373) by ferrieux on 2010-03-31 21:16:27:
- icomment:
File Added - 368958: errorstack15.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [e7bef8fa0f] (rid 104521) by ferrieux on 2010-03-31 21:18:03:
- icomment:
Thanks, will look at these in detail when polishing the tests. Just updated the patch to handle interp state Save/Restore/Discard and end-of-interp-life, and also the check for even-sized -errorstack value.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [7854af2219] (rid 89944) by dgp on 2010-03-31 22:45:33:
- icomment:
File Deleted - 368110:
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [52fc2f09bf] (rid 126407) by dgp on 2010-03-31 22:51:08:
- icomment:
File Added - 368969: 2868499.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "2868499.patch" [6cd4e1d8e5] (rid 128591) by dgp on 2010-03-31 22:51:08.
Ticket change [29c70171ea] (rid 118447) by dgp on 2010-03-31 22:53:11:
- icomment:
Updated patch makes tiny improvement to T_LCI. FWIW, I'd make some different choices in the -errorcode values, but I'll defer to whatever scheme dkf has been building. Still want to do something of an audit of places where -errorinfo gets tinkered with to check whether -errorstack needs parallel treatment. That can happen post-commit. To the extent that more fixes are needed they will be fixes of fairly obsure bugs.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [dcbe51dd08] (rid 114539) by ferrieux on 2010-04-01 00:11:59:
- icomment:
Summary from talk on the chat: To get to the "inner context" (ie the just-executed command/instruction when the error first bursts, in the first T_LCI call in a row), two families of cases exist: - error generated by a bytecode instruction: based on a stack arity table (+ special casing of INST_EXPAND_*) we can reconstruct the objv[] out of the stack contents (not yet popped). What's nice is that TEBC has a single call site of T_LCI. - error generated in one of the many non-compiled error cases from tclBasic.c. These are trickier since there is no uniform way of reaching the objv[]. In some cases we might fall back to just displaying the static source. I believe the compiled case is top priority, because it applies to most code anyway. (would have _loved_ the arity suffix like INST_LOAD_SCALAR1 to be generalized...) - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [76ee7ae1c5] (rid 105677) by dgp on 2010-04-01 00:48:08:
- icomment:
I scanned the Tcl sources for errorinfo/errorInfo and only found one thing to mention: dgpI think we can and should demand that any background error handler wishing to make use of [info errorstack].... dgp... must be one created using the [interp bgerror] interface. dgpso while we continue to offer legacy support by setting ::errorInfo and ::errorCode before invoking ::bgerror .... dgp... we do not go to the trouble of making [info errorstack] follow suit. Otherwise, most return options relevant code in Tcl itseld is using utility routines like Tcl_Get|SetReturnOptions() and Tcl_Save|RestoreInterpState() so they end up working with the new -errorstack automatically.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [afb070fbc8] (rid 97856) by ferrieux on 2010-04-06 02:51:27:
- icomment:
Committed to HEAD.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [9b568887df] (rid 111103) by dgp on 2010-04-06 05:14:29:
- closedate changed to: "2010-04-05T22:14:29"
- closer changed to: "dgp"
- icomment:
allow_comments - 1
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"
- username: "dgp"
Ticket change [dab091366b] (rid 107834) by ferrieux on 2010-05-03 06:26:40:
- icomment:
Note that patch 2995655 now has the proposed "inner contexts" extension.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [f63a3621bc] (rid 130264) by ferrieux on 2010-05-03 06:26:41:
- icomment:
allow_comments - 0
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment: