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:
- 1833522.diff [download] added by das on 2007-11-17 22:11:40. [details]