Artifacts Associated With Ticket 533907ffffffffff
Ticket change [f292ac7c89] (rid 109573) by dgp on 2002-03-23 05:16:19:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The routine Tcl_EvalObjv is a monstrosity of obfuscation. Surely we can rewrite it to be more clear. If I'm deciphering it correctly, it appears that when evaluation returns TCL_ERROR, then Tcl_LogCommandInfo will be called -- *EXCEPT* when it has been detected that a trace on the command might be in place. In that case, cmdLen will not be zero, and the "goto cmdtraced" will not be taken. That's good, because we don't need to generate the cmdString since it's already done. But it's bad because without that goto, we fall out of the switch and never call Tcl_LogCommandInfo, which is what we constructed the cmdString for in the first place! Recent efforts to improve command tracing (TIPs 32, 79) and pending efforts to expose command tracing at the script level (TIP 62) will make it more important to get this case correctly handled.
- foundin initialized to: "obsolete: 8.4a5"
- priority initialized to: "7 High"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "Tcl_EvalObjc: huh?!"
- type initialized to: "Bug"
Ticket change [6274faab7a] (rid 92406) by dgp on 2002-03-23 12:21:13:
- title changed to: "Tcl_EvalObjv: huh?!"
Add attachment "533907.patch" [1f071ac8b9] (rid 91076) by msofer on 2002-03-24 21:59:30.
Ticket change [e9560becf8] (rid 104806) by msofer on 2002-03-24 21:59:30:
- icomment:
File Added - 19936: 533907.patch Logged In: YES user_id=148712 Indeed, it is quite obscure coding - and wrong too, as you point out. I'd propose to duplicate the small string-generation code for the sake of clarity, as implemented in the enclosed patch. Comments? Should we avoid the code duplication with a couple of "goto"?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [93fddef250] (rid 105905) by dgp on 2002-03-24 23:38:21:
- icomment:
Logged In: YES user_id=80530 I think the duplication is fine; it's small enough. If anyone does want to get rid of the duplication, then I say write a new function instead of goto. Here's a revised patch that changes only comments and formatting to keep things within 80 columns.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "533907.patch2" [25df90f59a] (rid 88239) by dgp on 2002-03-24 23:38:22.
Ticket change [cc2908dcef] (rid 95644) by dgp on 2002-03-24 23:38:22:
- icomment:
File Added - 19943: 533907.patch2
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [c08efacf5c] (rid 102423) by msofer on 2002-03-25 02:05:51:
- closedate changed to: "2002-03-24T19:05:51"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Patch committed.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"