Artifacts Associated With Ticket 523900ffffffffff
Ticket change [4f7fa77a07] (rid 125837) by nobody on 2002-02-28 16:16:13:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
(summary of previous discussions with Jeff, Miguel et al) Idea: errorInfo gives only static source-level info (line numbers and source excerpts), but not the actual arguments gotten by the functions on the stack. (1) This proposal is about creating a second global variable, ::errorStack, which would be primarily a Tcl list (until somebody asks for its string rep of course), into which we'd stick all the dynamic info we miss in errorInfo. The starting point is to store there references to the substituted commands-and-args list of the calling stack, which are available even at Tcl level as [info level $n]. It is easy to do so while respecting the current control flow of error stack: at each level we store the info pertaining to the current level, then we pop back. So this amounts to (in Tcl pseudocode): lappend ::errorStack [info level 0] at the point where errorInfo is currently being built. (2) Possible extension to this proposal: faster reimplementation of errorInfo, leading to a much faster [catch] in the negative (error) case. Principle: - extend the above mechanism with file and line number info from TIP#86, and store them alongside the [info level]s in errorStack. - remove all current errorInfo-construction code (especially the line-counting loop !) and reimplement errorInfo with a read trace, reproducing exactly today's syntax but based on the data in errorStack, and only if errorInfo is used (which is not the case of all [catch]es, hence the speed gain !). I have posted a first step towards this in pure Tcl on comp.lang.tcl. But clearly it suffers from all the limitations of the current errorInfo construction mechanism, which badly interacts with reentrant [eval] of the Tcl code in any write trace on errorInfo ! Hence this proposal as a core patch, which would be IMHO much more elegant (and simple, and efficient...) than this pure-Tcl simulation
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "07. Variables"
- title initialized to: "Substituted error stacks"
- type initialized to: "RFE"
Ticket change [328845cd72] (rid 93631) by ferrieux on 2002-03-25 23:14:22:
- icomment:
Logged In: YES user_id=496139 The nobody is me: [email protected] -Alex
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [47bc4ed6b6] (rid 99754) by dgp on 2002-03-25 23:42:42:
- icomment:
Logged In: YES user_id=80530 Note: this is related to the work I'm doing on TIP 90. Please keep me in the loop on this matter (or assign this FR to me).
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [99000aea05] (rid 110704) by msofer on 2002-03-26 04:47:27:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=148712 Handing off to Don - this really should be considered together with TIP 90.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [e4ac53de2a] (rid 147429) by dgp on 2016-07-02 18:59:57:
- assignee changed to: "ferrieux"
- closer changed to: "nobody"
- comment changed to:
(summary of previous discussions with Jeff, Miguel et al) Idea: errorInfo gives only static source-level info (line numbers and source excerpts), but not the actual arguments gotten by the functions on the stack. (1) This proposal is about creating a second global variable, ::errorStack, which would be primarily a Tcl list (until somebody asks for its string rep of course), into which we'd stick all the dynamic info we miss in errorInfo. The starting point is to store there references to the substituted commands-and-args list of the calling stack, which are available even at Tcl level as [info level $n]. It is easy to do so while respecting the current control flow of error stack: at each level we store the info pertaining to the current level, then we pop back. So this amounts to (in Tcl pseudocode): lappend ::errorStack [info level 0] at the point where errorInfo is currently being built. (2) Possible extension to this proposal: faster reimplementation of errorInfo, leading to a much faster [catch] in the negative (error) case. Principle: - extend the above mechanism with file and line number info from TIP#86, and store them alongside the [info level]s in errorStack. - remove all current errorInfo-construction code (especially the line-counting loop !) and reimplement errorInfo with a read trace, reproducing exactly today's syntax but based on the data in errorStack, and only if errorInfo is used (which is not the case of all [catch]es, hence the speed gain !). I have posted a first step towards this in pure Tcl on comp.lang.tcl. But clearly it suffers from all the limitations of the current errorInfo construction mechanism, which badly interacts with reentrant [eval] of the Tcl code in any write trace on errorInfo ! Hence this proposal as a core patch, which would be IMHO much more elegant (and simple, and efficient...) than this pure-Tcl simulation
- icomment:
Did this become TIP 348 ? Can it now be closed?
- login: "dgp"
- mimetype: "text/plain"
- severity changed to: "Minor"
Ticket change [4b45caaa0d] (rid 147441) by ferrieux on 2016-07-02 22:07:27:
- closedate changed to: "2457572.42184597"
- closer changed to: "ferrieux"
- icomment:
Yes it did. Yes it can.
- login: "ferrieux"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"