Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e72067c1b80094a7f208327c8d05260caef2701f
Ticket: 3477581fffffffffffffffffffffffffffffffff
Read trace in bc lappend different to eval lappend
User & Date: mbecroft on 2012-01-23 01:05:52
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    In tcl8.6b2 and fossil trunk as of today:
    
    Problem behaviour:
    
    'lappend' and 'eval lappend' behave differently when a variable has a read trace. Byte compiled lappend does not trigger the read trace, but eval'd lappend does trigger it:
    
    % apply {{} {set foo {} ; trace add variable foo read {apply {{name1 name2 op} {upvar $name1 var ; set var 1}}} ; lappend foo 2}}
    2
    % apply {{} {set foo {} ; trace add variable foo read {apply {{name1 name2 op} {upvar $name1 var ; set var 1}}} ; eval lappend foo 2}}
    1 2
    
    Expected behaviour:
    
    both commands have the same effect.
    
    
  4. foundin changed to: "obsolete: 8.6b2"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "mbecroft"
  10. subsystem changed to: "46. Traces"
  11. title changed to: "Read trace in bc lappend different to eval lappend"
  12. type changed to: "Bug"