Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Reopened [3418547] with revised test resolver-1.1. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | bug-3418547 |
Files: | files | file ages | folders |
SHA1: |
d43f03c9f38e300b499a0ab360de8a18 |
User & Date: | dgp 2016-07-15 15:54:37 |
Context
2016-07-15
| ||
16:17 | First really crude step toward a fix is to just completely disable the intreps of the "cmdName" Tcl_... check-in: ab91e6d681 user: dgp tags: bug-3418547 | |
15:54 | Reopened [3418547] with revised test resolver-1.1. check-in: d43f03c9f3 user: dgp tags: bug-3418547 | |
14:20 | Remove unmaintained disabled speculative code. Such things are for branches and history. check-in: dbb80e10f1 user: dgp tags: trunk | |
Changes
Changes to tests/resolver.test.
︙ | ︙ | |||
37 38 39 40 41 42 43 | # resulting CmdName Tcl_Obj with the print string "z". The CmdName Tcl_Obj # is turned into a command literal shared for a given (here: the global) # namespace. set r0 [x]; # --> The result of [x] is "Y" # 2) After having requested cmd resolution above, we can now use the # globally shared CmdName Tcl_Obj "z", now bound to cmd ::y. This is # certainly questionable, but defensible | > | > | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | # resulting CmdName Tcl_Obj with the print string "z". The CmdName Tcl_Obj # is turned into a command literal shared for a given (here: the global) # namespace. set r0 [x]; # --> The result of [x] is "Y" # 2) After having requested cmd resolution above, we can now use the # globally shared CmdName Tcl_Obj "z", now bound to cmd ::y. This is # certainly questionable, but defensible set r1 untouched catch {set r1 [z]}; # --> The result of [z] is "Y" # 3) We import from the namespace ns1 another z. [namespace import] takes # care "shadowed" cmd references, however, till now cmd literals have not # been touched. This is, however, necessary since the BC compiler (used in # the [namespace eval]) seems to be eager to reuse CmdName Tcl_Objs as cmd # literals for a given NS scope. We expect, that r2 is "Z", the result of # the namespace imported cmd. namespace eval :: { namespace import ::ns1::z set r2 [z] } set r3 [x] list $r0 $r1 $::r2 $r3 } -cleanup { testinterpresolver down rename ::x "" rename ::y "" namespace delete ::ns1 } -result {Y untouched Z Y} test resolver-1.2 {cmdNameObj sharing vs. cmd resolver: proc creation} -setup { testinterpresolver up proc ::y {} { return Y } proc ::x {} { z } } -constraints testinterpresolver -body { |
︙ | ︙ |