Overview
| Artifact ID: | 3aaa8bc65e693d1592d06e7b478d1787aac84fb6 |
|---|---|
| Ticket: | 231259ffffffffffffffffffffffffffffffffff
shadowing byte-compiled commands |
| User & Date: | msofer on 2001-11-29 21:42:49 |
Changes
- closedate changed to: "2001-11-29T14:42:49"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 A simpler example (will go into the tests) is: namespace eval test {variable b 0} proc test::a {i} { variable b proc set args {return "New proc is called"} return [set b $i] } list [test::a 1] [test::a 2] $test::b The correct output is 1 {New proc is called} 1 and the output without the patch is 1 2 2 Explanation: - at the first run of test::a [::set] is called as it was compiled into the proc body. We cannot see the effects of a redefinition of a bcc'ed command from within the bytecode that did the redefinition, as it will run to the end once it starts executing. - at successive runs, the shadowed command is detected and a recompilation is forced: the new definition is used. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"