Artifacts Associated With Ticket 3970f54c4e
Ticket change [e27779c41f] (rid 134069) by dgp on 2013-09-19 18:07:57:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
In Tcl 8.5: % apply {{} {unset foo [return 1]}} 1 In Tcl 8.6(.1): % apply {{} {unset foo [return 1]}} can't unset "foo": no such variable The compiler for [unset] is failing to preserve substitution ordering rules. - foundin initialized to: "trunk"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to: "regression in compiled [unset]"
- type initialized to: "Bug"
Ticket change [1fbe5d914b] (rid 134070) by dgp on 2013-09-19 18:44:38:
- assignee changed to: "dkf"
- icomment: "Passing to the author of TclCompileUnsetCmd()."
- login: "dgp"
- mimetype: "text/plain"
Ticket change [a858b7d030] (rid 134079) by dkf on 2013-09-19 19:10:38:
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "8"
Ticket change [945c53f308] (rid 134092) by dkf on 2013-09-19 19:41:53:
- icomment:
Yes, that was a bug. Sorted it by making the compiler stricter in what it handles, which shouldn't be a problem for most code.<p>I need to figure out a better way to handle what happens when unsetting a <i>single</i> variable with a non-literal specifying the name; that's a case which ought to work in principle, but which the current restriction stops. But in any case, current behavior is semantically correct; this doesn't block a release now.
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "7 High"
- resolution changed to: "Fixed"
- username: "dkf"
- icomment:
Ticket change [766124ecd0] (rid 134098) by dkf on 2013-09-19 22:43:18:
- closedate changed to: "2456555.44673646"
- closer changed to: "dkf"
- icomment:
Thinking about it, we can handle a <i>single</i> variable varName provided it is the first varName and either there was an option (<tt>--</tt> or <tt>-nocomplain</tt>) beforehand, or the varName provably doesn't begin with a hyphen.<p>Determining the latter in the presence of a non-constant word is messy (check if you've got a TCL_TOKEN_WORD with a leading TCL_TOKEN_TEXT whose first char is a non-hyphen) as there's now convenient function for this. Nor would there be; it's specialised!<p>Applied this version. Still passes the test case, but also compiles <tt>unset foo($bar)</tt> fine (verified by disassembly).
- login: "dkf"
- mimetype: "text/html"
- status changed to: "Closed"
- username: "dkf"
Ticket change [e2815d0c72] (rid 142531) by dgp on 2015-07-17 19:40:04:
- closedate changed to: "2457221.31949903"
- closer changed to: "dgp"
- icomment:
Postscript: The compiled [unset foo($bar)] here is leaking memory. http://core.tcl.tk/tcl/tktview/a3309d01db
- login: "dgp"
- mimetype: "text/plain"
Ticket change [ed45f7a7ec] (rid 142533) by dgp on 2015-07-17 20:30:22:
- closedate changed to: "2457221.3544269"
- icomment:
It appears that the handling of options is off as well, but that's hard to figure out because the handling is very poorly specified.
- login: "dgp"
- mimetype: "text/plain"
Ticket change [25e186766b] (rid 142534) by dgp on 2015-07-17 20:55:26:
- closedate changed to: "2457221.37183111"
- icomment:
The direct eval and the compiled [unset] do not agree on what this should mean: unset -nocomplain -- - login: "dgp"
- mimetype: "text/plain"
Ticket change [66cf4df695] (rid 142548) by dgp on 2015-07-18 05:51:42:
- closedate changed to: "2457221.74424476"
- icomment: "Now they do again."
- login: "dgp"
- mimetype: "text/plain"