Artifacts Associated With Ticket 2414858fffffffff
Ticket change [bb5cdf84bd] (rid 129473) by kennykb on 2008-12-10 21:09:31:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Consider: proc bar {} {} oo::class create foo { constructor { tailcall bar } } set x [foo new] $x does not get the name of the newly-created object. - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "kennykb"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "tailcall from constructor doesn't quite work."
- type initialized to: "Bug"
Ticket change [9703db0594] (rid 106434) by dgp on 2008-12-11 04:54:02:
- icomment:
dkfand I know what the problem is: it's running the post-constructor code before running the tailcalled stuff
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [95fb23e2ad] (rid 106238) by dkf on 2008-12-11 08:33:21:
- icomment:
Just because I know what the problem is doesn't mean (in this case) that I know how to fix it. The issue is that the constructors need to run code after all the constructors have run (to do things like ensure that the result is the name of the object). Arguably it's wrong to tailcall in constructors in the first place. But in any case I need advice. Assigning this to someone who knows more about the tailcall stuff.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [7d74478a22] (rid 97243) by dkf on 2008-12-11 08:33:22:
- assignee changed to: "msofer"
Ticket change [c5fdbbdaf7] (rid 121687) by msofer on 2009-03-22 06:46:35:
- icomment:
The solution might just be: let the constructor code run as a command through TEOV, or else (hacky) manually add a Tcl_NRAddCallback(NRCommand,NULL, ...); iPtr->numLevels++; at the spot where the tailcalls should run (ie, after pushing the post-constructor callbacks, before pushing the actual constructor callbacks). NRCommand serves as the marker for the tailcall spot. This might make the tailcalls run properly - if there is an effect of numLevels on tip 280 things, I don't know
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [f634f69b78] (rid 130252) by msofer on 2009-05-01 08:24:16:
- priority changed to: "6"
Ticket change [c0dc22a50d] (rid 102488) by msofer on 2009-05-08 09:04:41:
- assignee changed to: "dkf"
Ticket change [73a3b38e79] (rid 105071) by dkf on 2009-05-08 15:39:55:
- icomment:
Constructor can't run through TEOV; it's not a command (different signature, etc).
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [03b6122404] (rid 119870) by dkf on 2009-05-08 15:50:46:
- closedate changed to: "2009-05-08T08:50:46"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Fixed. Hack is kept in tclBasic.c with an internal function that tclOO.c calls at the right point. Test oo-2.6 checks that this issue is handled correctly.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"