Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-11-13
11:18 • Closed ticket [1577492fff]: reflect ensemble rewrites on error messages plus... artifact: 266e3fedb5 user: serhiy.storchaka
2007-09-09
06:08 • Ticket [1577492fff]: 5 changes artifact: e55bc7a3db user: msofer
2006-10-31
17:29 • Open ticket [1577492fff]. artifact: 0fad3fa25b user: msofer
2006-10-25
06:13 • Closed ticket [1577492fff]. artifact: fa6ec6cba2 user: msofer
2006-10-24
07:36 • Open ticket [1577492fff]. artifact: 0b8244cc6a user: msofer
05:50 • Closed ticket [1577492fff]. artifact: 074fd83d13 user: msofer
2006-10-17
08:08 • Ticket [1577492fff]: 4 changes artifact: f1fd1a4c71 user: msofer
2006-10-16
01:54 • Ticket [1577492fff]: 4 changes artifact: 6abfc35f8a user: msofer
01:23 • Ticket [1577492fff]: 4 changes artifact: f0d98658fa user: dgp
2006-10-15
21:21 • Ticket [1577492fff]: 4 changes artifact: f52a77a9f9 user: msofer
19:26 • Ticket [1577492fff]: 4 changes artifact: 5f40350b9c user: msofer
10:24 • Ticket [1577492fff]: 4 changes artifact: bebb46b77a user: dgp
10:02 • Add attachment infolevel.patch to ticket [1577492fff] artifact: 7f6fa2e75a user: msofer
10:02 • Ticket [1577492fff] let info level know ensemble rewrites status still Ope... artifact: 51f56df94d user: msofer
03:02 • New ticket [1577492fff]. artifact: df13bb63ef user: msofer

reflect ensemble rewrites on error messages

Closed / Fixed1577492fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 days ago
Descriptionplain2006-10-15 03:02:05
Attached a patch that, while not touching [info level]
itself, makes it aware of rewrites: the (objc,objv)
fields in each CallFrame are not rewritten during
ensemble calls. 

If the patch in [Bug 1574835] is accepted, it should be
modified accordingly so that [interp alias] benefits
from this too.
msoferplain2006-10-15 10:02:05
File Added - 198222: infolevel.patch
dgpplain2006-10-15 10:24:31
Logged In: YES 
user_id=80530


Be careful here.  As the
attempt to fix 1400572
demonstrated, Itcl is 
sensitive in mysterious
ways to what gets stored
in those objc, objv fields.
May even be storing things
there itself?
msoferplain2006-10-15 19:26:41
Logged In: YES 
user_id=148712

Remark that this patch does not really touch (objc, objv)
any more than HEAD. Quite the contrary: it avoids touching
it for ensemble calls. The fix for itcl or any other weirdo
wanting to store things in there itself is to store them
*after* pushing the stack frame. Note also: as the core uses
TclPushStackFrame and itcl Tcl_PushCallFrame on frames it
allocates itself (bwerk!), it is easy to make this patch
only touch (objc, objv) on frames pushed on the stack: itcl
should never see it. I think ... except if itcl wants to
determine what non-itcl call frames do too?
msoferplain2006-10-15 21:21:21
Logged In: YES 
user_id=148712

Just checked: this patch has no effect on the itcl
testsuite. It causes the same 4 testsuite errors and a
seggie as HEAD.
dgpplain2006-10-16 01:23:01
Logged In: YES 
user_id=80530


I'm pretty sure the
1400572 fix caused no
Itcl test suite failures
either.  Still caused
enough trouble with existing
Itcl code that it had to go.
msoferplain2006-10-16 01:54:23
Logged In: YES 
user_id=148712

This has essentially the same behaviour as 1400572, which is
already in HEAD. If we choose to go back to 8.4 behaviour,
with [namespace inscope] having an empty [info level], that
can be done easily here too: the caller of Tcl_PushCallFrame
can rewrite those fields afterwards anyway - they are just
being initialised differently than they were before.

IOW, 1400572 breakage would be fixed in this patch by just
adding 'iPtr->objc=0;' in [namespace inscope]'s code, should
we choose to allow it to have an empty [info level].
msoferplain2006-10-17 08:08:50
Logged In: YES 
user_id=148712

Interesting side effect of this on toy oo systems based on
ensembles (neo, eos): there is now no need to
rewrite/reorder the cmd line. The name of the "object" (the
calling ensemble) can be retrieved with
   set self [lindex [info level 0] 0]
msoferplain2006-10-24 05:50:43
Logged In: YES 
user_id=148712

The commit also fixed clock::format and clock::scan wrong #
args messages, and their tests.
msoferplain2006-10-24 07:36:40
Logged In: YES 
user_id=148712

Add tests! Also specific for ensembles and aliases.
msoferplain2006-10-25 06:13:14
Logged In: YES 
user_id=148712

Added info-9.11-12
msoferplain2006-10-31 17:29:20
Logged In: YES 
user_id=148712

This has led to breaking a relatively common idiom, used a
lot in tcclib's struct an in Tkcon ([Bug 1587618 ]
"important use of [info level 0] broken").

ISTM that breaking a common idiom that has no simple
workaround is a relatively severe bug, and nicer error
messages more like a WIBNI.

Reverting the commit and reopening this FR with a new title.
msoferplain2007-09-09 06:08:40
data_type - 360894
serhiy.storchakawiki2026-11-13 11:18:43

Since Tcl 8.5.0 the wrong # args message of a procedure called through an ensemble or an alias shows the command as it was called (should be "e sub a"), while info level 0 still gives the rewritten command as restored for [1587618].

Log in (anonymous is fine) to add a comment.

Attachments: