Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-11-17
22:11 • Closed ticket [1833522fff]: Compiled info exists does not trigger array read t... artifact: c9e75bc5c4 user: das
22:11 • Add attachment 1833522.diff to ticket [1833522fff] artifact: bc1f2ef216 user: das
16:11 • Ticket [1833522fff] Compiled info exists does not trigger array read traces</i... artifact: 2e5032414f user: das
15:13 • Ticket [1833522fff]: 4 changes artifact: e8474b489f user: das
04:14 • New ticket [1833522fff]. artifact: c5472f36a0 user: das

Compiled [info exists] does not trigger array read traces

Closed / Fixed1833522fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2007-11-17 04:14:38
The new compiled [info exists] does not trigger read traces on arrays.
In particular, this breaks constraint testing in tcltest via the SafeFetch read trace on the testConstraints array...

array set a {}
trace variable a r {apply {{a k o} {puts stderr "readtrace $a $k $o"}}}
if {1} { puts stderr "compiled: [info exists a(x)]" }
puts stderr "uncompiled: [info exists a(x)]"
dasplain2007-11-17 15:13:29
File Added - 254700: 1833522.diff

Logged In: YES 
user_id=90580
Originator: YES

the attached patch fixes the problem (following TclVarTraceExists() implementation)
File Added: 1833522.diff
dasplain2007-11-17 16:11:43
File Deleted - 254700: 



File Added - 254704: 1833522.diff

Logged In: YES 
user_id=90580
Originator: YES

revised patch attached, missed one case earlier
File Added: 1833522.diff
dasplain2007-11-17 22:11:40
File Deleted - 254704: 



File Added - 254729: 1833522.diff

Logged In: YES 
user_id=90580
Originator: YES

read trace handling for INST_EXIST_SCALAR was also incorrect, revised patch attached. Also replaces var value.objPtr NULL checks by TclIsVarUndefined() macro.

With this, Tcl and Tk testsuites pass again with no bogus constraint skipping, so committing to HEAD.

File Added: 1833522.diff
Log in (anonymous is fine) to add a comment.

Attachments: