Overview
| Artifact ID: | 442b482f473d052adaba5ff381082c87a9f56b5c1c5ff46f5851d52dd7ca7947 |
|---|---|
| Ticket: | 27520c9b17116d8d34c1874e4e9ec9d350ad579e
try/finally bytecode optimizer incorrect order of operations |
| User & Date: | andy on 2022-04-21 21:30:47 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
There appears to be a problem with the bytecode optimizer for [try]. If the argument after "finally" contains substitutions, they are not evaluated until it actually comes time to execute the "finally" block. Consider: try {puts a} finally [puts b] This should print "b a" (newline in between) because the [puts b] needs to be evaluated in the process of assembling the command line, before even executing it. However, it prints "a b" instead. If the command line is instead written: {*}[list] try {puts a} finally [puts b] it prints "b a" as expected. This is because the bizarre invocation of [list] bypasses the bytecode optimizer, allowing the normal Tcl order of operations to prevail. - foundin changed to: "8.6.12"
- is_private changed to: "0"
- login: "andy"
- priority changed to: "5 Medium"
- private_contact changed to: "662c23482b0bf6a505f39e48fb7ad43af8dee4d3"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "andy"
- subsystem changed to: "47. Bytecode Compiler"
- title changed to:
try/finally bytecode optimizer incorrect order of operations
- type changed to: "Bug"