Attachment "iframe-tcl85.diff" to
ticket [3081184fff]
added by
andreas_kupries
2010-10-06 03:45:58.
0000: 2d 2d 2d 20 74 63 6c 38 35 2e 6f 72 69 67 2f 64 --- tcl85.orig/d
0010: 6f 63 2f 69 6e 74 65 72 70 2e 6e 09 32 30 30 38 oc/interp.n.2008
0020: 2d 30 36 2d 32 34 20 31 30 3a 32 36 3a 30 38 2e -06-24 10:26:08.
0030: 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 0a 000000000 -0700.
0040: 2b 2b 2b 20 74 63 6c 38 35 2f 64 6f 63 2f 69 6e +++ tcl85/doc/in
0050: 74 65 72 70 2e 6e 09 32 30 31 30 2d 31 30 2d 30 terp.n.2010-10-0
0060: 34 20 31 34 3a 31 39 3a 30 37 2e 30 30 30 30 30 4 14:19:07.00000
0070: 30 30 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 31 0000 -0700.@@ -1
0080: 36 38 2c 36 20 2b 31 36 38 2c 31 37 20 40 40 0a 68,6 +168,17 @@.
0090: 20 54 68 65 20 69 6e 69 74 69 61 6c 20 72 65 63 The initial rec
00a0: 75 72 73 69 6f 6e 20 6c 69 6d 69 74 20 6f 66 20 ursion limit of
00b0: 74 68 65 20 73 6c 61 76 65 20 69 6e 74 65 72 70 the slave interp
00c0: 72 65 74 65 72 20 69 73 20 73 65 74 20 74 6f 20 reter is set to
00d0: 74 68 65 0a 20 63 75 72 72 65 6e 74 20 72 65 63 the. current rec
00e0: 75 72 73 69 6f 6e 20 6c 69 6d 69 74 20 6f 66 20 ursion limit of
00f0: 69 74 73 20 70 61 72 65 6e 74 20 69 6e 74 65 72 its parent inter
0100: 70 72 65 74 65 72 2e 0a 20 2e 54 50 0a 2b 5c 66 preter.. .TP.+\f
0110: 42 69 6e 74 65 72 70 5c 66 52 20 5c 66 42 64 65 Binterp\fR \fBde
0120: 62 75 67 20 5c 66 49 70 61 74 68 5c 66 52 20 3f bug \fIpath\fR ?
0130: 5c 66 49 5c 2d 66 72 61 6d 65 5c 66 52 20 3f 5c \fI\-frame\fR ?\
0140: 66 49 62 6f 6f 6c 5c 66 52 3f 3f 0a 2b 2e 0a 2b fIbool\fR??.+..+
0150: 43 6f 6e 74 72 6f 6c 73 20 77 68 65 74 68 65 72 Controls whether
0160: 20 66 72 61 6d 65 2d 6c 65 76 65 6c 20 73 74 61 frame-level sta
0170: 63 6b 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 ck information i
0180: 73 20 63 61 70 74 75 72 65 64 20 69 6e 20 74 68 s captured in th
0190: 65 0a 2b 73 6c 61 76 65 20 69 6e 74 65 72 70 72 e.+slave interpr
01a0: 65 74 65 72 20 69 64 65 6e 74 69 66 69 65 64 20 eter identified
01b0: 62 79 20 5c 66 49 70 61 74 68 5c 66 52 2e 20 20 by \fIpath\fR.
01c0: 49 66 20 6e 6f 20 61 72 67 75 6d 65 6e 74 73 20 If no arguments
01d0: 61 72 65 0a 2b 67 69 76 65 6e 2c 20 6f 70 74 69 are.+given, opti
01e0: 6f 6e 20 61 6e 64 20 63 75 72 72 65 6e 74 20 73 on and current s
01f0: 65 74 74 69 6e 67 20 61 72 65 20 72 65 74 75 72 etting are retur
0200: 6e 65 64 2e 20 20 49 66 20 5c 66 49 5c 2d 66 72 ned. If \fI\-fr
0210: 61 6d 65 5c 66 52 0a 2b 69 73 20 67 69 76 65 6e ame\fR.+is given
0220: 2c 20 74 68 65 20 64 65 62 75 67 20 73 65 74 74 , the debug sett
0230: 69 6e 67 20 69 73 20 73 65 74 20 74 6f 20 74 68 ing is set to th
0240: 65 20 67 69 76 65 6e 20 62 6f 6f 6c 65 61 6e 20 e given boolean
0250: 69 66 20 70 72 6f 76 69 64 65 64 0a 2b 61 6e 64 if provided.+and
0260: 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 74 the current set
0270: 74 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 ting is returned
0280: 2e 0a 2b 54 68 69 73 20 6f 6e 6c 79 20 65 66 66 ..+This only eff
0290: 65 63 74 73 20 74 68 65 20 6f 75 74 70 75 74 20 ects the output
02a0: 6f 66 20 5c 66 42 69 6e 66 6f 20 66 72 61 6d 65 of \fBinfo frame
02b0: 5c 66 52 2c 20 69 6e 20 74 68 61 74 20 65 78 61 \fR, in that exa
02c0: 63 74 0a 2b 66 72 61 6d 65 2d 6c 65 76 65 6c 20 ct.+frame-level
02d0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 6f 72 20 information for
02e0: 63 6f 6d 6d 61 6e 64 20 69 6e 76 6f 63 61 74 69 command invocati
02f0: 6f 6e 20 61 74 20 74 68 65 20 62 79 74 65 63 6f on at the byteco
0300: 64 65 20 6c 65 76 65 6c 0a 2b 69 73 20 6f 6e 6c de level.+is onl
0310: 79 20 63 61 70 74 75 72 65 64 20 77 69 74 68 20 y captured with
0320: 74 68 69 73 20 73 65 74 74 69 6e 67 20 6f 6e 2e this setting on.
0330: 0a 2b 2e 54 50 0a 20 5c 66 42 69 6e 74 65 72 70 .+.TP. \fBinterp
0340: 5c 66 52 20 5c 66 42 64 65 6c 65 74 65 20 5c 66 \fR \fBdelete \f
0350: 52 3f 5c 66 49 70 61 74 68 20 2e 2e 2e 3f 5c 66 R?\fIpath ...?\f
0360: 52 0a 20 44 65 6c 65 74 65 73 20 7a 65 72 6f 20 R. Deletes zero
0370: 6f 72 20 6d 6f 72 65 20 69 6e 74 65 72 70 72 65 or more interpre
0380: 74 65 72 73 20 67 69 76 65 6e 20 62 79 20 74 68 ters given by th
0390: 65 20 6f 70 74 69 6f 6e 61 6c 20 5c 66 49 70 61 e optional \fIpa
03a0: 74 68 5c 66 52 0a 20 61 72 67 75 6d 65 6e 74 73 th\fR. arguments
03b0: 2c 20 61 6e 64 20 66 6f 72 20 65 61 63 68 20 69 , and for each i
03c0: 6e 74 65 72 70 72 65 74 65 72 2c 20 69 74 20 61 nterpreter, it a
03d0: 6c 73 6f 20 64 65 6c 65 74 65 73 20 69 74 73 20 lso deletes its
03e0: 73 6c 61 76 65 73 2e 20 54 68 65 0a 2d 2d 2d 20 slaves. The.---
03f0: 74 63 6c 38 35 2e 6f 72 69 67 2f 64 6f 63 2f 74 tcl85.orig/doc/t
0400: 63 6c 76 61 72 73 2e 6e 09 32 30 30 38 2d 30 36 clvars.n.2008-06
0410: 2d 32 34 20 31 30 3a 32 36 3a 30 37 2e 30 30 30 -24 10:26:07.000
0420: 30 30 30 30 30 30 20 2d 30 37 30 30 0a 2b 2b 2b 000000 -0700.+++
0430: 20 74 63 6c 38 35 2f 64 6f 63 2f 74 63 6c 76 61 tcl85/doc/tclva
0440: 72 73 2e 6e 09 32 30 31 30 2d 31 30 2d 30 35 20 rs.n.2010-10-05
0450: 31 33 3a 33 37 3a 31 34 2e 30 30 30 30 30 30 30 13:37:14.0000000
0460: 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 34 39 2c 00 -0700.@@ -49,
0470: 36 20 2b 34 39 2c 34 33 20 40 40 0a 20 73 61 6d 6 +49,43 @@. sam
0480: 65 20 61 73 20 75 6e 73 65 74 74 69 6e 67 20 69 e as unsetting i
0490: 74 20 61 73 20 74 68 69 73 20 69 73 20 74 68 65 t as this is the
04a0: 20 62 65 68 61 76 69 6f 72 20 6f 66 20 74 68 65 behavior of the
04b0: 20 75 6e 64 65 72 6c 79 69 6e 67 20 57 69 6e 64 underlying Wind
04c0: 6f 77 73 20 4f 53 2e 0a 20 49 74 20 73 68 6f 75 ows OS.. It shou
04d0: 6c 64 20 62 65 20 6e 6f 74 65 64 20 74 68 61 74 ld be noted that
04e0: 20 72 65 6c 79 69 6e 67 20 6f 6e 20 61 6e 20 65 relying on an e
04f0: 78 69 73 74 69 6e 67 20 61 6e 64 20 65 6d 70 74 xisting and empt
0500: 79 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 y environment va
0510: 72 69 61 62 6c 65 0a 20 77 69 6c 6c 20 6e 6f 74 riable. will not
0520: 20 77 6f 72 6b 20 6f 6e 20 57 69 6e 64 6f 77 73 work on Windows
0530: 20 61 6e 64 20 69 73 20 64 69 73 63 6f 75 72 61 and is discoura
0540: 67 65 64 20 66 6f 72 20 63 72 6f 73 73 2d 70 6c ged for cross-pl
0550: 61 74 66 6f 72 6d 20 75 73 61 67 65 2e 0a 2b 2e atform usage..+.
0560: 50 50 0a 2b 54 68 65 20 66 6f 6c 6c 6f 77 69 6e PP.+The followin
0570: 67 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 5c 66 g elements of \f
0580: 42 65 6e 76 5c 66 52 20 61 72 65 20 73 70 65 63 Benv\fR are spec
0590: 69 61 6c 20 74 6f 20 54 63 6c 3a 0a 2b 2e 54 50 ial to Tcl:.+.TP
05a0: 0a 2b 5c 66 42 65 6e 76 28 48 4f 4d 45 29 5c 66 .+\fBenv(HOME)\f
05b0: 52 0a 2b 2e 0a 2b 54 68 69 73 20 65 6e 76 69 72 R.+..+This envir
05c0: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2c onment variable,
05d0: 20 69 66 20 73 65 74 2c 20 67 69 76 65 73 20 74 if set, gives t
05e0: 68 65 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 74 he location of t
05f0: 68 65 20 64 69 72 65 63 74 6f 72 79 0a 2b 63 6f he directory.+co
0600: 6e 73 69 64 65 72 65 64 20 74 6f 20 62 65 20 74 nsidered to be t
0610: 68 65 20 63 75 72 72 65 6e 74 20 75 73 65 72 27 he current user'
0620: 73 20 68 6f 6d 65 20 64 69 72 65 63 74 6f 72 79 s home directory
0630: 2c 20 61 6e 64 20 74 6f 20 77 68 69 63 68 20 61 , and to which a
0640: 0a 2b 63 61 6c 6c 20 6f 66 20 5c 66 42 63 64 5c .+call of \fBcd\
0650: 66 52 20 77 69 74 68 6f 75 74 20 61 72 67 75 6d fR without argum
0660: 65 6e 74 73 20 6f 72 20 77 69 74 68 20 6a 75 73 ents or with jus
0670: 74 0a 2b 2e 51 57 20 7e 0a 2b 61 73 20 61 6e 20 t.+.QW ~.+as an
0680: 61 72 67 75 6d 65 6e 74 20 77 69 6c 6c 20 63 68 argument will ch
0690: 61 6e 67 65 20 69 6e 74 6f 2e 20 4d 6f 73 74 20 ange into. Most
06a0: 70 6c 61 74 66 6f 72 6d 73 20 73 65 74 20 74 68 platforms set th
06b0: 69 73 20 63 6f 72 72 65 63 74 6c 79 20 62 79 0a is correctly by.
06c0: 2b 64 65 66 61 75 6c 74 3b 20 69 74 20 64 6f 65 +default; it doe
06d0: 73 20 6e 6f 74 20 6e 6f 72 6d 61 6c 6c 79 20 6e s not normally n
06e0: 65 65 64 20 74 6f 20 62 65 20 73 65 74 20 62 79 eed to be set by
06f0: 20 75 73 65 72 20 63 6f 64 65 2e 0a 2b 2e 54 50 user code..+.TP
0700: 0a 2b 5c 66 42 65 6e 76 28 54 43 4c 5f 4c 49 42 .+\fBenv(TCL_LIB
0710: 52 41 52 59 29 5c 66 52 0a 2b 2e 0a 2b 49 66 20 RARY)\fR.+..+If
0720: 73 65 74 2c 20 74 68 65 6e 20 69 74 20 73 70 65 set, then it spe
0730: 63 69 66 69 65 73 20 74 68 65 20 6c 6f 63 61 74 cifies the locat
0740: 69 6f 6e 20 6f 66 20 74 68 65 20 64 69 72 65 63 ion of the direc
0750: 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 0a tory containing.
0760: 2b 6c 69 62 72 61 72 79 20 73 63 72 69 70 74 73 +library scripts
0770: 20 28 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 (the value of t
0780: 68 69 73 20 76 61 72 69 61 62 6c 65 20 77 69 6c his variable wil
0790: 6c 20 62 65 0a 2b 61 73 73 69 67 6e 65 64 20 74 l be.+assigned t
07a0: 6f 20 74 68 65 20 5c 66 42 74 63 6c 5f 6c 69 62 o the \fBtcl_lib
07b0: 72 61 72 79 5c 66 52 20 76 61 72 69 61 62 6c 65 rary\fR variable
07c0: 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 72 and therefore r
07d0: 65 74 75 72 6e 65 64 20 62 79 0a 2b 74 68 65 20 eturned by.+the
07e0: 63 6f 6d 6d 61 6e 64 20 5c 66 42 69 6e 66 6f 20 command \fBinfo
07f0: 6c 69 62 72 61 72 79 5c 66 52 29 2e 20 20 49 66 library\fR). If
0800: 20 74 68 69 73 20 76 61 72 69 61 62 6c 65 20 69 this variable i
0810: 73 20 6e 6f 74 20 73 65 74 20 74 68 65 6e 0a 2b s not set then.+
0820: 61 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 a default value
0830: 69 73 20 75 73 65 64 2e 0a 2b 2e 52 53 0a 2b 2e is used..+.RS.+.
0840: 50 50 0a 2b 4e 6f 74 65 20 74 68 61 74 20 74 68 PP.+Note that th
0850: 69 73 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 is environment v
0860: 61 72 69 61 62 6c 65 20 73 68 6f 75 6c 64 20 5c ariable should \
0870: 66 49 6e 6f 74 5c 66 52 20 6e 6f 72 6d 61 6c 6c fInot\fR normall
0880: 79 20 62 65 20 73 65 74 2e 0a 2b 2e 52 45 0a 2b y be set..+.RE.+
0890: 2e 54 50 0a 2b 5c 66 42 65 6e 76 28 54 43 4c 4c .TP.+\fBenv(TCLL
08a0: 49 42 50 41 54 48 29 5c 66 52 0a 2b 2e 0a 2b 49 IBPATH)\fR.+..+I
08b0: 66 20 73 65 74 2c 20 74 68 65 6e 20 69 74 20 6d f set, then it m
08c0: 75 73 74 20 63 6f 6e 74 61 69 6e 20 61 20 76 61 ust contain a va
08d0: 6c 69 64 20 54 63 6c 20 6c 69 73 74 20 67 69 76 lid Tcl list giv
08e0: 69 6e 67 20 64 69 72 65 63 74 6f 72 69 65 73 20 ing directories
08f0: 74 6f 0a 2b 73 65 61 72 63 68 20 64 75 72 69 6e to.+search durin
0900: 67 20 61 75 74 6f 2d 6c 6f 61 64 20 6f 70 65 72 g auto-load oper
0910: 61 74 69 6f 6e 73 2e 20 20 44 69 72 65 63 74 6f ations. Directo
0920: 72 69 65 73 20 6d 75 73 74 20 62 65 20 73 70 65 ries must be spe
0930: 63 69 66 69 65 64 20 69 6e 20 0a 2b 54 63 6c 20 cified in .+Tcl
0940: 66 6f 72 6d 61 74 2c 20 75 73 69 6e 67 0a 2b 2e format, using.+.
0950: 51 57 20 2f 0a 2b 61 73 20 74 68 65 20 70 61 74 QW /.+as the pat
0960: 68 20 73 65 70 61 72 61 74 6f 72 2c 20 72 65 67 h separator, reg
0970: 61 72 64 6c 65 73 73 20 6f 66 20 70 6c 61 74 66 ardless of platf
0980: 6f 72 6d 2e 0a 2b 54 68 69 73 20 76 61 72 69 61 orm..+This varia
0990: 62 6c 65 20 69 73 20 6f 6e 6c 79 20 75 73 65 64 ble is only used
09a0: 20 77 68 65 6e 20 69 6e 69 74 69 61 6c 69 7a 69 when initializi
09b0: 6e 67 20 74 68 65 20 5c 66 42 61 75 74 6f 5f 70 ng the \fBauto_p
09c0: 61 74 68 5c 66 52 20 76 61 72 69 61 62 6c 65 2e ath\fR variable.
09d0: 0a 2b 2e 54 50 0a 2b 5c 66 42 65 6e 76 28 54 43 .+.TP.+\fBenv(TC
09e0: 4c 5f 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 L_INTERP_DEBUG_F
09f0: 52 41 4d 45 29 5c 66 52 0a 2b 2e 0a 2b 49 66 20 RAME)\fR.+..+If
0a00: 65 78 69 73 74 69 6e 67 2c 20 69 74 20 68 61 73 existing, it has
0a10: 20 74 68 65 20 73 61 6d 65 20 65 66 66 65 63 74 the same effect
0a20: 20 61 73 20 72 75 6e 6e 69 6e 67 20 5c 66 42 69 as running \fBi
0a30: 6e 74 65 72 70 20 64 65 62 75 67 20 7b 7d 20 2d nterp debug {} -
0a40: 66 72 61 6d 65 20 31 5c 66 52 0a 2b 61 73 20 74 frame 1\fR.+as t
0a50: 68 65 20 76 65 72 79 20 66 69 72 73 74 20 63 6f he very first co
0a60: 6d 6d 61 6e 64 20 6f 66 20 65 61 63 68 20 6e 65 mmand of each ne
0a70: 77 20 54 63 6c 20 69 6e 74 65 72 70 72 65 74 65 w Tcl interprete
0a80: 72 2e 0a 20 2e 52 45 0a 20 2e 54 50 0a 20 5c 66 r.. .RE. .TP. \f
0a90: 42 65 72 72 6f 72 43 6f 64 65 5c 66 52 0a 2d 2d BerrorCode\fR.--
0aa0: 2d 20 74 63 6c 38 35 2e 6f 72 69 67 2f 67 65 6e - tcl85.orig/gen
0ab0: 65 72 69 63 2f 74 63 6c 42 61 73 69 63 2e 63 09 eric/tclBasic.c.
0ac0: 32 30 31 30 2d 30 38 2d 30 33 20 30 39 3a 31 34 2010-08-03 09:14
0ad0: 3a 35 38 2e 30 30 30 30 30 30 30 30 30 20 2d 30 :58.000000000 -0
0ae0: 37 30 30 0a 2b 2b 2b 20 74 63 6c 38 35 2f 67 65 700.+++ tcl85/ge
0af0: 6e 65 72 69 63 2f 74 63 6c 42 61 73 69 63 2e 63 neric/tclBasic.c
0b00: 09 32 30 31 30 2d 31 30 2d 30 35 20 31 33 3a 32 .2010-10-05 13:2
0b10: 37 3a 30 33 2e 30 30 30 30 30 30 30 30 30 20 2d 7:03.000000000 -
0b20: 30 37 30 30 0a 40 40 20 2d 35 30 31 2c 36 20 2b 0700.@@ -501,6 +
0b30: 35 30 31 2c 31 35 20 40 40 0a 20 20 20 20 20 69 501,15 @@. i
0b40: 50 74 72 2d 3e 72 65 73 75 6c 74 53 70 61 63 65 Ptr->resultSpace
0b50: 5b 30 5d 20 3d 20 30 3b 0a 20 20 20 20 20 69 50 [0] = 0;. iP
0b60: 74 72 2d 3e 74 68 72 65 61 64 49 64 20 3d 20 54 tr->threadId = T
0b70: 63 6c 5f 47 65 74 43 75 72 72 65 6e 74 54 68 72 cl_GetCurrentThr
0b80: 65 61 64 28 29 3b 0a 20 0a 2b 20 20 20 20 2f 2a ead();. .+ /*
0b90: 20 54 49 50 20 23 33 37 38 20 2a 2f 0a 2b 23 69 TIP #378 */.+#i
0ba0: 66 64 65 66 20 54 43 4c 5f 49 4e 54 45 52 50 5f fdef TCL_INTERP_
0bb0: 44 45 42 55 47 5f 46 52 41 4d 45 0a 2b 20 20 20 DEBUG_FRAME.+
0bc0: 20 69 50 74 72 2d 3e 66 6c 61 67 73 20 7c 3d 20 iPtr->flags |=
0bd0: 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 INTERP_DEBUG_FRA
0be0: 4d 45 3b 0a 2b 23 65 6c 73 65 0a 2b 20 20 20 20 ME;.+#else.+
0bf0: 69 66 20 28 67 65 74 65 6e 76 28 22 54 43 4c 5f if (getenv("TCL_
0c00: 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 INTERP_DEBUG_FRA
0c10: 4d 45 22 29 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a ME") != NULL) {.
0c20: 2b 20 20 20 20 20 20 20 20 69 50 74 72 2d 3e 66 + iPtr->f
0c30: 6c 61 67 73 20 7c 3d 20 49 4e 54 45 52 50 5f 44 lags |= INTERP_D
0c40: 45 42 55 47 5f 46 52 41 4d 45 3b 0a 2b 20 20 20 EBUG_FRAME;.+
0c50: 20 7d 0a 2b 23 65 6e 64 69 66 0a 2b 0a 20 20 20 }.+#endif.+.
0c60: 20 20 2f 2a 0a 20 20 20 20 20 20 2a 20 49 6e 69 /*. * Ini
0c70: 74 69 61 6c 69 73 65 20 74 68 65 20 74 61 62 6c tialise the tabl
0c80: 65 73 20 66 6f 72 20 76 61 72 69 61 62 6c 65 20 es for variable
0c90: 74 72 61 63 65 73 20 61 6e 64 20 73 65 61 72 63 traces and searc
0ca0: 68 65 73 20 2a 62 65 66 6f 72 65 2a 0a 20 20 20 hes *before*.
0cb0: 20 20 20 2a 20 63 72 65 61 74 69 6e 67 20 74 68 * creating th
0cc0: 65 20 67 6c 6f 62 61 6c 20 6e 73 20 2d 20 73 6f e global ns - so
0cd0: 20 74 68 61 74 20 74 68 65 20 74 72 61 63 65 20 that the trace
0ce0: 6f 6e 20 65 72 72 6f 72 49 6e 66 6f 20 63 61 6e on errorInfo can
0cf0: 20 62 65 0a 40 40 20 2d 33 34 34 32 2c 37 20 2b be.@@ -3442,7 +
0d00: 33 34 35 31 2c 39 20 40 40 0a 20 54 63 6c 49 6e 3451,9 @@. TclIn
0d10: 74 65 72 70 52 65 61 64 79 28 0a 20 20 20 20 20 terpReady(.
0d20: 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 Tcl_Interp *inte
0d30: 72 70 29 0a 20 7b 0a 2b 23 69 66 20 21 64 65 66 rp). {.+#if !def
0d40: 69 6e 65 64 28 54 43 4c 5f 4e 4f 5f 53 54 41 43 ined(TCL_NO_STAC
0d50: 4b 5f 43 48 45 43 4b 29 0a 20 20 20 20 20 69 6e K_CHECK). in
0d60: 74 20 6c 6f 63 61 6c 49 6e 74 3b 20 2f 2a 20 75 t localInt; /* u
0d70: 73 65 64 20 66 6f 72 20 63 68 65 63 6b 69 6e 67 sed for checking
0d80: 20 74 68 65 20 73 74 61 63 6b 20 2a 2f 0a 2b 23 the stack */.+#
0d90: 65 6e 64 69 66 0a 20 20 20 20 20 72 65 67 69 73 endif. regis
0da0: 74 65 72 20 49 6e 74 65 72 70 20 2a 69 50 74 72 ter Interp *iPtr
0db0: 20 3d 20 28 49 6e 74 65 72 70 20 2a 29 20 69 6e = (Interp *) in
0dc0: 74 65 72 70 3b 0a 20 0a 20 20 20 20 20 2f 2a 0a terp;. . /*.
0dd0: 2d 2d 2d 20 74 63 6c 38 35 2e 6f 72 69 67 2f 67 --- tcl85.orig/g
0de0: 65 6e 65 72 69 63 2f 74 63 6c 45 78 65 63 75 74 eneric/tclExecut
0df0: 65 2e 63 09 32 30 31 30 2d 31 30 2d 30 34 20 31 e.c.2010-10-04 1
0e00: 35 3a 34 39 3a 31 32 2e 30 30 30 30 30 30 30 30 5:49:12.00000000
0e10: 30 20 2d 30 37 30 30 0a 2b 2b 2b 20 74 63 6c 38 0 -0700.+++ tcl8
0e20: 35 2f 67 65 6e 65 72 69 63 2f 74 63 6c 45 78 65 5/generic/tclExe
0e30: 63 75 74 65 2e 63 09 32 30 31 30 2d 31 30 2d 30 cute.c.2010-10-0
0e40: 34 20 31 35 3a 35 36 3a 31 38 2e 30 30 30 30 30 4 15:56:18.00000
0e50: 30 30 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 31 0000 -0700.@@ -1
0e60: 33 2c 37 20 2b 31 33 2c 37 20 40 40 0a 20 20 2a 3,7 +13,7 @@. *
0e70: 20 53 65 65 20 74 68 65 20 66 69 6c 65 20 22 6c See the file "l
0e80: 69 63 65 6e 73 65 2e 74 65 72 6d 73 22 20 66 6f icense.terms" fo
0e90: 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e r information on
0ea0: 20 75 73 61 67 65 20 61 6e 64 20 72 65 64 69 73 usage and redis
0eb0: 74 72 69 62 75 74 69 6f 6e 20 6f 66 0a 20 20 2a tribution of. *
0ec0: 20 74 68 69 73 20 66 69 6c 65 2c 20 61 6e 64 20 this file, and
0ed0: 66 6f 72 20 61 20 44 49 53 43 4c 41 49 4d 45 52 for a DISCLAIMER
0ee0: 20 4f 46 20 41 4c 4c 20 57 41 52 52 41 4e 54 49 OF ALL WARRANTI
0ef0: 45 53 2e 0a 20 20 2a 0a 2d 20 2a 20 52 43 53 3a ES.. *.- * RCS:
0f00: 20 40 28 23 29 20 24 49 64 3a 20 74 63 6c 45 78 @(#) $Id: tclEx
0f10: 65 63 75 74 65 2e 63 2c 76 20 31 2e 33 36 39 2e ecute.c,v 1.369.
0f20: 32 2e 31 37 20 32 30 31 30 2f 31 30 2f 30 34 20 2.17 2010/10/04
0f30: 30 35 3a 32 33 3a 34 37 20 68 6f 62 62 73 20 45 05:23:47 hobbs E
0f40: 78 70 20 24 0a 2b 20 2a 20 52 43 53 3a 20 40 28 xp $.+ * RCS: @(
0f50: 23 29 20 24 49 64 3a 20 74 63 6c 45 78 65 63 75 #) $Id: tclExecu
0f60: 74 65 2e 63 2c 76 20 31 2e 33 36 39 2e 32 2e 31 te.c,v 1.369.2.1
0f70: 36 20 32 30 31 30 2f 31 30 2f 30 32 20 30 30 3a 6 2010/10/02 00:
0f80: 32 39 3a 34 32 20 68 6f 62 62 73 20 45 78 70 20 29:42 hobbs Exp
0f90: 24 0a 20 20 2a 2f 0a 20 0a 20 23 69 6e 63 6c 75 $. */. . #inclu
0fa0: 64 65 20 22 74 63 6c 49 6e 74 2e 68 22 0a 40 40 de "tclInt.h".@@
0fb0: 20 2d 32 34 31 32 2c 31 34 20 2b 32 34 31 32 2c -2412,14 +2412,
0fc0: 31 38 20 40 40 0a 20 0a 20 09 20 20 20 20 62 63 18 @@. . . bc
0fd0: 46 72 61 6d 65 50 74 72 2d 3e 64 61 74 61 2e 74 FramePtr->data.t
0fe0: 65 62 63 2e 70 63 20 3d 20 28 63 68 61 72 20 2a ebc.pc = (char *
0ff0: 29 20 70 63 3b 0a 20 09 20 20 20 20 69 50 74 72 ) pc;. . iPtr
1000: 2d 3e 63 6d 64 46 72 61 6d 65 50 74 72 20 3d 20 ->cmdFramePtr =
1010: 62 63 46 72 61 6d 65 50 74 72 3b 0a 2b 09 20 20 bcFramePtr;.+.
1020: 20 20 69 66 20 28 69 50 74 72 2d 3e 66 6c 61 67 if (iPtr->flag
1030: 73 20 26 20 49 4e 54 45 52 50 5f 44 45 42 55 47 s & INTERP_DEBUG
1040: 5f 46 52 41 4d 45 29 20 7b 0a 20 09 20 20 20 20 _FRAME) {. .
1050: 54 63 6c 41 72 67 75 6d 65 6e 74 42 43 45 6e 74 TclArgumentBCEnt
1060: 65 72 28 28 54 63 6c 5f 49 6e 74 65 72 70 2a 29 er((Tcl_Interp*)
1070: 20 69 50 74 72 2c 20 6f 62 6a 76 2c 20 6f 62 6a iPtr, objv, obj
1080: 63 2c 0a 20 09 09 20 20 20 20 63 6f 64 65 50 74 c,. .. codePt
1090: 72 2c 20 62 63 46 72 61 6d 65 50 74 72 2c 20 70 r, bcFramePtr, p
10a0: 63 20 2d 20 63 6f 64 65 50 74 72 2d 3e 63 6f 64 c - codePtr->cod
10b0: 65 53 74 61 72 74 29 3b 0a 2b 09 20 20 20 20 7d eStart);.+. }
10c0: 0a 20 09 20 20 20 20 44 45 43 41 43 48 45 5f 53 . . DECACHE_S
10d0: 54 41 43 4b 5f 49 4e 46 4f 28 29 3b 0a 20 09 20 TACK_INFO();. .
10e0: 20 20 20 72 65 73 75 6c 74 20 3d 20 54 63 6c 45 result = TclE
10f0: 76 61 6c 4f 62 6a 76 49 6e 74 65 72 6e 61 6c 28 valObjvInternal(
1100: 69 6e 74 65 72 70 2c 20 6f 62 6a 63 2c 20 6f 62 interp, objc, ob
1110: 6a 76 2c 0a 20 09 09 20 20 20 20 2f 2a 20 63 61 jv,. .. /* ca
1120: 6c 6c 20 66 72 6f 6d 20 54 45 42 43 20 2a 2f 28 ll from TEBC */(
1130: 63 68 61 72 20 2a 29 20 2d 31 2c 20 2d 31 2c 20 char *) -1, -1,
1140: 30 29 3b 0a 20 09 20 20 20 20 43 41 43 48 45 5f 0);. . CACHE_
1150: 53 54 41 43 4b 5f 49 4e 46 4f 28 29 3b 0a 2b 09 STACK_INFO();.+.
1160: 20 20 20 20 69 66 20 28 69 50 74 72 2d 3e 66 6c if (iPtr->fl
1170: 61 67 73 20 26 20 49 4e 54 45 52 50 5f 44 45 42 ags & INTERP_DEB
1180: 55 47 5f 46 52 41 4d 45 29 20 7b 0a 20 09 20 20 UG_FRAME) {. .
1190: 20 20 54 63 6c 41 72 67 75 6d 65 6e 74 42 43 52 TclArgumentBCR
11a0: 65 6c 65 61 73 65 28 28 54 63 6c 5f 49 6e 74 65 elease((Tcl_Inte
11b0: 72 70 2a 29 20 69 50 74 72 2c 20 6f 62 6a 76 2c rp*) iPtr, objv,
11c0: 20 6f 62 6a 63 2c 0a 20 09 09 20 20 20 20 63 6f objc,. .. co
11d0: 64 65 50 74 72 2c 20 70 63 20 2d 20 63 6f 64 65 dePtr, pc - code
11e0: 50 74 72 2d 3e 63 6f 64 65 53 74 61 72 74 29 3b Ptr->codeStart);
11f0: 0a 2b 09 20 20 20 20 7d 0a 20 09 20 20 20 20 69 .+. }. . i
1200: 50 74 72 2d 3e 63 6d 64 46 72 61 6d 65 50 74 72 Ptr->cmdFramePtr
1210: 20 3d 20 69 50 74 72 2d 3e 63 6d 64 46 72 61 6d = iPtr->cmdFram
1220: 65 50 74 72 2d 3e 6e 65 78 74 50 74 72 3b 0a 20 ePtr->nextPtr;.
1230: 0a 20 09 20 20 20 20 69 66 20 28 72 65 73 75 6c . . if (resul
1240: 74 20 3d 3d 20 54 43 4c 5f 4f 4b 29 20 7b 0a 40 t == TCL_OK) {.@
1250: 40 20 2d 38 31 35 34 2c 37 20 2b 38 31 35 38 2c @ -8154,7 +8158,
1260: 37 20 40 40 0a 20 0a 20 20 20 20 20 54 63 6c 5f 7 @@. . Tcl_
1270: 41 70 70 65 6e 64 50 72 69 6e 74 66 54 6f 4f 62 AppendPrintfToOb
1280: 6a 28 6f 62 6a 50 74 72 2c 20 22 5c 6e 2d 2d 2d j(objPtr, "\n---
1290: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
12a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
12b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
12c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 5c 6e 22 -------------\n"
12d0: 29 3b 0a 20 20 20 20 20 54 63 6c 5f 41 70 70 65 );. Tcl_Appe
12e0: 6e 64 50 72 69 6e 74 66 54 6f 4f 62 6a 28 6f 62 ndPrintfToObj(ob
12f0: 6a 50 74 72 2c 0a 2d 09 20 20 20 20 22 43 6f 6d jPtr,.-. "Com
1300: 70 69 6c 61 74 69 6f 6e 20 61 6e 64 20 65 78 65 pilation and exe
1310: 63 75 74 69 6f 6e 20 73 74 61 74 69 73 74 69 63 cution statistic
1320: 73 20 66 6f 72 20 69 6e 74 65 72 70 72 65 74 65 s for interprete
1330: 72 20 25 23 6c 78 5c 6e 22 2c 0a 2b 09 20 20 20 r %#lx\n",.+.
1340: 20 22 43 6f 6d 70 69 6c 61 74 69 6f 6e 20 61 6e "Compilation an
1350: 64 20 65 78 65 63 75 74 69 6f 6e 20 73 74 61 74 d execution stat
1360: 69 73 74 69 63 73 20 66 6f 72 20 69 6e 74 65 72 istics for inter
1370: 70 72 65 74 65 72 20 30 78 25 70 5c 6e 22 2c 0a preter 0x%p\n",.
1380: 20 09 20 20 20 20 69 50 74 72 29 3b 0a 20 0a 20 . iPtr);. .
1390: 20 20 20 20 54 63 6c 5f 41 70 70 65 6e 64 50 72 Tcl_AppendPr
13a0: 69 6e 74 66 54 6f 4f 62 6a 28 6f 62 6a 50 74 72 intfToObj(objPtr
13b0: 2c 20 22 5c 6e 4e 75 6d 62 65 72 20 42 79 74 65 , "\nNumber Byte
13c0: 43 6f 64 65 73 20 65 78 65 63 75 74 65 64 09 25 Codes executed.%
13d0: 6c 64 5c 6e 22 2c 0a 2d 2d 2d 20 74 63 6c 38 35 ld\n",.--- tcl85
13e0: 2e 6f 72 69 67 2f 67 65 6e 65 72 69 63 2f 74 63 .orig/generic/tc
13f0: 6c 49 6e 74 65 72 70 2e 63 09 32 30 31 30 2d 30 lInterp.c.2010-0
1400: 31 2d 31 38 20 31 32 3a 32 34 3a 31 39 2e 30 30 1-18 12:24:19.00
1410: 30 30 30 30 30 30 30 20 2d 30 38 30 30 0a 2b 2b 0000000 -0800.++
1420: 2b 20 74 63 6c 38 35 2f 67 65 6e 65 72 69 63 2f + tcl85/generic/
1430: 74 63 6c 49 6e 74 65 72 70 2e 63 09 32 30 31 30 tclInterp.c.2010
1440: 2d 31 30 2d 30 35 20 31 33 3a 32 38 3a 34 36 2e -10-05 13:28:46.
1450: 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 0a 000000000 -0700.
1460: 40 40 20 2d 32 30 37 2c 36 20 2b 32 30 37 2c 39 @@ -207,6 +207,9
1470: 20 40 40 0a 20 09 09 09 20 20 20 20 54 63 6c 5f @@. ... Tcl_
1480: 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f 62 6a 76 5b Obj *const objv[
1490: 5d 29 3b 0a 20 73 74 61 74 69 63 20 54 63 6c 5f ]);. static Tcl_
14a0: 49 6e 74 65 72 70 20 2a 09 53 6c 61 76 65 43 72 Interp *.SlaveCr
14b0: 65 61 74 65 28 54 63 6c 5f 49 6e 74 65 72 70 20 eate(Tcl_Interp
14c0: 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 4f 62 6a *interp, Tcl_Obj
14d0: 20 2a 70 61 74 68 50 74 72 2c 0a 20 09 09 09 20 *pathPtr,. ...
14e0: 20 20 20 69 6e 74 20 73 61 66 65 29 3b 0a 2b 73 int safe);.+s
14f0: 74 61 74 69 63 20 69 6e 74 09 09 53 6c 61 76 65 tatic int..Slave
1500: 44 65 62 75 67 43 6d 64 28 54 63 6c 5f 49 6e 74 DebugCmd(Tcl_Int
1510: 65 72 70 20 2a 69 6e 74 65 72 70 2c 0a 2b 09 09 erp *interp,.+..
1520: 09 20 20 20 20 54 63 6c 5f 49 6e 74 65 72 70 20 . Tcl_Interp
1530: 2a 73 6c 61 76 65 49 6e 74 65 72 70 2c 0a 2b 09 *slaveInterp,.+.
1540: 09 09 20 20 20 20 69 6e 74 20 6f 62 6a 63 2c 20 .. int objc,
1550: 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f Tcl_Obj *const o
1560: 62 6a 76 5b 5d 29 3b 0a 20 73 74 61 74 69 63 20 bjv[]);. static
1570: 69 6e 74 09 09 53 6c 61 76 65 45 76 61 6c 28 54 int..SlaveEval(T
1580: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 cl_Interp *inter
1590: 70 2c 20 54 63 6c 5f 49 6e 74 65 72 70 20 2a 73 p, Tcl_Interp *s
15a0: 6c 61 76 65 49 6e 74 65 72 70 2c 0a 20 09 09 09 laveInterp,. ...
15b0: 20 20 20 20 69 6e 74 20 6f 62 6a 63 2c 20 54 63 int objc, Tc
15c0: 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f 62 6a l_Obj *const obj
15d0: 76 5b 5d 29 3b 0a 20 73 74 61 74 69 63 20 69 6e v[]);. static in
15e0: 74 09 09 53 6c 61 76 65 45 78 70 6f 73 65 28 54 t..SlaveExpose(T
15f0: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 cl_Interp *inter
1600: 70 2c 0a 40 40 20 2d 35 35 38 2c 37 20 2b 35 36 p,.@@ -558,7 +56
1610: 31 2c 37 20 40 40 0a 20 20 20 20 20 69 6e 74 20 1,7 @@. int
1620: 69 6e 64 65 78 3b 0a 20 20 20 20 20 73 74 61 74 index;. stat
1630: 69 63 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 6f ic const char *o
1640: 70 74 69 6f 6e 73 5b 5d 20 3d 20 7b 0a 20 09 22 ptions[] = {. ."
1650: 61 6c 69 61 73 22 2c 09 22 61 6c 69 61 73 65 73 alias",."aliases
1660: 22 2c 09 22 62 67 65 72 72 6f 72 22 2c 09 22 63 ",."bgerror",."c
1670: 72 65 61 74 65 22 2c 0a 2d 09 22 64 65 6c 65 74 reate",.-."delet
1680: 65 22 2c 09 22 65 76 61 6c 22 2c 09 09 22 65 78 e",."eval",.."ex
1690: 69 73 74 73 22 2c 09 22 65 78 70 6f 73 65 22 2c ists",."expose",
16a0: 0a 2b 09 22 64 65 62 75 67 22 2c 09 22 64 65 6c .+."debug",."del
16b0: 65 74 65 22 2c 09 22 65 76 61 6c 22 2c 09 09 22 ete",."eval",.."
16c0: 65 78 69 73 74 73 22 2c 09 22 65 78 70 6f 73 65 exists",."expose
16d0: 22 2c 0a 20 09 22 68 69 64 65 22 2c 09 09 22 68 ",. ."hide",.."h
16e0: 69 64 64 65 6e 22 2c 09 22 69 73 73 61 66 65 22 idden",."issafe"
16f0: 2c 09 22 69 6e 76 6f 6b 65 68 69 64 64 65 6e 22 ,."invokehidden"
1700: 2c 0a 20 09 22 6c 69 6d 69 74 22 2c 09 22 6d 61 ,. ."limit",."ma
1710: 72 6b 74 72 75 73 74 65 64 22 2c 09 22 72 65 63 rktrusted",."rec
1720: 75 72 73 69 6f 6e 6c 69 6d 69 74 22 2c 22 73 6c ursionlimit","sl
1730: 61 76 65 73 22 2c 0a 20 09 22 73 68 61 72 65 22 aves",. ."share"
1740: 2c 09 22 74 61 72 67 65 74 22 2c 09 22 74 72 61 ,."target",."tra
1750: 6e 73 66 65 72 22 2c 0a 40 40 20 2d 35 36 36 2c nsfer",.@@ -566,
1760: 37 20 2b 35 36 39 2c 37 20 40 40 0a 20 20 20 20 7 +569,7 @@.
1770: 20 7d 3b 0a 20 20 20 20 20 65 6e 75 6d 20 6f 70 };. enum op
1780: 74 69 6f 6e 20 7b 0a 20 09 4f 50 54 5f 41 4c 49 tion {. .OPT_ALI
1790: 41 53 2c 09 4f 50 54 5f 41 4c 49 41 53 45 53 2c AS,.OPT_ALIASES,
17a0: 09 4f 50 54 5f 42 47 45 52 52 4f 52 2c 09 4f 50 .OPT_BGERROR,.OP
17b0: 54 5f 43 52 45 41 54 45 2c 0a 2d 09 4f 50 54 5f T_CREATE,.-.OPT_
17c0: 44 45 4c 45 54 45 2c 09 4f 50 54 5f 45 56 41 4c DELETE,.OPT_EVAL
17d0: 2c 09 4f 50 54 5f 45 58 49 53 54 53 2c 09 4f 50 ,.OPT_EXISTS,.OP
17e0: 54 5f 45 58 50 4f 53 45 2c 0a 2b 09 4f 50 54 5f T_EXPOSE,.+.OPT_
17f0: 44 45 42 55 47 2c 09 4f 50 54 5f 44 45 4c 45 54 DEBUG,.OPT_DELET
1800: 45 2c 09 4f 50 54 5f 45 56 41 4c 2c 09 4f 50 54 E,.OPT_EVAL,.OPT
1810: 5f 45 58 49 53 54 53 2c 09 4f 50 54 5f 45 58 50 _EXISTS,.OPT_EXP
1820: 4f 53 45 2c 0a 20 09 4f 50 54 5f 48 49 44 45 2c OSE,. .OPT_HIDE,
1830: 09 4f 50 54 5f 48 49 44 44 45 4e 2c 09 4f 50 54 .OPT_HIDDEN,.OPT
1840: 5f 49 53 53 41 46 45 2c 09 4f 50 54 5f 49 4e 56 _ISSAFE,.OPT_INV
1850: 4f 4b 45 48 49 44 2c 0a 20 09 4f 50 54 5f 4c 49 OKEHID,. .OPT_LI
1860: 4d 49 54 2c 09 4f 50 54 5f 4d 41 52 4b 54 52 55 MIT,.OPT_MARKTRU
1870: 53 54 45 44 2c 4f 50 54 5f 52 45 43 4c 49 4d 49 STED,OPT_RECLIMI
1880: 54 2c 09 4f 50 54 5f 53 4c 41 56 45 53 2c 0a 20 T,.OPT_SLAVES,.
1890: 09 4f 50 54 5f 53 48 41 52 45 2c 09 4f 50 54 5f .OPT_SHARE,.OPT_
18a0: 54 41 52 47 45 54 2c 09 4f 50 54 5f 54 52 41 4e TARGET,.OPT_TRAN
18b0: 53 46 45 52 0a 40 40 20 2d 37 30 36 2c 36 20 2b SFER.@@ -706,6 +
18c0: 37 30 39 2c 32 33 20 40 40 0a 20 09 54 63 6c 5f 709,23 @@. .Tcl_
18d0: 53 65 74 4f 62 6a 52 65 73 75 6c 74 28 69 6e 74 SetObjResult(int
18e0: 65 72 70 2c 20 73 6c 61 76 65 50 74 72 29 3b 0a erp, slavePtr);.
18f0: 20 09 72 65 74 75 72 6e 20 54 43 4c 5f 4f 4b 3b .return TCL_OK;
1900: 0a 20 20 20 20 20 7d 0a 2b 20 20 20 20 63 61 73 . }.+ cas
1910: 65 20 4f 50 54 5f 44 45 42 55 47 3a 20 7b 0a 2b e OPT_DEBUG: {.+
1920: 09 2f 2a 20 54 49 50 20 23 33 37 38 20 2a 2f 0a ./* TIP #378 */.
1930: 2b 09 54 63 6c 5f 49 6e 74 65 72 70 20 2a 73 6c +.Tcl_Interp *sl
1940: 61 76 65 49 6e 74 65 72 70 3b 0a 2b 0a 2b 09 2f aveInterp;.+.+./
1950: 2a 0a 2b 09 20 2a 20 43 75 72 72 65 6e 74 6c 79 *.+. * Currently
1960: 20 6f 6e 6c 79 20 2d 66 72 61 6d 65 20 73 75 70 only -frame sup
1970: 70 6f 72 74 65 64 2c 20 6f 74 68 65 72 77 69 73 ported, otherwis
1980: 65 20 3f 2d 6f 70 74 69 6f 6e 20 3f 76 61 6c 75 e ?-option ?valu
1990: 65 3f 3f 0a 2b 09 20 2a 2f 0a 2b 09 69 66 20 28 e??.+. */.+.if (
19a0: 6f 62 6a 63 20 3c 20 33 20 7c 7c 20 6f 62 6a 63 objc < 3 || objc
19b0: 20 3e 20 35 29 20 7b 0a 2b 09 20 20 20 20 54 63 > 5) {.+. Tc
19c0: 6c 5f 57 72 6f 6e 67 4e 75 6d 41 72 67 73 28 69 l_WrongNumArgs(i
19d0: 6e 74 65 72 70 2c 20 32 2c 20 6f 62 6a 76 2c 20 nterp, 2, objv,
19e0: 22 70 61 74 68 20 3f 2d 66 72 61 6d 65 20 3f 62 "path ?-frame ?b
19f0: 6f 6f 6c 3f 3f 22 29 3b 0a 2b 09 20 20 20 20 72 ool??");.+. r
1a00: 65 74 75 72 6e 20 54 43 4c 5f 45 52 52 4f 52 3b eturn TCL_ERROR;
1a10: 0a 2b 09 7d 0a 2b 09 73 6c 61 76 65 49 6e 74 65 .+.}.+.slaveInte
1a20: 72 70 20 3d 20 47 65 74 49 6e 74 65 72 70 28 69 rp = GetInterp(i
1a30: 6e 74 65 72 70 2c 20 6f 62 6a 76 5b 32 5d 29 3b nterp, objv[2]);
1a40: 0a 2b 09 69 66 20 28 73 6c 61 76 65 49 6e 74 65 .+.if (slaveInte
1a50: 72 70 20 3d 3d 20 4e 55 4c 4c 29 20 7b 0a 2b 09 rp == NULL) {.+.
1a60: 20 20 20 20 72 65 74 75 72 6e 20 54 43 4c 5f 45 return TCL_E
1a70: 52 52 4f 52 3b 0a 2b 09 7d 0a 2b 09 72 65 74 75 RROR;.+.}.+.retu
1a80: 72 6e 20 53 6c 61 76 65 44 65 62 75 67 43 6d 64 rn SlaveDebugCmd
1a90: 28 69 6e 74 65 72 70 2c 20 73 6c 61 76 65 49 6e (interp, slaveIn
1aa0: 74 65 72 70 2c 20 6f 62 6a 63 20 2d 20 33 2c 20 terp, objc - 3,
1ab0: 6f 62 6a 76 20 2b 20 33 29 3b 0a 2b 20 20 20 20 objv + 3);.+
1ac0: 7d 0a 20 20 20 20 20 63 61 73 65 20 4f 50 54 5f }. case OPT_
1ad0: 44 45 4c 45 54 45 3a 20 7b 0a 20 09 69 6e 74 20 DELETE: {. .int
1ae0: 69 3b 0a 20 09 49 6e 74 65 72 70 49 6e 66 6f 20 i;. .InterpInfo
1af0: 2a 69 69 50 74 72 3b 0a 40 40 20 2d 32 32 32 38 *iiPtr;.@@ -2228
1b00: 2c 31 32 20 2b 32 32 34 38 2c 31 32 20 40 40 0a ,12 +2248,12 @@.
1b10: 20 20 20 20 20 54 63 6c 5f 49 6e 74 65 72 70 20 Tcl_Interp
1b20: 2a 73 6c 61 76 65 49 6e 74 65 72 70 20 3d 20 63 *slaveInterp = c
1b30: 6c 69 65 6e 74 44 61 74 61 3b 0a 20 20 20 20 20 lientData;.
1b40: 69 6e 74 20 69 6e 64 65 78 3b 0a 20 20 20 20 20 int index;.
1b50: 73 74 61 74 69 63 20 63 6f 6e 73 74 20 63 68 61 static const cha
1b60: 72 20 2a 6f 70 74 69 6f 6e 73 5b 5d 20 3d 20 7b r *options[] = {
1b70: 0a 2d 09 22 61 6c 69 61 73 22 2c 09 22 61 6c 69 .-."alias",."ali
1b80: 61 73 65 73 22 2c 09 22 62 67 65 72 72 6f 72 22 ases",."bgerror"
1b90: 2c 09 22 65 76 61 6c 22 2c 0a 2b 09 22 61 6c 69 ,."eval",.+."ali
1ba0: 61 73 22 2c 09 22 61 6c 69 61 73 65 73 22 2c 09 as",."aliases",.
1bb0: 22 62 67 65 72 72 6f 72 22 2c 09 22 64 65 62 75 "bgerror",."debu
1bc0: 67 22 2c 09 22 65 76 61 6c 22 2c 0a 20 09 22 65 g",."eval",. ."e
1bd0: 78 70 6f 73 65 22 2c 09 22 68 69 64 65 22 2c 09 xpose",."hide",.
1be0: 09 22 68 69 64 64 65 6e 22 2c 09 22 69 73 73 61 ."hidden",."issa
1bf0: 66 65 22 2c 0a 20 09 22 69 6e 76 6f 6b 65 68 69 fe",. ."invokehi
1c00: 64 64 65 6e 22 2c 09 22 6c 69 6d 69 74 22 2c 09 dden",."limit",.
1c10: 22 6d 61 72 6b 74 72 75 73 74 65 64 22 2c 09 22 "marktrusted",."
1c20: 72 65 63 75 72 73 69 6f 6e 6c 69 6d 69 74 22 2c recursionlimit",
1c30: 20 4e 55 4c 4c 0a 20 20 20 20 20 7d 3b 0a 20 20 NULL. };.
1c40: 20 20 20 65 6e 75 6d 20 6f 70 74 69 6f 6e 73 20 enum options
1c50: 7b 0a 2d 09 4f 50 54 5f 41 4c 49 41 53 2c 09 4f {.-.OPT_ALIAS,.O
1c60: 50 54 5f 41 4c 49 41 53 45 53 2c 09 4f 50 54 5f PT_ALIASES,.OPT_
1c70: 42 47 45 52 52 4f 52 2c 09 4f 50 54 5f 45 56 41 BGERROR,.OPT_EVA
1c80: 4c 2c 0a 2b 09 4f 50 54 5f 41 4c 49 41 53 2c 09 L,.+.OPT_ALIAS,.
1c90: 4f 50 54 5f 41 4c 49 41 53 45 53 2c 09 4f 50 54 OPT_ALIASES,.OPT
1ca0: 5f 42 47 45 52 52 4f 52 2c 09 4f 50 54 5f 44 45 _BGERROR,.OPT_DE
1cb0: 42 55 47 2c 09 4f 50 54 5f 45 56 41 4c 2c 0a 20 BUG,.OPT_EVAL,.
1cc0: 09 4f 50 54 5f 45 58 50 4f 53 45 2c 09 4f 50 54 .OPT_EXPOSE,.OPT
1cd0: 5f 48 49 44 45 2c 09 4f 50 54 5f 48 49 44 44 45 _HIDE,.OPT_HIDDE
1ce0: 4e 2c 09 4f 50 54 5f 49 53 53 41 46 45 2c 0a 20 N,.OPT_ISSAFE,.
1cf0: 09 4f 50 54 5f 49 4e 56 4f 4b 45 48 49 44 44 45 .OPT_INVOKEHIDDE
1d00: 4e 2c 20 4f 50 54 5f 4c 49 4d 49 54 2c 09 4f 50 N, OPT_LIMIT,.OP
1d10: 54 5f 4d 41 52 4b 54 52 55 53 54 45 44 2c 20 4f T_MARKTRUSTED, O
1d20: 50 54 5f 52 45 43 4c 49 4d 49 54 0a 20 20 20 20 PT_RECLIMIT.
1d30: 20 7d 3b 0a 40 40 20 2d 32 32 38 30 2c 36 20 2b };.@@ -2280,6 +
1d40: 32 33 30 30 2c 31 36 20 40 40 0a 20 09 20 20 20 2300,16 @@. .
1d50: 20 72 65 74 75 72 6e 20 54 43 4c 5f 45 52 52 4f return TCL_ERRO
1d60: 52 3b 0a 20 09 7d 0a 20 09 72 65 74 75 72 6e 20 R;. .}. .return
1d70: 53 6c 61 76 65 42 67 65 72 72 6f 72 28 69 6e 74 SlaveBgerror(int
1d80: 65 72 70 2c 20 73 6c 61 76 65 49 6e 74 65 72 70 erp, slaveInterp
1d90: 2c 20 6f 62 6a 63 20 2d 20 32 2c 20 6f 62 6a 76 , objc - 2, objv
1da0: 20 2b 20 32 29 3b 0a 2b 20 20 20 20 63 61 73 65 + 2);.+ case
1db0: 20 4f 50 54 5f 44 45 42 55 47 3a 0a 2b 09 2f 2a OPT_DEBUG:.+./*
1dc0: 0a 2b 09 20 2a 20 54 49 50 20 23 33 37 38 20 2a .+. * TIP #378 *
1dd0: 0a 2b 09 20 2a 20 43 75 72 72 65 6e 74 6c 79 20 .+. * Currently
1de0: 6f 6e 6c 79 20 2d 66 72 61 6d 65 20 73 75 70 70 only -frame supp
1df0: 6f 72 74 65 64 2c 20 6f 74 68 65 72 77 69 73 65 orted, otherwise
1e00: 20 3f 2d 6f 70 74 69 6f 6e 20 3f 76 61 6c 75 65 ?-option ?value
1e10: 3f 20 2e 2e 2e 3f 0a 2b 09 20 2a 2f 0a 2b 09 69 ? ...?.+. */.+.i
1e20: 66 20 28 6f 62 6a 63 20 3e 20 34 29 20 7b 0a 2b f (objc > 4) {.+
1e30: 09 20 20 20 20 54 63 6c 5f 57 72 6f 6e 67 4e 75 . Tcl_WrongNu
1e40: 6d 41 72 67 73 28 69 6e 74 65 72 70 2c 20 32 2c mArgs(interp, 2,
1e50: 20 6f 62 6a 76 2c 20 22 3f 2d 66 72 61 6d 65 20 objv, "?-frame
1e60: 3f 62 6f 6f 6c 3f 3f 22 29 3b 0a 2b 09 20 20 20 ?bool??");.+.
1e70: 20 72 65 74 75 72 6e 20 54 43 4c 5f 45 52 52 4f return TCL_ERRO
1e80: 52 3b 0a 2b 09 7d 0a 2b 09 72 65 74 75 72 6e 20 R;.+.}.+.return
1e90: 53 6c 61 76 65 44 65 62 75 67 43 6d 64 28 69 6e SlaveDebugCmd(in
1ea0: 74 65 72 70 2c 20 73 6c 61 76 65 49 6e 74 65 72 terp, slaveInter
1eb0: 70 2c 20 6f 62 6a 63 20 2d 20 32 2c 20 6f 62 6a p, objc - 2, obj
1ec0: 76 20 2b 20 32 29 3b 0a 20 20 20 20 20 63 61 73 v + 2);. cas
1ed0: 65 20 4f 50 54 5f 45 56 41 4c 3a 0a 20 09 69 66 e OPT_EVAL:. .if
1ee0: 20 28 6f 62 6a 63 20 3c 20 33 29 20 7b 0a 20 09 (objc < 3) {. .
1ef0: 20 20 20 20 54 63 6c 5f 57 72 6f 6e 67 4e 75 6d Tcl_WrongNum
1f00: 41 72 67 73 28 69 6e 74 65 72 70 2c 20 32 2c 20 Args(interp, 2,
1f10: 6f 62 6a 76 2c 20 22 61 72 67 20 3f 61 72 67 20 objv, "arg ?arg
1f20: 2e 2e 2e 3f 22 29 3b 0a 40 40 20 2d 32 34 34 33 ...?");.@@ -2443
1f30: 2c 36 20 2b 32 34 37 33 2c 37 35 20 40 40 0a 20 ,6 +2473,75 @@.
1f40: 2f 2a 0a 20 20 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d /*. *----------
1f50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1f60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1f70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1f80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 20 20 2a ------------. *
1f90: 0a 2b 20 2a 20 53 6c 61 76 65 44 65 62 75 67 43 .+ * SlaveDebugC
1fa0: 6d 64 20 2d 2d 20 54 49 50 20 23 33 37 38 0a 2b md -- TIP #378.+
1fb0: 20 2a 0a 2b 20 2a 09 48 65 6c 70 65 72 20 66 75 *.+ *.Helper fu
1fc0: 6e 63 74 69 6f 6e 20 74 6f 20 68 61 6e 64 6c 65 nction to handle
1fd0: 20 27 64 65 62 75 67 27 20 63 6f 6d 6d 61 6e 64 'debug' command
1fe0: 20 69 6e 20 61 20 73 6c 61 76 65 20 69 6e 74 65 in a slave inte
1ff0: 72 70 72 65 74 65 72 2e 0a 2b 20 2a 0a 2b 20 2a rpreter..+ *.+ *
2000: 20 52 65 73 75 6c 74 73 3a 0a 2b 20 2a 09 41 20 Results:.+ *.A
2010: 73 74 61 6e 64 61 72 64 20 54 63 6c 20 72 65 73 standard Tcl res
2020: 75 6c 74 2e 0a 2b 20 2a 0a 2b 20 2a 20 53 69 64 ult..+ *.+ * Sid
2030: 65 20 65 66 66 65 63 74 73 3a 0a 2b 20 2a 09 4d e effects:.+ *.M
2040: 61 79 20 6d 6f 64 69 66 79 20 49 4e 54 45 52 50 ay modify INTERP
2050: 5f 44 45 42 55 47 20 66 6c 61 67 20 69 6e 20 74 _DEBUG flag in t
2060: 68 65 20 73 6c 61 76 65 2e 0a 2b 20 2a 0a 2b 20 he slave..+ *.+
2070: 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d *---------------
2080: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
2090: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
20a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
20b0: 2d 2d 2d 2d 2d 2d 2d 0a 2b 20 2a 2f 0a 2b 0a 2b -------.+ */.+.+
20c0: 73 74 61 74 69 63 20 69 6e 74 0a 2b 53 6c 61 76 static int.+Slav
20d0: 65 44 65 62 75 67 43 6d 64 28 0a 2b 20 20 20 20 eDebugCmd(.+
20e0: 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 Tcl_Interp *inte
20f0: 72 70 2c 09 09 2f 2a 20 49 6e 74 65 72 70 20 66 rp,../* Interp f
2100: 6f 72 20 65 72 72 6f 72 20 72 65 74 75 72 6e 2e or error return.
2110: 20 2a 2f 0a 2b 20 20 20 20 54 63 6c 5f 49 6e 74 */.+ Tcl_Int
2120: 65 72 70 20 2a 73 6c 61 76 65 49 6e 74 65 72 70 erp *slaveInterp
2130: 2c 09 2f 2a 20 54 68 65 20 73 6c 61 76 65 20 69 ,./* The slave i
2140: 6e 74 65 72 70 72 65 74 65 72 20 69 6e 20 77 68 nterpreter in wh
2150: 69 63 68 20 63 6f 6d 6d 61 6e 64 0a 2b 09 09 09 ich command.+...
2160: 09 20 2a 20 77 69 6c 6c 20 62 65 20 65 76 61 6c . * will be eval
2170: 75 61 74 65 64 2e 20 2a 2f 0a 2b 20 20 20 20 69 uated. */.+ i
2180: 6e 74 20 6f 62 6a 63 2c 09 09 09 2f 2a 20 4e 75 nt objc,.../* Nu
2190: 6d 62 65 72 20 6f 66 20 61 72 67 75 6d 65 6e 74 mber of argument
21a0: 73 2e 20 2a 2f 0a 2b 20 20 20 20 54 63 6c 5f 4f s. */.+ Tcl_O
21b0: 62 6a 20 2a 63 6f 6e 73 74 20 6f 62 6a 76 5b 5d bj *const objv[]
21c0: 29 09 2f 2a 20 41 72 67 75 6d 65 6e 74 20 6f 62 )./* Argument ob
21d0: 6a 65 63 74 73 2e 20 2a 2f 0a 2b 7b 0a 2b 20 20 jects. */.+{.+
21e0: 20 20 73 74 61 74 69 63 20 63 6f 6e 73 74 20 63 static const c
21f0: 68 61 72 20 2a 63 6f 6e 73 74 20 64 65 62 75 67 har *const debug
2200: 54 79 70 65 73 5b 5d 20 3d 20 7b 0a 2b 09 22 2d Types[] = {.+."-
2210: 66 72 61 6d 65 22 2c 20 4e 55 4c 4c 0a 2b 20 20 frame", NULL.+
2220: 20 20 7d 3b 0a 2b 20 20 20 20 65 6e 75 6d 20 44 };.+ enum D
2230: 65 62 75 67 54 79 70 65 73 20 7b 0a 2b 09 44 45 ebugTypes {.+.DE
2240: 42 55 47 5f 54 59 50 45 5f 46 52 41 4d 45 0a 2b BUG_TYPE_FRAME.+
2250: 20 20 20 20 7d 3b 0a 2b 20 20 20 20 69 6e 74 20 };.+ int
2260: 64 65 62 75 67 54 79 70 65 3b 0a 2b 20 20 20 20 debugType;.+
2270: 49 6e 74 65 72 70 20 2a 69 50 74 72 3b 0a 2b 20 Interp *iPtr;.+
2280: 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 72 65 73 75 Tcl_Obj *resu
2290: 6c 74 50 74 72 3b 0a 2b 0a 2b 20 20 20 20 69 50 ltPtr;.+.+ iP
22a0: 74 72 20 3d 20 28 49 6e 74 65 72 70 20 2a 29 20 tr = (Interp *)
22b0: 73 6c 61 76 65 49 6e 74 65 72 70 3b 0a 2b 20 20 slaveInterp;.+
22c0: 20 20 69 66 20 28 6f 62 6a 63 20 3d 3d 20 30 29 if (objc == 0)
22d0: 20 7b 0a 2b 09 72 65 73 75 6c 74 50 74 72 20 3d {.+.resultPtr =
22e0: 20 54 63 6c 5f 4e 65 77 4f 62 6a 28 29 3b 0a 2b Tcl_NewObj();.+
22f0: 09 54 63 6c 5f 4c 69 73 74 4f 62 6a 41 70 70 65 .Tcl_ListObjAppe
2300: 6e 64 45 6c 65 6d 65 6e 74 28 4e 55 4c 4c 2c 20 ndElement(NULL,
2310: 72 65 73 75 6c 74 50 74 72 2c 0a 2b 09 09 54 63 resultPtr,.+..Tc
2320: 6c 5f 4e 65 77 53 74 72 69 6e 67 4f 62 6a 28 22 l_NewStringObj("
2330: 2d 66 72 61 6d 65 22 2c 20 2d 31 29 29 3b 0a 2b -frame", -1));.+
2340: 09 54 63 6c 5f 4c 69 73 74 4f 62 6a 41 70 70 65 .Tcl_ListObjAppe
2350: 6e 64 45 6c 65 6d 65 6e 74 28 4e 55 4c 4c 2c 20 ndElement(NULL,
2360: 72 65 73 75 6c 74 50 74 72 2c 0a 2b 09 09 54 63 resultPtr,.+..Tc
2370: 6c 5f 4e 65 77 42 6f 6f 6c 65 61 6e 4f 62 6a 28 l_NewBooleanObj(
2380: 69 50 74 72 2d 3e 66 6c 61 67 73 20 26 20 49 4e iPtr->flags & IN
2390: 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 TERP_DEBUG_FRAME
23a0: 29 29 3b 0a 2b 09 54 63 6c 5f 53 65 74 4f 62 6a ));.+.Tcl_SetObj
23b0: 52 65 73 75 6c 74 28 69 6e 74 65 72 70 2c 20 72 Result(interp, r
23c0: 65 73 75 6c 74 50 74 72 29 3b 0a 2b 20 20 20 20 esultPtr);.+
23d0: 7d 20 65 6c 73 65 20 7b 0a 2b 09 69 66 20 28 54 } else {.+.if (T
23e0: 63 6c 5f 47 65 74 49 6e 64 65 78 46 72 6f 6d 4f cl_GetIndexFromO
23f0: 62 6a 28 69 6e 74 65 72 70 2c 20 6f 62 6a 76 5b bj(interp, objv[
2400: 30 5d 2c 20 64 65 62 75 67 54 79 70 65 73 2c 0a 0], debugTypes,.
2410: 2b 09 09 09 22 64 65 62 75 67 20 6f 70 74 69 6f +..."debug optio
2420: 6e 22 2c 20 30 2c 20 26 64 65 62 75 67 54 79 70 n", 0, &debugTyp
2430: 65 29 20 21 3d 20 54 43 4c 5f 4f 4b 29 20 7b 0a e) != TCL_OK) {.
2440: 2b 09 20 20 20 20 72 65 74 75 72 6e 20 54 43 4c +. return TCL
2450: 5f 45 52 52 4f 52 3b 0a 2b 09 7d 0a 2b 09 69 66 _ERROR;.+.}.+.if
2460: 20 28 64 65 62 75 67 54 79 70 65 20 3d 3d 20 44 (debugType == D
2470: 45 42 55 47 5f 54 59 50 45 5f 46 52 41 4d 45 29 EBUG_TYPE_FRAME)
2480: 20 7b 0a 2b 09 20 20 20 20 69 66 20 28 6f 62 6a {.+. if (obj
2490: 63 20 3d 3d 20 32 29 20 7b 20 2f 2a 20 73 65 74 c == 2) { /* set
24a0: 20 2a 2f 0a 2b 09 09 69 66 20 28 54 63 6c 5f 47 */.+..if (Tcl_G
24b0: 65 74 42 6f 6f 6c 65 61 6e 46 72 6f 6d 4f 62 6a etBooleanFromObj
24c0: 28 69 6e 74 65 72 70 2c 20 6f 62 6a 76 5b 31 5d (interp, objv[1]
24d0: 2c 20 26 64 65 62 75 67 54 79 70 65 29 0a 2b 09 , &debugType).+.
24e0: 09 09 21 3d 20 54 43 4c 5f 4f 4b 29 20 7b 0a 2b ..!= TCL_OK) {.+
24f0: 09 09 20 20 20 20 72 65 74 75 72 6e 20 54 43 4c .. return TCL
2500: 5f 45 52 52 4f 52 3b 0a 2b 09 09 7d 0a 2b 09 09 _ERROR;.+..}.+..
2510: 2f 2a 0a 2b 09 09 20 2a 20 51 75 69 65 74 6c 79 /*.+.. * Quietly
2520: 20 69 67 6e 6f 72 65 20 61 74 74 65 6d 70 74 73 ignore attempts
2530: 20 74 6f 20 64 69 73 61 62 6c 65 20 69 6e 74 65 to disable inte
2540: 72 70 20 64 65 62 75 67 67 69 6e 67 2e 0a 2b 09 rp debugging..+.
2550: 09 20 2a 20 54 68 69 73 20 69 73 20 61 20 6f 6e . * This is a on
2560: 65 2d 77 61 79 20 73 77 69 74 63 68 20 61 73 20 e-way switch as
2570: 66 72 61 6d 65 20 64 65 62 75 67 20 69 6e 66 6f frame debug info
2580: 20 69 73 20 6d 61 69 6e 74 61 69 6e 65 64 0a 2b is maintained.+
2590: 09 09 20 2a 20 69 6e 20 61 20 73 74 61 63 6b 20 .. * in a stack
25a0: 74 68 61 74 20 6d 75 73 74 20 62 65 20 63 6f 6e that must be con
25b0: 73 69 73 74 65 6e 74 20 6f 6e 63 65 20 74 75 72 sistent once tur
25c0: 6e 65 64 20 6f 6e 2e 0a 2b 09 09 20 2a 2f 0a 2b ned on..+.. */.+
25d0: 09 09 69 66 20 28 64 65 62 75 67 54 79 70 65 29 ..if (debugType)
25e0: 20 7b 0a 2b 09 09 20 20 20 20 69 50 74 72 2d 3e {.+.. iPtr->
25f0: 66 6c 61 67 73 20 7c 3d 20 49 4e 54 45 52 50 5f flags |= INTERP_
2600: 44 45 42 55 47 5f 46 52 41 4d 45 3b 0a 2b 09 09 DEBUG_FRAME;.+..
2610: 7d 0a 2b 09 20 20 20 20 7d 0a 2b 09 20 20 20 20 }.+. }.+.
2620: 54 63 6c 5f 53 65 74 4f 62 6a 52 65 73 75 6c 74 Tcl_SetObjResult
2630: 28 69 6e 74 65 72 70 2c 0a 2b 09 09 20 20 20 20 (interp,.+..
2640: 54 63 6c 5f 4e 65 77 42 6f 6f 6c 65 61 6e 4f 62 Tcl_NewBooleanOb
2650: 6a 28 69 50 74 72 2d 3e 66 6c 61 67 73 20 26 20 j(iPtr->flags &
2660: 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 INTERP_DEBUG_FRA
2670: 4d 45 29 29 3b 0a 2b 09 7d 0a 2b 20 20 20 20 7d ME));.+.}.+ }
2680: 0a 2b 20 20 20 20 72 65 74 75 72 6e 20 54 43 4c .+ return TCL
2690: 5f 4f 4b 3b 0a 2b 7d 0a 2b 0c 0a 2b 2f 2a 0a 2b _OK;.+}.+..+/*.+
26a0: 20 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d *--------------
26b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
26c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
26d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
26e0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 2b 20 2a 0a 20 20 2a --------.+ *. *
26f0: 20 53 6c 61 76 65 45 76 61 6c 20 2d 2d 0a 20 20 SlaveEval --.
2700: 2a 0a 20 20 2a 09 48 65 6c 70 65 72 20 66 75 6e *. *.Helper fun
2710: 63 74 69 6f 6e 20 74 6f 20 65 76 61 6c 75 61 74 ction to evaluat
2720: 65 20 61 20 63 6f 6d 6d 61 6e 64 20 69 6e 20 61 e a command in a
2730: 20 73 6c 61 76 65 20 69 6e 74 65 72 70 72 65 74 slave interpret
2740: 65 72 2e 0a 2d 2d 2d 20 74 63 6c 38 35 2e 6f 72 er..--- tcl85.or
2750: 69 67 2f 67 65 6e 65 72 69 63 2f 74 63 6c 49 6e ig/generic/tclIn
2760: 74 2e 68 09 32 30 31 30 2d 30 38 2d 30 33 20 30 t.h.2010-08-03 0
2770: 39 3a 31 34 3a 35 38 2e 30 30 30 30 30 30 30 30 9:14:58.00000000
2780: 30 20 2d 30 37 30 30 0a 2b 2b 2b 20 74 63 6c 38 0 -0700.+++ tcl8
2790: 35 2f 67 65 6e 65 72 69 63 2f 74 63 6c 49 6e 74 5/generic/tclInt
27a0: 2e 68 09 32 30 31 30 2d 31 30 2d 30 34 20 31 35 .h.2010-10-04 15
27b0: 3a 35 35 3a 34 39 2e 30 30 30 30 30 30 30 30 30 :55:49.000000000
27c0: 20 2d 30 37 30 30 0a 40 40 20 2d 31 39 2c 36 20 -0700.@@ -19,6
27d0: 2b 31 39 2c 38 20 40 40 0a 20 23 69 66 6e 64 65 +19,8 @@. #ifnde
27e0: 66 20 5f 54 43 4c 49 4e 54 0a 20 23 64 65 66 69 f _TCLINT. #defi
27f0: 6e 65 20 5f 54 43 4c 49 4e 54 0a 20 0a 2b 23 64 ne _TCLINT. .+#d
2800: 65 66 69 6e 65 20 54 43 4c 5f 4e 4f 5f 53 54 41 efine TCL_NO_STA
2810: 43 4b 5f 43 48 45 43 4b 20 2f 2a 20 44 49 53 41 CK_CHECK /* DISA
2820: 42 4c 45 20 43 20 52 55 4e 54 49 4d 45 20 53 54 BLE C RUNTIME ST
2830: 41 43 4b 20 43 48 45 43 4b 20 2d 20 54 65 73 74 ACK CHECK - Test
2840: 20 41 49 58 20 2a 2f 0a 2b 0a 20 2f 2a 0a 20 20 AIX */.+. /*.
2850: 2a 20 53 6f 6d 65 20 6e 75 6d 65 72 69 63 73 20 * Some numerics
2860: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 configuration op
2870: 74 69 6f 6e 73 2e 0a 20 20 2a 2f 0a 40 40 20 2d tions.. */.@@ -
2880: 32 30 33 32 2c 36 20 2b 32 30 33 34 2c 39 20 40 2032,6 +2034,9 @
2890: 40 0a 20 20 2a 20 53 41 46 45 5f 49 4e 54 45 52 @. * SAFE_INTER
28a0: 50 3a 09 09 4e 6f 6e 20 7a 65 72 6f 20 6d 65 61 P:..Non zero mea
28b0: 6e 73 20 74 68 61 74 20 74 68 65 20 63 75 72 72 ns that the curr
28c0: 65 6e 74 20 69 6e 74 65 72 70 20 69 73 20 61 20 ent interp is a
28d0: 73 61 66 65 0a 20 20 2a 09 09 09 69 6e 74 65 72 safe. *...inter
28e0: 70 20 28 69 2e 65 2e 20 69 74 20 68 61 73 20 6f p (i.e. it has o
28f0: 6e 6c 79 20 74 68 65 20 73 61 66 65 20 63 6f 6d nly the safe com
2900: 6d 61 6e 64 73 20 69 6e 73 74 61 6c 6c 65 64 2c mands installed,
2910: 0a 20 20 2a 09 09 09 6c 65 73 73 20 70 72 69 76 . *...less priv
2920: 69 6c 65 64 67 65 20 74 68 61 6e 20 61 20 72 65 iledge than a re
2930: 67 75 6c 61 72 20 69 6e 74 65 72 70 29 2e 0a 2b gular interp)..+
2940: 20 2a 20 49 4e 54 45 52 50 5f 44 45 42 55 47 5f * INTERP_DEBUG_
2950: 46 52 41 4d 45 3a 09 55 73 65 64 20 66 6f 72 20 FRAME:.Used for
2960: 73 77 69 74 63 68 69 6e 67 20 6f 6e 20 76 61 72 switching on var
2970: 69 6f 75 73 20 65 78 74 72 61 20 69 6e 74 65 72 ious extra inter
2980: 70 72 65 74 65 72 0a 2b 20 2a 09 09 09 64 65 62 preter.+ *...deb
2990: 75 67 2f 69 6e 66 6f 20 6d 65 63 68 61 6e 69 73 ug/info mechanis
29a0: 6d 73 20 28 65 2e 67 2e 20 69 6e 66 6f 20 66 72 ms (e.g. info fr
29b0: 61 6d 65 20 65 76 61 6c 2f 75 70 6c 65 76 65 6c ame eval/uplevel
29c0: 0a 2b 20 2a 09 09 09 74 72 61 63 69 6e 67 29 20 .+ *...tracing)
29d0: 77 68 69 63 68 20 61 72 65 20 70 65 72 66 6f 72 which are perfor
29e0: 6d 61 6e 63 65 20 69 6e 74 65 6e 73 69 76 65 2e mance intensive.
29f0: 0a 20 20 2a 20 49 4e 54 45 52 50 5f 54 52 41 43 . * INTERP_TRAC
2a00: 45 5f 49 4e 5f 50 52 4f 47 52 45 53 53 3a 20 4e E_IN_PROGRESS: N
2a10: 6f 6e 2d 7a 65 72 6f 20 6d 65 61 6e 73 20 74 68 on-zero means th
2a20: 61 74 20 61 6e 20 69 6e 74 65 72 70 20 74 72 61 at an interp tra
2a30: 63 65 20 69 73 20 63 75 72 72 65 6e 74 6c 79 0a ce is currently.
2a40: 20 20 2a 09 09 09 61 63 74 69 76 65 3b 20 73 6f *...active; so
2a50: 20 6e 6f 20 66 75 72 74 68 65 72 20 74 72 61 63 no further trac
2a60: 65 20 63 61 6c 6c 62 61 63 6b 73 20 73 68 6f 75 e callbacks shou
2a70: 6c 64 20 62 65 0a 20 20 2a 09 09 09 69 6e 76 6f ld be. *...invo
2a80: 6b 65 64 2e 0a 40 40 20 2d 32 30 34 37 2c 36 20 ked..@@ -2047,6
2a90: 2b 32 30 35 32 2c 37 20 40 40 0a 20 0a 20 23 64 +2052,7 @@. . #d
2aa0: 65 66 69 6e 65 20 44 45 4c 45 54 45 44 09 09 09 efine DELETED...
2ab0: 09 20 20 20 20 20 31 0a 20 23 64 65 66 69 6e 65 . 1. #define
2ac0: 20 45 52 52 5f 41 4c 52 45 41 44 59 5f 4c 4f 47 ERR_ALREADY_LOG
2ad0: 47 45 44 09 09 20 20 20 20 20 34 0a 2b 23 64 65 GED.. 4.+#de
2ae0: 66 69 6e 65 20 49 4e 54 45 52 50 5f 44 45 42 55 fine INTERP_DEBU
2af0: 47 5f 46 52 41 4d 45 09 09 20 20 30 78 31 30 0a G_FRAME.. 0x10.
2b00: 20 23 64 65 66 69 6e 65 20 44 4f 4e 54 5f 43 4f #define DONT_CO
2b10: 4d 50 49 4c 45 5f 43 4d 44 53 5f 49 4e 4c 49 4e MPILE_CMDS_INLIN
2b20: 45 09 20 20 30 78 32 30 0a 20 23 64 65 66 69 6e E. 0x20. #defin
2b30: 65 20 52 41 4e 44 5f 53 45 45 44 5f 49 4e 49 54 e RAND_SEED_INIT
2b40: 49 41 4c 49 5a 45 44 09 09 20 20 30 78 34 30 0a IALIZED.. 0x40.
2b50: 20 23 64 65 66 69 6e 65 20 53 41 46 45 5f 49 4e #define SAFE_IN
2b60: 54 45 52 50 09 09 09 20 20 30 78 38 30 0a 2d 2d TERP... 0x80.--
2b70: 2d 20 74 63 6c 38 35 2e 6f 72 69 67 2f 74 65 73 - tcl85.orig/tes
2b80: 74 73 2f 69 6e 66 6f 2e 74 65 73 74 09 32 30 31 ts/info.test.201
2b90: 30 2d 30 38 2d 30 33 20 30 39 3a 35 30 3a 34 39 0-08-03 09:50:49
2ba0: 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 .000000000 -0700
2bb0: 0a 2b 2b 2b 20 74 63 6c 38 35 2f 74 65 73 74 73 .+++ tcl85/tests
2bc0: 2f 69 6e 66 6f 2e 74 65 73 74 09 32 30 31 30 2d /info.test.2010-
2bd0: 31 30 2d 30 35 20 31 30 3a 30 30 3a 30 33 2e 30 10-05 10:00:03.0
2be0: 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 0a 40 00000000 -0700.@
2bf0: 40 20 2d 36 38 39 2c 37 20 2b 36 38 39 2c 36 20 @ -689,7 +689,6
2c00: 40 40 0a 20 23 23 0a 20 23 20 23 23 23 20 23 23 @@. ##. # ### ##
2c10: 23 20 23 23 23 20 23 23 23 23 23 23 23 23 23 20 # ### #########
2c20: 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 ######### ######
2c30: 23 23 23 0a 20 23 23 20 69 6e 66 6f 20 66 72 61 ###. ## info fra
2c40: 6d 65 0a 2d 0a 20 23 23 20 48 65 6c 70 65 72 0a me.-. ## Helper.
2c50: 20 23 20 46 6f 72 20 74 68 65 20 6d 6f 72 65 20 # For the more
2c60: 63 6f 6d 70 6c 65 78 20 72 65 73 75 6c 74 73 20 complex results
2c70: 77 65 20 63 75 74 20 74 68 65 20 66 69 6c 65 20 we cut the file
2c80: 6e 61 6d 65 20 64 6f 77 6e 20 74 6f 20 72 65 6d name down to rem
2c90: 6f 76 65 0a 20 23 20 70 61 74 68 20 64 65 70 65 ove. # path depe
2ca0: 6e 64 65 6e 63 69 65 73 2c 20 61 6e 64 20 77 65 ndencies, and we
2cb0: 20 75 73 65 20 6f 6e 6c 79 20 70 61 72 74 20 6f use only part o
2cc0: 66 20 74 68 65 20 66 69 72 73 74 20 6c 69 6e 65 f the first line
2cd0: 20 6f 66 20 74 68 65 0a 40 40 20 2d 36 39 37 2c of the.@@ -697,
2ce0: 37 20 2b 36 39 36 2c 36 20 40 40 0a 20 23 20 74 7 +696,6 @@. # t
2cf0: 65 73 74 20 63 61 73 65 20 6d 61 79 20 61 70 70 est case may app
2d00: 65 61 72 20 69 6e 20 73 6f 6d 65 20 72 65 73 75 ear in some resu
2d10: 6c 74 73 2c 20 62 75 74 20 74 68 65 20 72 65 73 lts, but the res
2d20: 75 6c 74 20 69 73 20 70 61 72 74 20 6f 66 20 74 ult is part of t
2d30: 68 65 0a 20 23 20 74 65 73 74 63 61 73 65 2e 20 he. # testcase.
2d40: 41 6e 20 69 6e 66 69 6e 69 74 65 20 73 74 72 69 An infinite stri
2d50: 6e 67 20 77 6f 75 6c 64 20 62 65 20 72 65 71 75 ng would be requ
2d60: 69 72 65 64 20 74 6f 20 64 65 73 63 72 69 62 65 ired to describe
2d70: 20 74 68 61 74 2e 20 54 68 65 0a 20 23 20 63 75 that. The. # cu
2d80: 74 74 69 6e 67 2d 64 6f 77 6e 20 62 72 65 61 6b tting-down break
2d90: 73 20 74 68 69 73 2e 0a 2d 0a 20 70 72 6f 63 20 s this..-. proc
2da0: 72 65 64 75 63 65 20 7b 66 72 61 6d 65 7d 20 7b reduce {frame} {
2db0: 0a 20 20 20 20 20 73 65 74 20 20 70 6f 73 20 5b . set pos [
2dc0: 6c 73 65 61 72 63 68 20 2d 65 78 61 63 74 20 24 lsearch -exact $
2dd0: 66 72 61 6d 65 20 63 6d 64 5d 0a 20 20 20 20 20 frame cmd].
2de0: 69 6e 63 72 20 70 6f 73 0a 40 40 20 2d 37 31 34 incr pos.@@ -714
2df0: 2c 37 20 2b 37 31 32 2c 39 20 40 40 0a 20 20 20 ,7 +712,9 @@.
2e00: 20 20 7d 0a 20 20 20 20 20 73 65 74 20 66 72 61 }. set fra
2e10: 6d 65 0a 20 7d 0a 2d 0a 2b 70 72 6f 63 20 73 75 me. }.-.+proc su
2e20: 62 69 6e 74 65 72 70 20 7b 7d 20 7b 20 69 6e 74 binterp {} { int
2e30: 65 72 70 20 63 72 65 61 74 65 20 73 75 62 20 3b erp create sub ;
2e40: 20 69 6e 74 65 72 70 20 64 65 62 75 67 20 73 75 interp debug su
2e50: 62 20 2d 66 72 61 6d 65 20 31 3b 0a 2b 20 20 20 b -frame 1;.+
2e60: 20 69 6e 74 65 72 70 20 65 76 61 6c 20 73 75 62 interp eval sub
2e70: 20 5b 6c 69 73 74 20 70 72 6f 63 20 72 65 64 75 [list proc redu
2e80: 63 65 20 5b 69 6e 66 6f 20 61 72 67 73 20 72 65 ce [info args re
2e90: 64 75 63 65 5d 20 5b 69 6e 66 6f 20 62 6f 64 79 duce] [info body
2ea0: 20 72 65 64 75 63 65 5d 5d 0a 2b 7d 0a 20 23 23 reduce]].+}. ##
2eb0: 20 48 65 6c 70 65 72 0a 20 23 20 47 65 6e 65 72 Helper. # Gener
2ec0: 61 74 65 20 61 20 73 74 61 63 6b 74 72 61 63 65 ate a stacktrace
2ed0: 20 66 72 6f 6d 20 74 68 65 20 63 75 72 72 65 6e from the curren
2ee0: 74 20 6c 6f 63 61 74 69 6f 6e 20 74 6f 20 74 6f t location to to
2ef0: 70 2e 20 20 54 68 69 73 20 63 6f 64 65 0a 20 23 p. This code. #
2f00: 20 6e 6f 74 20 6f 6e 6c 79 20 64 65 70 65 6e 64 not only depend
2f10: 73 20 6f 6e 20 74 68 65 20 65 78 61 63 74 20 6c s on the exact l
2f20: 6f 63 61 74 69 6f 6e 20 6f 66 20 74 68 69 6e 67 ocation of thing
2f30: 73 2c 20 62 75 74 20 61 6c 73 6f 20 6f 6e 20 74 s, but also on t
2f40: 68 65 0a 40 40 20 2d 31 33 36 34 2c 31 34 20 2b he.@@ -1364,14 +
2f50: 31 33 36 34 2c 31 34 20 40 40 0a 20 2a 20 7b 74 1364,14 @@. * {t
2f60: 79 70 65 20 65 76 61 6c 20 6c 69 6e 65 20 33 20 ype eval line 3
2f70: 63 6d 64 20 65 74 72 61 63 65 20 70 72 6f 63 20 cmd etrace proc
2f80: 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 ::tcltest::RunTe
2f90: 73 74 7d 0a 20 2a 20 7b 74 79 70 65 20 73 6f 75 st}. * {type sou
2fa0: 72 63 65 20 6c 69 6e 65 20 31 33 36 32 20 66 69 rce line 1362 fi
2fb0: 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 le info.test cmd
2fc0: 20 7b 75 70 6c 65 76 65 6c 20 5c 5c 23 30 20 24 {uplevel \\#0 $
2fd0: 73 63 72 69 70 74 7d 20 70 72 6f 63 20 3a 3a 74 script} proc ::t
2fe0: 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 73 74 7d cltest::RunTest}
2ff0: 7d 0a 20 0a 2d 74 65 73 74 20 69 6e 66 6f 2d 33 }. .-test info-3
3000: 38 2e 32 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 8.2 {location in
3010: 66 6f 72 6d 61 74 69 6f 6e 20 66 6f 72 20 75 70 formation for up
3020: 6c 65 76 65 6c 2c 20 64 6c 2c 20 64 69 72 65 63 level, dl, direc
3030: 74 2d 6c 69 74 65 72 61 6c 7d 20 2d 6d 61 74 63 t-literal} -matc
3040: 68 20 67 6c 6f 62 20 2d 62 6f 64 79 20 7b 0a 2d h glob -body {.-
3050: 20 20 20 20 6a 6f 69 6e 20 5b 6c 72 61 6e 67 65 join [lrange
3060: 20 5b 75 70 6c 65 76 65 6c 20 5c 23 30 20 7b 0a [uplevel \#0 {.
3070: 2d 09 73 65 74 20 79 20 44 4c 2e 0a 2d 09 65 74 -.set y DL..-.et
3080: 72 61 63 65 0a 2d 20 20 20 20 7d 5d 20 30 20 32 race.- }] 0 2
3090: 5d 20 5c 6e 0a 2d 7d 20 2d 72 65 73 75 6c 74 20 ] \n.-} -result
30a0: 7b 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 {* {type source
30b0: 6c 69 6e 65 20 37 32 38 20 66 69 6c 65 20 69 6e line 728 file in
30c0: 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b 69 6e 66 fo.test cmd {inf
30d0: 6f 20 66 72 61 6d 65 20 24 6c 65 76 65 6c 7d 20 o frame $level}
30e0: 70 72 6f 63 20 3a 3a 65 74 72 61 63 65 20 6c 65 proc ::etrace le
30f0: 76 65 6c 20 30 7d 0a 2d 2a 20 7b 74 79 70 65 20 vel 0}.-* {type
3100: 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 33 37 30 source line 1370
3110: 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 file info.test
3120: 63 6d 64 20 65 74 72 61 63 65 20 70 72 6f 63 20 cmd etrace proc
3130: 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 ::tcltest::RunTe
3140: 73 74 7d 0a 2d 2a 20 7b 74 79 70 65 20 73 6f 75 st}.-* {type sou
3150: 72 63 65 20 6c 69 6e 65 20 31 33 36 38 20 66 69 rce line 1368 fi
3160: 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 le info.test cmd
3170: 20 75 70 6c 65 76 65 6c 5c 5c 20 5c 5c 5c 5c 20 uplevel\\ \\\\
3180: 70 72 6f 63 20 3a 3a 74 63 6c 74 65 73 74 3a 3a proc ::tcltest::
3190: 52 75 6e 54 65 73 74 7d 7d 0a 2b 23 20 33 38 2e RunTest}}.+# 38.
31a0: 32 20 6d 6f 76 65 64 20 74 6f 20 62 6f 74 74 6f 2 moved to botto
31b0: 6d 20 74 6f 20 6e 6f 74 20 64 69 73 74 75 72 62 m to not disturb
31c0: 20 6f 74 68 65 72 20 74 65 73 74 73 20 77 69 74 other tests wit
31d0: 68 20 74 68 65 20 6e 65 63 65 73 73 61 72 79 20 h the necessary
31e0: 63 68 61 6e 67 65 73 20 74 6f 20 74 68 69 73 20 changes to this
31f0: 6f 6e 65 2e 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b one..+.+.+.+.+.+
3200: 0a 2b 0a 20 0a 20 74 65 73 74 20 69 6e 66 6f 2d .+. . test info-
3210: 33 38 2e 33 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 38.3 {location i
3220: 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 6f 72 20 75 nformation for u
3230: 70 6c 65 76 65 6c 2c 20 64 70 76 2c 20 64 69 72 plevel, dpv, dir
3240: 65 63 74 2d 70 72 6f 63 2d 76 61 72 7d 20 2d 6d ect-proc-var} -m
3250: 61 74 63 68 20 67 6c 6f 62 20 2d 62 6f 64 79 20 atch glob -body
3260: 7b 0a 20 20 20 20 20 73 65 74 20 73 63 72 69 70 {. set scrip
3270: 74 20 7b 0a 40 40 20 2d 31 33 38 34 2c 31 35 20 t {.@@ -1384,15
3280: 2b 31 33 38 34 2c 31 35 20 40 40 0a 20 2a 20 7b +1384,15 @@. * {
3290: 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 type source line
32a0: 20 31 33 33 39 20 66 69 6c 65 20 69 6e 66 6f 2e 1339 file info.
32b0: 74 65 73 74 20 63 6d 64 20 7b 75 70 6c 65 76 65 test cmd {upleve
32c0: 6c 20 31 20 24 73 63 72 69 70 74 7d 20 70 72 6f l 1 $script} pro
32d0: 63 20 3a 3a 63 6f 6e 74 72 6f 6c 7d 0a 20 2a 20 c ::control}. *
32e0: 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e {type source lin
32f0: 65 20 31 33 38 31 20 66 69 6c 65 20 69 6e 66 6f e 1381 file info
3300: 2e 74 65 73 74 20 63 6d 64 20 7b 63 6f 6e 74 72 .test cmd {contr
3310: 6f 6c 20 79 20 24 73 63 72 69 70 74 7d 20 70 72 ol y $script} pr
3320: 6f 63 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 oc ::tcltest::Ru
3330: 6e 54 65 73 74 7d 7d 0a 20 0a 2d 74 65 73 74 20 nTest}}. .-test
3340: 69 6e 66 6f 2d 33 38 2e 34 20 7b 6c 6f 63 61 74 info-38.4 {locat
3350: 69 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 ion information
3360: 66 6f 72 20 75 70 6c 65 76 65 6c 2c 20 64 70 76 for uplevel, dpv
3370: 2c 20 64 69 72 65 63 74 2d 70 72 6f 63 2d 6c 69 , direct-proc-li
3380: 74 65 72 61 6c 7d 20 2d 6d 61 74 63 68 20 67 6c teral} -match gl
3390: 6f 62 20 2d 62 6f 64 79 20 7b 0a 2d 20 20 20 20 ob -body {.-
33a0: 6a 6f 69 6e 20 5b 6c 72 61 6e 67 65 20 5b 63 6f join [lrange [co
33b0: 6e 74 72 6f 6c 20 79 20 7b 0a 2d 09 73 65 74 20 ntrol y {.-.set
33c0: 79 20 44 50 4c 0a 2d 09 65 74 72 61 63 65 0a 2d y DPL.-.etrace.-
33d0: 20 20 20 20 7d 5d 20 30 20 33 5d 20 5c 6e 0a 2d }] 0 3] \n.-
33e0: 7d 20 2d 72 65 73 75 6c 74 20 7b 2a 20 7b 74 79 } -result {* {ty
33f0: 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 37 pe source line 7
3400: 32 38 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 28 file info.tes
3410: 74 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d t cmd {info fram
3420: 65 20 24 6c 65 76 65 6c 7d 20 70 72 6f 63 20 3a e $level} proc :
3430: 3a 65 74 72 61 63 65 20 6c 65 76 65 6c 20 30 7d :etrace level 0}
3440: 0a 2d 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 .-* {type source
3450: 20 6c 69 6e 65 20 31 33 39 30 20 66 69 6c 65 20 line 1390 file
3460: 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 65 74 info.test cmd et
3470: 72 61 63 65 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 race proc ::cont
3480: 72 6f 6c 7d 0a 2d 2a 20 7b 74 79 70 65 20 73 6f rol}.-* {type so
3490: 75 72 63 65 20 6c 69 6e 65 20 31 33 33 39 20 66 urce line 1339 f
34a0: 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d ile info.test cm
34b0: 64 20 7b 75 70 6c 65 76 65 6c 20 31 20 24 73 63 d {uplevel 1 $sc
34c0: 72 69 70 74 7d 20 70 72 6f 63 20 3a 3a 63 6f 6e ript} proc ::con
34d0: 74 72 6f 6c 7d 0a 2d 2a 20 7b 74 79 70 65 20 73 trol}.-* {type s
34e0: 6f 75 72 63 65 20 6c 69 6e 65 20 31 33 38 38 20 ource line 1388
34f0: 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 file info.test c
3500: 6d 64 20 63 6f 6e 74 72 6f 6c 20 70 72 6f 63 20 md control proc
3510: 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 ::tcltest::RunTe
3520: 73 74 7d 7d 0a 2b 23 20 33 38 2e 34 20 6d 6f 76 st}}.+# 38.4 mov
3530: 65 64 20 74 6f 20 62 6f 74 74 6f 6d 20 74 6f 20 ed to bottom to
3540: 6e 6f 74 20 64 69 73 74 75 72 62 20 6f 74 68 65 not disturb othe
3550: 72 20 74 65 73 74 73 20 77 69 74 68 20 74 68 65 r tests with the
3560: 20 6e 65 63 65 73 73 61 72 79 20 63 68 61 6e 67 necessary chang
3570: 65 73 20 74 6f 20 74 68 69 73 20 6f 6e 65 2e 0a es to this one..
3580: 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a +.+.+.+.+.+.+.+.
3590: 20 0a 20 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e . test info-38.
35a0: 35 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 5 {location info
35b0: 72 6d 61 74 69 6f 6e 20 66 6f 72 20 75 70 6c 65 rmation for uple
35c0: 76 65 6c 2c 20 70 70 76 2c 20 70 72 6f 63 2d 70 vel, ppv, proc-p
35d0: 72 6f 63 2d 76 61 72 7d 20 2d 6d 61 74 63 68 20 roc-var} -match
35e0: 67 6c 6f 62 20 2d 62 6f 64 79 20 7b 0a 20 20 20 glob -body {.
35f0: 20 20 6a 6f 69 6e 20 5b 6c 72 61 6e 67 65 20 5b join [lrange [
3600: 64 61 74 61 76 5d 20 30 20 34 5d 20 5c 6e 0a 40 datav] 0 4] \n.@
3610: 40 20 2d 31 34 30 32 2c 31 33 20 2b 31 34 30 32 @ -1402,13 +1402
3620: 2c 31 33 20 40 40 0a 20 2a 20 7b 74 79 70 65 20 ,13 @@. * {type
3630: 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 33 35 34 source line 1354
3640: 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 file info.test
3650: 63 6d 64 20 7b 63 6f 6e 74 72 6f 6c 20 79 20 24 cmd {control y $
3660: 73 63 72 69 70 74 7d 20 70 72 6f 63 20 3a 3a 64 script} proc ::d
3670: 61 74 61 76 20 6c 65 76 65 6c 20 31 7d 0a 20 2a atav level 1}. *
3680: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
3690: 6e 65 20 31 33 39 38 20 66 69 6c 65 20 69 6e 66 ne 1398 file inf
36a0: 6f 2e 74 65 73 74 20 63 6d 64 20 64 61 74 61 76 o.test cmd datav
36b0: 20 70 72 6f 63 20 3a 3a 74 63 6c 74 65 73 74 3a proc ::tcltest:
36c0: 3a 52 75 6e 54 65 73 74 7d 7d 0a 20 0a 2d 74 65 :RunTest}}. .-te
36d0: 73 74 20 69 6e 66 6f 2d 33 38 2e 36 20 7b 6c 6f st info-38.6 {lo
36e0: 63 61 74 69 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 cation informati
36f0: 6f 6e 20 66 6f 72 20 75 70 6c 65 76 65 6c 2c 20 on for uplevel,
3700: 70 70 6c 2c 20 70 72 6f 63 2d 70 72 6f 63 2d 6c ppl, proc-proc-l
3710: 69 74 65 72 61 6c 7d 20 2d 6d 61 74 63 68 20 67 iteral} -match g
3720: 6c 6f 62 20 2d 62 6f 64 79 20 7b 0a 2d 20 20 20 lob -body {.-
3730: 20 6a 6f 69 6e 20 5b 6c 72 61 6e 67 65 20 5b 64 join [lrange [d
3740: 61 74 61 6c 5d 20 30 20 34 5d 20 5c 6e 0a 2d 7d atal] 0 4] \n.-}
3750: 20 2d 72 65 73 75 6c 74 20 7b 2a 20 7b 74 79 70 -result {* {typ
3760: 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 37 32 e source line 72
3770: 38 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 8 file info.test
3780: 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d 65 cmd {info frame
3790: 20 24 6c 65 76 65 6c 7d 20 70 72 6f 63 20 3a 3a $level} proc ::
37a0: 65 74 72 61 63 65 20 6c 65 76 65 6c 20 30 7d 0a etrace level 0}.
37b0: 2d 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 -* {type source
37c0: 6c 69 6e 65 20 31 33 34 35 20 66 69 6c 65 20 69 line 1345 file i
37d0: 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 65 74 72 nfo.test cmd etr
37e0: 61 63 65 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 72 ace proc ::contr
37f0: 6f 6c 7d 0a 2d 2a 20 7b 74 79 70 65 20 73 6f 75 ol}.-* {type sou
3800: 72 63 65 20 6c 69 6e 65 20 31 33 33 39 20 66 69 rce line 1339 fi
3810: 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 le info.test cmd
3820: 20 7b 75 70 6c 65 76 65 6c 20 31 20 24 73 63 72 {uplevel 1 $scr
3830: 69 70 74 7d 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 ipt} proc ::cont
3840: 72 6f 6c 7d 0a 2d 2a 20 7b 74 79 70 65 20 73 6f rol}.-* {type so
3850: 75 72 63 65 20 6c 69 6e 65 20 31 33 34 33 20 66 urce line 1343 f
3860: 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d ile info.test cm
3870: 64 20 63 6f 6e 74 72 6f 6c 20 70 72 6f 63 20 3a d control proc :
3880: 3a 64 61 74 61 6c 20 6c 65 76 65 6c 20 31 7d 0a :datal level 1}.
3890: 2d 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 -* {type source
38a0: 6c 69 6e 65 20 31 34 30 36 20 66 69 6c 65 20 69 line 1406 file i
38b0: 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 64 61 74 nfo.test cmd dat
38c0: 61 6c 20 70 72 6f 63 20 3a 3a 74 63 6c 74 65 73 al proc ::tcltes
38d0: 74 3a 3a 52 75 6e 54 65 73 74 7d 7d 0a 2b 23 20 t::RunTest}}.+#
38e0: 33 38 2e 36 20 6d 6f 76 65 64 20 74 6f 20 62 6f 38.6 moved to bo
38f0: 74 74 6f 6d 20 74 6f 20 6e 6f 74 20 64 69 73 74 ttom to not dist
3900: 75 72 62 20 6f 74 68 65 72 20 74 65 73 74 73 20 urb other tests
3910: 77 69 74 68 20 74 68 65 20 6e 65 63 65 73 73 61 with the necessa
3920: 72 79 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 ry changes to th
3930: 69 73 20 6f 6e 65 2e 0a 2b 0a 2b 0a 2b 0a 2b 0a is one..+.+.+.+.
3940: 2b 0a 2b 0a 20 0a 20 23 20 2d 2d 2d 2d 2d 2d 2d +.+. . # -------
3950: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3960: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3970: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3980: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3990: 2d 2d 0a 20 23 20 6c 69 74 65 72 61 6c 20 73 68 --. # literal sh
39a0: 61 72 69 6e 67 0a 40 40 20 2d 31 35 33 36 2c 31 aring.@@ -1536,1
39b0: 38 20 2b 31 35 33 36 2c 31 38 20 40 40 0a 20 7d 8 +1536,18 @@. }
39c0: 20 7b 20 20 20 74 79 70 65 20 73 6f 75 72 63 65 { type source
39d0: 20 6c 69 6e 65 20 31 35 33 34 20 66 69 6c 65 20 line 1534 file
39e0: 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b 69 info.test cmd {i
39f0: 6e 66 6f 20 66 72 61 6d 65 20 30 7d 20 70 72 6f nfo frame 0} pro
3a00: 63 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e c ::tcltest::Run
3a10: 54 65 73 74 7d 0a 20 0a 20 74 65 73 74 20 69 6e Test}. . test in
3a20: 66 6f 2d 33 30 2e 31 33 20 7b 62 73 2b 6e 6c 20 fo-30.13 {bs+nl
3a30: 69 6e 20 6c 69 74 65 72 61 6c 20 77 6f 72 64 73 in literal words
3a40: 2c 20 75 70 6c 65 76 65 6c 20 73 63 72 69 70 74 , uplevel script
3a50: 2c 20 77 69 74 68 20 6e 65 73 74 65 64 20 77 6f , with nested wo
3a60: 72 64 73 7d 20 7b 0a 2d 20 20 20 20 75 70 6c 65 rds} {.- uple
3a70: 76 65 6c 20 23 30 20 7b 0a 2b 20 20 20 20 73 75 vel #0 {.+ su
3a80: 62 69 6e 74 65 72 70 20 3b 20 73 65 74 20 72 65 binterp ; set re
3a90: 73 20 5b 69 6e 74 65 72 70 20 65 76 61 6c 20 73 s [interp eval s
3aa0: 75 62 20 7b 20 75 70 6c 65 76 65 6c 20 23 30 20 ub { uplevel #0
3ab0: 7b 0a 20 09 69 66 20 7b 31 7d 20 5c 0a 20 09 20 {. .if {1} \. .
3ac0: 20 20 20 7b 0a 20 09 09 73 65 74 20 3a 3a 72 65 {. ..set ::re
3ad0: 73 20 5c 0a 20 09 09 20 20 20 20 5b 72 65 64 75 s \. .. [redu
3ae0: 63 65 20 5b 69 6e 66 6f 20 66 72 61 6d 65 20 30 ce [info frame 0
3af0: 5d 5d 3b 23 20 6c 69 6e 65 20 31 35 34 33 0a 20 ]];# line 1543.
3b00: 09 20 20 20 20 7d 0a 20 20 20 20 20 7d 0a 2d 20 . }. }.-
3b10: 20 20 20 73 65 74 20 72 65 73 0a 2d 7d 20 7b 74 set res.-} {t
3b20: 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 ype source line
3b30: 31 35 34 33 20 66 69 6c 65 20 69 6e 66 6f 2e 74 1543 file info.t
3b40: 65 73 74 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 est cmd {info fr
3b50: 61 6d 65 20 30 7d 20 70 72 6f 63 20 3a 3a 74 63 ame 0} proc ::tc
3b60: 6c 74 65 73 74 3a 3a 52 75 6e 54 65 73 74 7d 0a ltest::RunTest}.
3b70: 2b 20 20 20 20 73 65 74 20 72 65 73 20 7d 5d 20 + set res }]
3b80: 3b 20 69 6e 74 65 72 70 20 64 65 6c 65 74 65 20 ; interp delete
3b90: 73 75 62 20 3b 20 73 65 74 20 72 65 73 0a 2b 7d sub ; set res.+}
3ba0: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
3bb0: 6e 65 20 31 35 34 33 20 66 69 6c 65 20 69 6e 66 ne 1543 file inf
3bc0: 6f 2e 74 65 73 74 20 63 6d 64 20 7b 69 6e 66 6f o.test cmd {info
3bd0: 20 66 72 61 6d 65 20 30 7d 20 6c 65 76 65 6c 20 frame 0} level
3be0: 30 7d 0a 20 0a 20 74 65 73 74 20 69 6e 66 6f 2d 0}. . test info-
3bf0: 33 30 2e 31 34 20 7b 62 73 2b 6e 6c 2c 20 6c 69 30.14 {bs+nl, li
3c00: 74 65 72 61 6c 20 77 6f 72 64 2c 20 75 70 6c 65 teral word, uple
3c10: 76 65 6c 20 74 68 72 6f 75 67 68 20 70 72 6f 63 vel through proc
3c20: 7d 20 7b 0a 2d 20 20 20 20 70 72 6f 63 20 61 62 } {.- proc ab
3c30: 72 61 20 7b 73 63 72 69 70 74 7d 20 7b 0a 2b 20 ra {script} {.+
3c40: 20 20 20 73 75 62 69 6e 74 65 72 70 20 3b 20 73 subinterp ; s
3c50: 65 74 20 72 65 73 20 5b 69 6e 74 65 72 70 20 65 et res [interp e
3c60: 76 61 6c 20 73 75 62 20 7b 20 70 72 6f 63 20 61 val sub { proc a
3c70: 62 72 61 20 7b 73 63 72 69 70 74 7d 20 7b 0a 20 bra {script} {.
3c80: 09 75 70 6c 65 76 65 6c 20 31 20 24 73 63 72 69 .uplevel 1 $scri
3c90: 70 74 0a 20 20 20 20 20 7d 0a 20 20 20 20 20 73 pt. }. s
3ca0: 65 74 20 72 65 73 20 5b 61 62 72 61 20 7b 0a 40 et res [abra {.@
3cb0: 40 20 2d 31 35 35 35 2c 37 20 2b 31 35 35 35 2c @ -1555,7 +1555,
3cc0: 37 20 40 40 0a 20 5b 72 65 64 75 63 65 20 5b 69 7 @@. [reduce [i
3cd0: 6e 66 6f 20 66 72 61 6d 65 20 30 5d 5d 22 3b 23 nfo frame 0]]";#
3ce0: 20 6c 69 6e 65 20 31 35 35 35 0a 20 20 20 20 20 line 1555.
3cf0: 7d 5d 0a 20 20 20 20 20 72 65 6e 61 6d 65 20 61 }]. rename a
3d00: 62 72 61 20 7b 7d 0a 2d 20 20 20 20 73 65 74 20 bra {}.- set
3d10: 72 65 73 0a 2b 20 20 20 20 73 65 74 20 72 65 73 res.+ set res
3d20: 20 7d 5d 20 3b 20 69 6e 74 65 72 70 20 64 65 6c }] ; interp del
3d30: 65 74 65 20 73 75 62 20 3b 20 73 65 74 20 72 65 ete sub ; set re
3d40: 73 0a 20 7d 20 7b 20 74 79 70 65 20 73 6f 75 72 s. } { type sour
3d50: 63 65 20 6c 69 6e 65 20 31 35 35 35 20 66 69 6c ce line 1555 fil
3d60: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
3d70: 7b 69 6e 66 6f 20 66 72 61 6d 65 20 30 7d 20 70 {info frame 0} p
3d80: 72 6f 63 20 3a 3a 61 62 72 61 7d 0a 20 0a 20 74 roc ::abra}. . t
3d90: 65 73 74 20 69 6e 66 6f 2d 33 30 2e 31 35 20 7b est info-30.15 {
3da0: 62 73 2b 6e 6c 20 69 6e 20 6c 69 74 65 72 61 6c bs+nl in literal
3db0: 20 77 6f 72 64 73 2c 20 6e 65 73 74 65 64 20 70 words, nested p
3dc0: 72 6f 63 20 62 6f 64 79 2c 20 63 6f 6d 70 69 6c roc body, compil
3dd0: 65 64 7d 20 7b 0a 40 40 20 2d 31 37 34 32 2c 36 ed} {.@@ -1742,6
3de0: 20 2b 31 37 34 32 2c 38 31 20 40 40 0a 20 74 79 +1742,81 @@. ty
3df0: 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 pe source line 1
3e00: 37 32 32 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 722 file info.te
3e10: 73 74 20 63 6d 64 20 70 72 69 6e 74 5f 6f 6e 65 st cmd print_one
3e20: 20 70 72 6f 63 20 3a 3a 74 65 73 74 5f 69 6e 66 proc ::test_inf
3e30: 6f 5f 66 72 61 6d 65 20 6c 65 76 65 6c 20 31 7d o_frame level 1}
3e40: 0a 20 0a 20 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d . . # ----------
3e50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a ---------------.
3e90: 2b 23 20 54 65 73 74 73 20 6d 6f 76 65 64 20 74 +# Tests moved t
3ea0: 6f 20 74 68 65 20 65 6e 64 20 74 6f 20 6e 6f 74 o the end to not
3eb0: 20 64 69 73 74 75 72 62 20 6f 74 68 65 72 20 74 disturb other t
3ec0: 65 73 74 73 20 61 6e 64 20 74 68 65 69 72 20 6c ests and their l
3ed0: 6f 63 61 74 69 6f 6e 73 2e 0a 2b 0a 2b 74 65 73 ocations..+.+tes
3ee0: 74 20 69 6e 66 6f 2d 33 38 2e 36 20 7b 6c 6f 63 t info-38.6 {loc
3ef0: 61 74 69 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 6f ation informatio
3f00: 6e 20 66 6f 72 20 75 70 6c 65 76 65 6c 2c 20 70 n for uplevel, p
3f10: 70 6c 2c 20 70 72 6f 63 2d 70 72 6f 63 2d 6c 69 pl, proc-proc-li
3f20: 74 65 72 61 6c 7d 20 2d 6d 61 74 63 68 20 67 6c teral} -match gl
3f30: 6f 62 20 2d 73 65 74 75 70 20 7b 73 75 62 69 6e ob -setup {subin
3f40: 74 65 72 70 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 terp} -body {.+
3f50: 20 20 20 69 6e 74 65 72 70 20 65 76 61 6c 20 73 interp eval s
3f60: 75 62 20 7b 0a 2b 09 70 72 6f 63 20 65 74 72 61 ub {.+.proc etra
3f70: 63 65 20 7b 7d 20 7b 0a 2b 09 20 20 20 20 73 65 ce {} {.+. se
3f80: 74 20 72 65 73 20 7b 7d 0a 2b 09 20 20 20 20 73 t res {}.+. s
3f90: 65 74 20 6c 65 76 65 6c 20 5b 69 6e 66 6f 20 66 et level [info f
3fa0: 72 61 6d 65 5d 0a 2b 09 20 20 20 20 77 68 69 6c rame].+. whil
3fb0: 65 20 7b 24 6c 65 76 65 6c 7d 20 7b 0a 2b 09 09 e {$level} {.+..
3fc0: 6c 61 70 70 65 6e 64 20 72 65 73 20 5b 6c 69 73 lappend res [lis
3fd0: 74 20 24 6c 65 76 65 6c 20 5b 72 65 64 75 63 65 t $level [reduce
3fe0: 20 5b 69 6e 66 6f 20 66 72 61 6d 65 20 24 6c 65 [info frame $le
3ff0: 76 65 6c 5d 5d 5d 0a 2b 09 09 69 6e 63 72 20 6c vel]]].+..incr l
4000: 65 76 65 6c 20 2d 31 0a 2b 09 20 20 20 20 7d 0a evel -1.+. }.
4010: 2b 09 20 20 20 20 72 65 74 75 72 6e 20 24 72 65 +. return $re
4020: 73 0a 2b 09 7d 0a 2b 09 70 72 6f 63 20 63 6f 6e s.+.}.+.proc con
4030: 74 72 6f 6c 20 7b 76 76 20 73 63 72 69 70 74 7d trol {vv script}
4040: 20 7b 0a 2b 09 20 20 20 20 75 70 76 61 72 20 31 {.+. upvar 1
4050: 20 24 76 76 20 76 61 72 0a 2b 09 20 20 20 20 72 $vv var.+. r
4060: 65 74 75 72 6e 20 5b 75 70 6c 65 76 65 6c 20 31 eturn [uplevel 1
4070: 20 24 73 63 72 69 70 74 5d 0a 2b 09 7d 0a 2b 09 $script].+.}.+.
4080: 70 72 6f 63 20 64 61 74 61 6c 20 7b 7d 20 7b 0a proc datal {} {.
4090: 2b 09 20 20 20 20 63 6f 6e 74 72 6f 6c 20 79 20 +. control y
40a0: 7b 0a 2b 09 09 73 65 74 20 79 20 50 50 4c 0a 2b {.+..set y PPL.+
40b0: 09 09 65 74 72 61 63 65 0a 2b 09 20 20 20 20 7d ..etrace.+. }
40c0: 0a 2b 09 7d 0a 2b 09 6a 6f 69 6e 20 5b 6c 72 61 .+.}.+.join [lra
40d0: 6e 67 65 20 5b 64 61 74 61 6c 5d 20 30 20 34 5d nge [datal] 0 4]
40e0: 20 5c 6e 0a 2b 20 20 20 20 7d 0a 2b 7d 20 2d 72 \n.+ }.+} -r
40f0: 65 73 75 6c 74 20 7b 2a 20 7b 74 79 70 65 20 73 esult {* {type s
4100: 6f 75 72 63 65 20 6c 69 6e 65 20 31 37 35 33 20 ource line 1753
4110: 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 file info.test c
4120: 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d 65 20 24 md {info frame $
4130: 6c 65 76 65 6c 7d 20 70 72 6f 63 20 3a 3a 65 74 level} proc ::et
4140: 72 61 63 65 20 6c 65 76 65 6c 20 30 7d 0a 2b 2a race level 0}.+*
4150: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
4160: 6e 65 20 31 37 36 35 20 66 69 6c 65 20 69 6e 66 ne 1765 file inf
4170: 6f 2e 74 65 73 74 20 63 6d 64 20 65 74 72 61 63 o.test cmd etrac
4180: 65 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 72 6f 6c e proc ::control
4190: 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 }.+* {type sourc
41a0: 65 20 6c 69 6e 65 20 31 37 36 30 20 66 69 6c 65 e line 1760 file
41b0: 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b info.test cmd {
41c0: 75 70 6c 65 76 65 6c 20 31 20 24 73 63 72 69 70 uplevel 1 $scrip
41d0: 74 7d 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 72 6f t} proc ::contro
41e0: 6c 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 l}.+* {type sour
41f0: 63 65 20 6c 69 6e 65 20 31 37 36 33 20 66 69 6c ce line 1763 fil
4200: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
4210: 63 6f 6e 74 72 6f 6c 20 70 72 6f 63 20 3a 3a 64 control proc ::d
4220: 61 74 61 6c 20 6c 65 76 65 6c 20 31 7d 0a 2b 2a atal level 1}.+*
4230: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
4240: 6e 65 20 31 37 36 38 20 66 69 6c 65 20 69 6e 66 ne 1768 file inf
4250: 6f 2e 74 65 73 74 20 63 6d 64 20 64 61 74 61 6c o.test cmd datal
4260: 20 6c 65 76 65 6c 20 32 7d 7d 20 2d 63 6c 65 61 level 2}} -clea
4270: 6e 75 70 20 7b 69 6e 74 65 72 70 20 64 65 6c 65 nup {interp dele
4280: 74 65 20 73 75 62 7d 0a 2b 0a 2b 74 65 73 74 20 te sub}.+.+test
4290: 69 6e 66 6f 2d 33 38 2e 34 20 7b 6c 6f 63 61 74 info-38.4 {locat
42a0: 69 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 ion information
42b0: 66 6f 72 20 75 70 6c 65 76 65 6c 2c 20 64 70 76 for uplevel, dpv
42c0: 2c 20 64 69 72 65 63 74 2d 70 72 6f 63 2d 6c 69 , direct-proc-li
42d0: 74 65 72 61 6c 7d 20 2d 6d 61 74 63 68 20 67 6c teral} -match gl
42e0: 6f 62 20 2d 73 65 74 75 70 20 7b 73 75 62 69 6e ob -setup {subin
42f0: 74 65 72 70 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 terp} -body {.+
4300: 20 20 20 69 6e 74 65 72 70 20 65 76 61 6c 20 73 interp eval s
4310: 75 62 20 7b 0a 2b 09 70 72 6f 63 20 65 74 72 61 ub {.+.proc etra
4320: 63 65 20 7b 7d 20 7b 0a 2b 09 20 20 20 20 73 65 ce {} {.+. se
4330: 74 20 72 65 73 20 7b 7d 0a 2b 09 20 20 20 20 73 t res {}.+. s
4340: 65 74 20 6c 65 76 65 6c 20 5b 69 6e 66 6f 20 66 et level [info f
4350: 72 61 6d 65 5d 0a 2b 09 20 20 20 20 77 68 69 6c rame].+. whil
4360: 65 20 7b 24 6c 65 76 65 6c 7d 20 7b 0a 2b 09 09 e {$level} {.+..
4370: 6c 61 70 70 65 6e 64 20 72 65 73 20 5b 6c 69 73 lappend res [lis
4380: 74 20 24 6c 65 76 65 6c 20 5b 72 65 64 75 63 65 t $level [reduce
4390: 20 5b 69 6e 66 6f 20 66 72 61 6d 65 20 24 6c 65 [info frame $le
43a0: 76 65 6c 5d 5d 5d 0a 2b 09 09 69 6e 63 72 20 6c vel]]].+..incr l
43b0: 65 76 65 6c 20 2d 31 0a 2b 09 20 20 20 20 7d 0a evel -1.+. }.
43c0: 2b 09 20 20 20 20 72 65 74 75 72 6e 20 24 72 65 +. return $re
43d0: 73 0a 2b 09 7d 0a 2b 09 70 72 6f 63 20 63 6f 6e s.+.}.+.proc con
43e0: 74 72 6f 6c 20 7b 76 76 20 73 63 72 69 70 74 7d trol {vv script}
43f0: 20 7b 0a 2b 09 20 20 20 20 75 70 76 61 72 20 31 {.+. upvar 1
4400: 20 24 76 76 20 76 61 72 0a 2b 09 20 20 20 20 72 $vv var.+. r
4410: 65 74 75 72 6e 20 5b 75 70 6c 65 76 65 6c 20 31 eturn [uplevel 1
4420: 20 24 73 63 72 69 70 74 5d 0a 2b 09 7d 0a 2b 09 $script].+.}.+.
4430: 6a 6f 69 6e 20 5b 6c 72 61 6e 67 65 20 5b 63 6f join [lrange [co
4440: 6e 74 72 6f 6c 20 79 20 7b 0a 2b 09 20 20 20 20 ntrol y {.+.
4450: 73 65 74 20 79 20 44 50 4c 0a 2b 09 20 20 20 20 set y DPL.+.
4460: 65 74 72 61 63 65 0a 2b 09 7d 5d 20 30 20 33 5d etrace.+.}] 0 3]
4470: 20 5c 6e 0a 2b 20 20 20 20 7d 0a 2b 7d 20 2d 72 \n.+ }.+} -r
4480: 65 73 75 6c 74 20 7b 2a 20 7b 74 79 70 65 20 73 esult {* {type s
4490: 6f 75 72 63 65 20 6c 69 6e 65 20 31 37 38 32 20 ource line 1782
44a0: 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 file info.test c
44b0: 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d 65 20 24 md {info frame $
44c0: 6c 65 76 65 6c 7d 20 70 72 6f 63 20 3a 3a 65 74 level} proc ::et
44d0: 72 61 63 65 20 6c 65 76 65 6c 20 30 7d 0a 2b 2a race level 0}.+*
44e0: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
44f0: 6e 65 20 31 37 39 33 20 66 69 6c 65 20 69 6e 66 ne 1793 file inf
4500: 6f 2e 74 65 73 74 20 63 6d 64 20 65 74 72 61 63 o.test cmd etrac
4510: 65 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 72 6f 6c e proc ::control
4520: 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 }.+* {type sourc
4530: 65 20 6c 69 6e 65 20 31 37 38 39 20 66 69 6c 65 e line 1789 file
4540: 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b info.test cmd {
4550: 75 70 6c 65 76 65 6c 20 31 20 24 73 63 72 69 70 uplevel 1 $scrip
4560: 74 7d 20 70 72 6f 63 20 3a 3a 63 6f 6e 74 72 6f t} proc ::contro
4570: 6c 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 l}.+* {type sour
4580: 63 65 20 6c 69 6e 65 20 31 37 39 31 20 66 69 6c ce line 1791 fil
4590: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
45a0: 63 6f 6e 74 72 6f 6c 20 6c 65 76 65 6c 20 31 7d control level 1}
45b0: 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 69 6e 74 65 } -cleanup {inte
45c0: 72 70 20 64 65 6c 65 74 65 20 73 75 62 7d 0a 2b rp delete sub}.+
45d0: 0a 2b 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e 32 .+test info-38.2
45e0: 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 72 {location infor
45f0: 6d 61 74 69 6f 6e 20 66 6f 72 20 75 70 6c 65 76 mation for uplev
4600: 65 6c 2c 20 64 6c 2c 20 64 69 72 65 63 74 2d 6c el, dl, direct-l
4610: 69 74 65 72 61 6c 7d 20 2d 6d 61 74 63 68 20 67 iteral} -match g
4620: 6c 6f 62 20 2d 73 65 74 75 70 20 7b 73 75 62 69 lob -setup {subi
4630: 6e 74 65 72 70 7d 20 2d 62 6f 64 79 20 7b 0a 2b nterp} -body {.+
4640: 20 20 20 20 69 6e 74 65 72 70 20 65 76 61 6c 20 interp eval
4650: 73 75 62 20 7b 0a 2b 09 70 72 6f 63 20 65 74 72 sub {.+.proc etr
4660: 61 63 65 20 7b 7d 20 7b 0a 2b 09 20 20 20 20 73 ace {} {.+. s
4670: 65 74 20 72 65 73 20 7b 7d 0a 2b 09 20 20 20 20 et res {}.+.
4680: 73 65 74 20 6c 65 76 65 6c 20 5b 69 6e 66 6f 20 set level [info
4690: 66 72 61 6d 65 5d 0a 2b 09 20 20 20 20 77 68 69 frame].+. whi
46a0: 6c 65 20 7b 24 6c 65 76 65 6c 7d 20 7b 0a 2b 09 le {$level} {.+.
46b0: 09 6c 61 70 70 65 6e 64 20 72 65 73 20 5b 6c 69 .lappend res [li
46c0: 73 74 20 24 6c 65 76 65 6c 20 5b 72 65 64 75 63 st $level [reduc
46d0: 65 20 5b 69 6e 66 6f 20 66 72 61 6d 65 20 24 6c e [info frame $l
46e0: 65 76 65 6c 5d 5d 5d 0a 2b 09 09 69 6e 63 72 20 evel]]].+..incr
46f0: 6c 65 76 65 6c 20 2d 31 0a 2b 09 20 20 20 20 7d level -1.+. }
4700: 0a 2b 09 20 20 20 20 72 65 74 75 72 6e 20 24 72 .+. return $r
4710: 65 73 0a 2b 09 7d 0a 2b 09 6a 6f 69 6e 20 5b 6c es.+.}.+.join [l
4720: 72 61 6e 67 65 20 5b 75 70 6c 65 76 65 6c 20 5c range [uplevel \
4730: 23 30 20 7b 0a 2b 09 20 20 20 20 73 65 74 20 79 #0 {.+. set y
4740: 20 44 4c 2e 0a 2b 09 20 20 20 20 65 74 72 61 63 DL..+. etrac
4750: 65 0a 2b 09 7d 5d 20 30 20 32 5d 20 5c 6e 0a 2b e.+.}] 0 2] \n.+
4760: 20 20 20 20 7d 0a 2b 7d 20 2d 72 65 73 75 6c 74 }.+} -result
4770: 20 7b 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 {* {type source
4780: 20 6c 69 6e 65 20 31 38 30 37 20 66 69 6c 65 20 line 1807 file
4790: 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b 69 info.test cmd {i
47a0: 6e 66 6f 20 66 72 61 6d 65 20 24 6c 65 76 65 6c nfo frame $level
47b0: 7d 20 70 72 6f 63 20 3a 3a 65 74 72 61 63 65 20 } proc ::etrace
47c0: 6c 65 76 65 6c 20 30 7d 0a 2b 2a 20 7b 74 79 70 level 0}.+* {typ
47d0: 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 38 e source line 18
47e0: 31 34 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 14 file info.tes
47f0: 74 20 63 6d 64 20 65 74 72 61 63 65 20 6c 65 76 t cmd etrace lev
4800: 65 6c 20 31 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 el 1}.+* {type s
4810: 6f 75 72 63 65 20 6c 69 6e 65 20 31 38 31 32 20 ource line 1812
4820: 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 file info.test c
4830: 6d 64 20 75 70 6c 65 76 65 6c 5c 5c 20 5c 5c 5c md uplevel\\ \\\
4840: 5c 20 6c 65 76 65 6c 20 31 7d 7d 20 2d 63 6c 65 \ level 1}} -cle
4850: 61 6e 75 70 20 7b 69 6e 74 65 72 70 20 64 65 6c anup {interp del
4860: 65 74 65 20 73 75 62 7d 0a 20 0a 20 23 20 63 6c ete sub}. . # cl
4870: 65 61 6e 75 70 0a 20 63 61 74 63 68 20 7b 6e 61 eanup. catch {na
4880: 6d 65 73 70 61 63 65 20 64 65 6c 65 74 65 20 74 mespace delete t
4890: 65 73 74 5f 6e 73 5f 69 6e 66 6f 31 20 74 65 73 est_ns_info1 tes
48a0: 74 5f 6e 73 5f 69 6e 66 6f 32 7d 0a 2d 2d 2d 20 t_ns_info2}.---
48b0: 74 63 6c 38 35 2e 6f 72 69 67 2f 74 65 73 74 73 tcl85.orig/tests
48c0: 2f 69 6e 74 65 72 70 2e 74 65 73 74 09 32 30 31 /interp.test.201
48d0: 30 2d 30 31 2d 31 38 20 31 32 3a 32 34 3a 31 39 0-01-18 12:24:19
48e0: 2e 30 30 30 30 30 30 30 30 30 20 2d 30 38 30 30 .000000000 -0800
48f0: 0a 2b 2b 2b 20 74 63 6c 38 35 2f 74 65 73 74 73 .+++ tcl85/tests
4900: 2f 69 6e 74 65 72 70 2e 74 65 73 74 09 32 30 31 /interp.test.201
4910: 30 2d 31 30 2d 30 34 20 31 35 3a 35 32 3a 31 30 0-10-04 15:52:10
4920: 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 .000000000 -0700
4930: 0a 40 40 20 2d 33 31 2c 37 20 2b 33 31 2c 37 20 .@@ -31,7 +31,7
4940: 40 40 0a 20 7d 20 7b 31 20 7b 77 72 6f 6e 67 20 @@. } {1 {wrong
4950: 23 20 61 72 67 73 3a 20 73 68 6f 75 6c 64 20 62 # args: should b
4960: 65 20 22 69 6e 74 65 72 70 20 63 6d 64 20 3f 61 e "interp cmd ?a
4970: 72 67 20 2e 2e 2e 3f 22 7d 7d 0a 20 74 65 73 74 rg ...?"}}. test
4980: 20 69 6e 74 65 72 70 2d 31 2e 32 20 7b 6f 70 74 interp-1.2 {opt
4990: 69 6f 6e 73 20 66 6f 72 20 69 6e 74 65 72 70 20 ions for interp
49a0: 63 6f 6d 6d 61 6e 64 7d 20 7b 0a 20 20 20 20 20 command} {.
49b0: 6c 69 73 74 20 5b 63 61 74 63 68 20 7b 69 6e 74 list [catch {int
49c0: 65 72 70 20 66 72 6f 62 6f 78 7d 20 6d 73 67 5d erp frobox} msg]
49d0: 20 24 6d 73 67 0a 2d 7d 20 7b 31 20 7b 62 61 64 $msg.-} {1 {bad
49e0: 20 6f 70 74 69 6f 6e 20 22 66 72 6f 62 6f 78 22 option "frobox"
49f0: 3a 20 6d 75 73 74 20 62 65 20 61 6c 69 61 73 2c : must be alias,
4a00: 20 61 6c 69 61 73 65 73 2c 20 62 67 65 72 72 6f aliases, bgerro
4a10: 72 2c 20 63 72 65 61 74 65 2c 20 64 65 6c 65 74 r, create, delet
4a20: 65 2c 20 65 76 61 6c 2c 20 65 78 69 73 74 73 2c e, eval, exists,
4a30: 20 65 78 70 6f 73 65 2c 20 68 69 64 65 2c 20 68 expose, hide, h
4a40: 69 64 64 65 6e 2c 20 69 73 73 61 66 65 2c 20 69 idden, issafe, i
4a50: 6e 76 6f 6b 65 68 69 64 64 65 6e 2c 20 6c 69 6d nvokehidden, lim
4a60: 69 74 2c 20 6d 61 72 6b 74 72 75 73 74 65 64 2c it, marktrusted,
4a70: 20 72 65 63 75 72 73 69 6f 6e 6c 69 6d 69 74 2c recursionlimit,
4a80: 20 73 6c 61 76 65 73 2c 20 73 68 61 72 65 2c 20 slaves, share,
4a90: 74 61 72 67 65 74 2c 20 6f 72 20 74 72 61 6e 73 target, or trans
4aa0: 66 65 72 7d 7d 0a 2b 7d 20 7b 31 20 7b 62 61 64 fer}}.+} {1 {bad
4ab0: 20 6f 70 74 69 6f 6e 20 22 66 72 6f 62 6f 78 22 option "frobox"
4ac0: 3a 20 6d 75 73 74 20 62 65 20 61 6c 69 61 73 2c : must be alias,
4ad0: 20 61 6c 69 61 73 65 73 2c 20 62 67 65 72 72 6f aliases, bgerro
4ae0: 72 2c 20 63 72 65 61 74 65 2c 20 64 65 62 75 67 r, create, debug
4af0: 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 6c 2c 20 , delete, eval,
4b00: 65 78 69 73 74 73 2c 20 65 78 70 6f 73 65 2c 20 exists, expose,
4b10: 68 69 64 65 2c 20 68 69 64 64 65 6e 2c 20 69 73 hide, hidden, is
4b20: 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 69 64 64 safe, invokehidd
4b30: 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 6b 74 en, limit, markt
4b40: 72 75 73 74 65 64 2c 20 72 65 63 75 72 73 69 6f rusted, recursio
4b50: 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 73 2c 20 nlimit, slaves,
4b60: 73 68 61 72 65 2c 20 74 61 72 67 65 74 2c 20 6f share, target, o
4b70: 72 20 74 72 61 6e 73 66 65 72 7d 7d 0a 20 74 65 r transfer}}. te
4b80: 73 74 20 69 6e 74 65 72 70 2d 31 2e 33 20 7b 6f st interp-1.3 {o
4b90: 70 74 69 6f 6e 73 20 66 6f 72 20 69 6e 74 65 72 ptions for inter
4ba0: 70 20 63 6f 6d 6d 61 6e 64 7d 20 7b 0a 20 20 20 p command} {.
4bb0: 20 20 69 6e 74 65 72 70 20 64 65 6c 65 74 65 0a interp delete.
4bc0: 20 7d 20 22 22 0a 40 40 20 2d 34 39 2c 31 33 20 } "".@@ -49,13
4bd0: 2b 34 39 2c 31 33 20 40 40 0a 20 7d 20 7b 31 20 +49,13 @@. } {1
4be0: 7b 77 72 6f 6e 67 20 23 20 61 72 67 73 3a 20 73 {wrong # args: s
4bf0: 68 6f 75 6c 64 20 62 65 20 22 69 6e 74 65 72 70 hould be "interp
4c00: 20 73 6c 61 76 65 73 20 3f 70 61 74 68 3f 22 7d slaves ?path?"}
4c10: 7d 0a 20 74 65 73 74 20 69 6e 74 65 72 70 2d 31 }. test interp-1
4c20: 2e 37 20 7b 6f 70 74 69 6f 6e 73 20 66 6f 72 20 .7 {options for
4c30: 69 6e 74 65 72 70 20 63 6f 6d 6d 61 6e 64 7d 20 interp command}
4c40: 7b 0a 20 20 20 20 20 6c 69 73 74 20 5b 63 61 74 {. list [cat
4c50: 63 68 20 7b 69 6e 74 65 72 70 20 68 65 6c 6c 6f ch {interp hello
4c60: 7d 20 6d 73 67 5d 20 24 6d 73 67 0a 2d 7d 20 7b } msg] $msg.-} {
4c70: 31 20 7b 62 61 64 20 6f 70 74 69 6f 6e 20 22 68 1 {bad option "h
4c80: 65 6c 6c 6f 22 3a 20 6d 75 73 74 20 62 65 20 61 ello": must be a
4c90: 6c 69 61 73 2c 20 61 6c 69 61 73 65 73 2c 20 62 lias, aliases, b
4ca0: 67 65 72 72 6f 72 2c 20 63 72 65 61 74 65 2c 20 gerror, create,
4cb0: 64 65 6c 65 74 65 2c 20 65 76 61 6c 2c 20 65 78 delete, eval, ex
4cc0: 69 73 74 73 2c 20 65 78 70 6f 73 65 2c 20 68 69 ists, expose, hi
4cd0: 64 65 2c 20 68 69 64 64 65 6e 2c 20 69 73 73 61 de, hidden, issa
4ce0: 66 65 2c 20 69 6e 76 6f 6b 65 68 69 64 64 65 6e fe, invokehidden
4cf0: 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 6b 74 72 75 , limit, marktru
4d00: 73 74 65 64 2c 20 72 65 63 75 72 73 69 6f 6e 6c sted, recursionl
4d10: 69 6d 69 74 2c 20 73 6c 61 76 65 73 2c 20 73 68 imit, slaves, sh
4d20: 61 72 65 2c 20 74 61 72 67 65 74 2c 20 6f 72 20 are, target, or
4d30: 74 72 61 6e 73 66 65 72 7d 7d 0a 2b 7d 20 7b 31 transfer}}.+} {1
4d40: 20 7b 62 61 64 20 6f 70 74 69 6f 6e 20 22 68 65 {bad option "he
4d50: 6c 6c 6f 22 3a 20 6d 75 73 74 20 62 65 20 61 6c llo": must be al
4d60: 69 61 73 2c 20 61 6c 69 61 73 65 73 2c 20 62 67 ias, aliases, bg
4d70: 65 72 72 6f 72 2c 20 63 72 65 61 74 65 2c 20 64 error, create, d
4d80: 65 62 75 67 2c 20 64 65 6c 65 74 65 2c 20 65 76 ebug, delete, ev
4d90: 61 6c 2c 20 65 78 69 73 74 73 2c 20 65 78 70 6f al, exists, expo
4da0: 73 65 2c 20 68 69 64 65 2c 20 68 69 64 64 65 6e se, hide, hidden
4db0: 2c 20 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 , issafe, invoke
4dc0: 68 69 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d hidden, limit, m
4dd0: 61 72 6b 74 72 75 73 74 65 64 2c 20 72 65 63 75 arktrusted, recu
4de0: 72 73 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 rsionlimit, slav
4df0: 65 73 2c 20 73 68 61 72 65 2c 20 74 61 72 67 65 es, share, targe
4e00: 74 2c 20 6f 72 20 74 72 61 6e 73 66 65 72 7d 7d t, or transfer}}
4e10: 0a 20 74 65 73 74 20 69 6e 74 65 72 70 2d 31 2e . test interp-1.
4e20: 38 20 7b 6f 70 74 69 6f 6e 73 20 66 6f 72 20 69 8 {options for i
4e30: 6e 74 65 72 70 20 63 6f 6d 6d 61 6e 64 7d 20 7b nterp command} {
4e40: 0a 20 20 20 20 20 6c 69 73 74 20 5b 63 61 74 63 . list [catc
4e50: 68 20 7b 69 6e 74 65 72 70 20 2d 66 72 6f 62 6f h {interp -frobo
4e60: 7a 7d 20 6d 73 67 5d 20 24 6d 73 67 0a 2d 7d 20 z} msg] $msg.-}
4e70: 7b 31 20 7b 62 61 64 20 6f 70 74 69 6f 6e 20 22 {1 {bad option "
4e80: 2d 66 72 6f 62 6f 7a 22 3a 20 6d 75 73 74 20 62 -froboz": must b
4e90: 65 20 61 6c 69 61 73 2c 20 61 6c 69 61 73 65 73 e alias, aliases
4ea0: 2c 20 62 67 65 72 72 6f 72 2c 20 63 72 65 61 74 , bgerror, creat
4eb0: 65 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 6c 2c e, delete, eval,
4ec0: 20 65 78 69 73 74 73 2c 20 65 78 70 6f 73 65 2c exists, expose,
4ed0: 20 68 69 64 65 2c 20 68 69 64 64 65 6e 2c 20 69 hide, hidden, i
4ee0: 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 69 64 ssafe, invokehid
4ef0: 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 6b den, limit, mark
4f00: 74 72 75 73 74 65 64 2c 20 72 65 63 75 72 73 69 trusted, recursi
4f10: 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 73 2c onlimit, slaves,
4f20: 20 73 68 61 72 65 2c 20 74 61 72 67 65 74 2c 20 share, target,
4f30: 6f 72 20 74 72 61 6e 73 66 65 72 7d 7d 0a 2b 7d or transfer}}.+}
4f40: 20 7b 31 20 7b 62 61 64 20 6f 70 74 69 6f 6e 20 {1 {bad option
4f50: 22 2d 66 72 6f 62 6f 7a 22 3a 20 6d 75 73 74 20 "-froboz": must
4f60: 62 65 20 61 6c 69 61 73 2c 20 61 6c 69 61 73 65 be alias, aliase
4f70: 73 2c 20 62 67 65 72 72 6f 72 2c 20 63 72 65 61 s, bgerror, crea
4f80: 74 65 2c 20 64 65 62 75 67 2c 20 64 65 6c 65 74 te, debug, delet
4f90: 65 2c 20 65 76 61 6c 2c 20 65 78 69 73 74 73 2c e, eval, exists,
4fa0: 20 65 78 70 6f 73 65 2c 20 68 69 64 65 2c 20 68 expose, hide, h
4fb0: 69 64 64 65 6e 2c 20 69 73 73 61 66 65 2c 20 69 idden, issafe, i
4fc0: 6e 76 6f 6b 65 68 69 64 64 65 6e 2c 20 6c 69 6d nvokehidden, lim
4fd0: 69 74 2c 20 6d 61 72 6b 74 72 75 73 74 65 64 2c it, marktrusted,
4fe0: 20 72 65 63 75 72 73 69 6f 6e 6c 69 6d 69 74 2c recursionlimit,
4ff0: 20 73 6c 61 76 65 73 2c 20 73 68 61 72 65 2c 20 slaves, share,
5000: 74 61 72 67 65 74 2c 20 6f 72 20 74 72 61 6e 73 target, or trans
5010: 66 65 72 7d 7d 0a 20 74 65 73 74 20 69 6e 74 65 fer}}. test inte
5020: 72 70 2d 31 2e 39 20 7b 6f 70 74 69 6f 6e 73 20 rp-1.9 {options
5030: 66 6f 72 20 69 6e 74 65 72 70 20 63 6f 6d 6d 61 for interp comma
5040: 6e 64 7d 20 7b 0a 20 20 20 20 20 6c 69 73 74 20 nd} {. list
5050: 5b 63 61 74 63 68 20 7b 69 6e 74 65 72 70 20 2d [catch {interp -
5060: 66 72 6f 62 6f 7a 20 2d 73 61 66 65 7d 20 6d 73 froboz -safe} ms
5070: 67 5d 20 24 6d 73 67 0a 2d 7d 20 7b 31 20 7b 62 g] $msg.-} {1 {b
5080: 61 64 20 6f 70 74 69 6f 6e 20 22 2d 66 72 6f 62 ad option "-frob
5090: 6f 7a 22 3a 20 6d 75 73 74 20 62 65 20 61 6c 69 oz": must be ali
50a0: 61 73 2c 20 61 6c 69 61 73 65 73 2c 20 62 67 65 as, aliases, bge
50b0: 72 72 6f 72 2c 20 63 72 65 61 74 65 2c 20 64 65 rror, create, de
50c0: 6c 65 74 65 2c 20 65 76 61 6c 2c 20 65 78 69 73 lete, eval, exis
50d0: 74 73 2c 20 65 78 70 6f 73 65 2c 20 68 69 64 65 ts, expose, hide
50e0: 2c 20 68 69 64 64 65 6e 2c 20 69 73 73 61 66 65 , hidden, issafe
50f0: 2c 20 69 6e 76 6f 6b 65 68 69 64 64 65 6e 2c 20 , invokehidden,
5100: 6c 69 6d 69 74 2c 20 6d 61 72 6b 74 72 75 73 74 limit, marktrust
5110: 65 64 2c 20 72 65 63 75 72 73 69 6f 6e 6c 69 6d ed, recursionlim
5120: 69 74 2c 20 73 6c 61 76 65 73 2c 20 73 68 61 72 it, slaves, shar
5130: 65 2c 20 74 61 72 67 65 74 2c 20 6f 72 20 74 72 e, target, or tr
5140: 61 6e 73 66 65 72 7d 7d 20 0a 2b 7d 20 7b 31 20 ansfer}} .+} {1
5150: 7b 62 61 64 20 6f 70 74 69 6f 6e 20 22 2d 66 72 {bad option "-fr
5160: 6f 62 6f 7a 22 3a 20 6d 75 73 74 20 62 65 20 61 oboz": must be a
5170: 6c 69 61 73 2c 20 61 6c 69 61 73 65 73 2c 20 62 lias, aliases, b
5180: 67 65 72 72 6f 72 2c 20 63 72 65 61 74 65 2c 20 gerror, create,
5190: 64 65 62 75 67 2c 20 64 65 6c 65 74 65 2c 20 65 debug, delete, e
51a0: 76 61 6c 2c 20 65 78 69 73 74 73 2c 20 65 78 70 val, exists, exp
51b0: 6f 73 65 2c 20 68 69 64 65 2c 20 68 69 64 64 65 ose, hide, hidde
51c0: 6e 2c 20 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b n, issafe, invok
51d0: 65 68 69 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 ehidden, limit,
51e0: 6d 61 72 6b 74 72 75 73 74 65 64 2c 20 72 65 63 marktrusted, rec
51f0: 75 72 73 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 ursionlimit, sla
5200: 76 65 73 2c 20 73 68 61 72 65 2c 20 74 61 72 67 ves, share, targ
5210: 65 74 2c 20 6f 72 20 74 72 61 6e 73 66 65 72 7d et, or transfer}
5220: 7d 20 0a 20 74 65 73 74 20 69 6e 74 65 72 70 2d } . test interp-
5230: 31 2e 31 30 20 7b 6f 70 74 69 6f 6e 73 20 66 6f 1.10 {options fo
5240: 72 20 69 6e 74 65 72 70 20 63 6f 6d 6d 61 6e 64 r interp command
5250: 7d 20 7b 0a 20 20 20 20 20 6c 69 73 74 20 5b 63 } {. list [c
5260: 61 74 63 68 20 7b 69 6e 74 65 72 70 20 74 61 72 atch {interp tar
5270: 67 65 74 7d 20 6d 73 67 5d 20 24 6d 73 67 0a 20 get} msg] $msg.
5280: 7d 20 7b 31 20 7b 77 72 6f 6e 67 20 23 20 61 72 } {1 {wrong # ar
5290: 67 73 3a 20 73 68 6f 75 6c 64 20 62 65 20 22 69 gs: should be "i
52a0: 6e 74 65 72 70 20 74 61 72 67 65 74 20 70 61 74 nterp target pat
52b0: 68 20 61 6c 69 61 73 22 7d 7d 0a 40 40 20 2d 33 h alias"}}.@@ -3
52c0: 35 30 33 2c 36 20 2b 33 35 30 33 2c 34 39 20 40 503,6 +3503,49 @
52d0: 40 0a 20 20 20 20 20 69 6e 74 65 72 70 20 64 65 @. interp de
52e0: 6c 65 74 65 20 61 0a 20 7d 20 2d 72 65 73 75 6c lete a. } -resul
52f0: 74 20 7b 32 36 20 32 36 7d 0a 20 0a 2b 74 65 73 t {26 26}. .+tes
5300: 74 20 69 6e 74 65 72 70 2d 33 38 2e 31 20 7b 69 t interp-38.1 {i
5310: 6e 74 65 72 70 20 64 65 62 75 67 20 6f 6e 65 2d nterp debug one-
5320: 77 61 79 20 73 77 69 74 63 68 7d 20 2d 73 65 74 way switch} -set
5330: 75 70 20 7b 0a 2b 20 20 20 20 63 61 74 63 68 20 up {.+ catch
5340: 7b 69 6e 74 65 72 70 20 64 65 6c 65 74 65 20 61 {interp delete a
5350: 7d 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 63 72 }.+ interp cr
5360: 65 61 74 65 20 61 0a 2b 20 20 20 20 69 6e 74 65 eate a.+ inte
5370: 72 70 20 64 65 62 75 67 20 61 20 2d 66 72 61 6d rp debug a -fram
5380: 65 20 31 0a 2b 7d 20 2d 62 6f 64 79 20 7b 0a 2b e 1.+} -body {.+
5390: 20 20 20 20 23 20 54 49 50 20 23 33 78 78 20 69 # TIP #3xx i
53a0: 6e 74 65 72 70 20 64 65 62 75 67 20 66 72 61 6d nterp debug fram
53b0: 65 20 69 73 20 61 20 6f 6e 65 2d 77 61 79 20 73 e is a one-way s
53c0: 77 69 74 63 68 0a 2b 20 20 20 20 69 6e 74 65 72 witch.+ inter
53d0: 70 20 64 65 62 75 67 20 61 20 2d 66 72 61 6d 65 p debug a -frame
53e0: 20 30 0a 2b 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 0.+} -cleanup {
53f0: 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 64 65 6c .+ interp del
5400: 65 74 65 20 61 0a 2b 7d 20 2d 72 65 73 75 6c 74 ete a.+} -result
5410: 20 7b 31 7d 0a 2b 74 65 73 74 20 69 6e 74 65 72 {1}.+test inter
5420: 70 2d 33 38 2e 32 20 7b 69 6e 74 65 72 70 20 64 p-38.2 {interp d
5430: 65 62 75 67 20 65 6e 76 20 76 61 72 7d 20 2d 73 ebug env var} -s
5440: 65 74 75 70 20 7b 0a 2b 20 20 20 20 63 61 74 63 etup {.+ catc
5450: 68 20 7b 69 6e 74 65 72 70 20 64 65 6c 65 74 65 h {interp delete
5460: 20 61 7d 0a 2b 20 20 20 20 73 65 74 20 3a 3a 65 a}.+ set ::e
5470: 6e 76 28 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45 nv(TCL_INTERP_DE
5480: 42 55 47 5f 46 52 41 4d 45 29 20 31 0a 2b 20 20 BUG_FRAME) 1.+
5490: 20 20 69 6e 74 65 72 70 20 63 72 65 61 74 65 20 interp create
54a0: 61 0a 2b 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 20 a.+} -body {.+
54b0: 20 20 69 6e 74 65 72 70 20 64 65 62 75 67 20 61 interp debug a
54c0: 0a 2b 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 0a 2b .+} -cleanup {.+
54d0: 20 20 20 20 75 6e 73 65 74 20 3a 3a 65 6e 76 28 unset ::env(
54e0: 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45 42 55 47 TCL_INTERP_DEBUG
54f0: 5f 46 52 41 4d 45 29 0a 2b 20 20 20 20 69 6e 74 _FRAME).+ int
5500: 65 72 70 20 64 65 6c 65 74 65 20 61 0a 2b 7d 20 erp delete a.+}
5510: 2d 72 65 73 75 6c 74 20 7b 2d 66 72 61 6d 65 20 -result {-frame
5520: 31 7d 0a 2b 74 65 73 74 20 69 6e 74 65 72 70 2d 1}.+test interp-
5530: 33 38 2e 33 20 7b 69 6e 74 65 72 70 20 64 65 62 38.3 {interp deb
5540: 75 67 20 77 72 6f 6e 67 20 61 72 67 73 7d 20 2d ug wrong args} -
5550: 62 6f 64 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 body {.+ inte
5560: 72 70 20 64 65 62 75 67 0a 2b 7d 20 2d 72 65 74 rp debug.+} -ret
5570: 75 72 6e 43 6f 64 65 73 20 7b 0a 2b 20 20 20 20 urnCodes {.+
5580: 65 72 72 6f 72 0a 2b 7d 20 2d 72 65 73 75 6c 74 error.+} -result
5590: 20 7b 77 72 6f 6e 67 20 23 20 61 72 67 73 3a 20 {wrong # args:
55a0: 73 68 6f 75 6c 64 20 62 65 20 22 69 6e 74 65 72 should be "inter
55b0: 70 20 64 65 62 75 67 20 70 61 74 68 20 3f 2d 66 p debug path ?-f
55c0: 72 61 6d 65 20 3f 62 6f 6f 6c 3f 3f 22 7d 0a 2b rame ?bool??"}.+
55d0: 74 65 73 74 20 69 6e 74 65 72 70 2d 33 38 2e 34 test interp-38.4
55e0: 20 7b 69 6e 74 65 72 70 20 64 65 62 75 67 20 62 {interp debug b
55f0: 61 73 69 63 20 73 65 74 75 70 7d 20 2d 62 6f 64 asic setup} -bod
5600: 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 y {.+ interp
5610: 64 65 62 75 67 20 7b 7d 0a 2b 7d 20 2d 72 65 73 debug {}.+} -res
5620: 75 6c 74 20 7b 2d 66 72 61 6d 65 20 30 7d 0a 2b ult {-frame 0}.+
5630: 74 65 73 74 20 69 6e 74 65 72 70 2d 33 38 2e 35 test interp-38.5
5640: 20 7b 69 6e 74 65 72 70 20 64 65 62 75 67 20 62 {interp debug b
5650: 61 73 69 63 20 73 65 74 75 70 7d 20 2d 62 6f 64 asic setup} -bod
5660: 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 y {.+ interp
5670: 64 65 62 75 67 20 7b 7d 20 2d 66 0a 2b 7d 20 2d debug {} -f.+} -
5680: 72 65 73 75 6c 74 20 7b 30 7d 0a 2b 74 65 73 74 result {0}.+test
5690: 20 69 6e 74 65 72 70 2d 33 38 2e 36 20 7b 69 6e interp-38.6 {in
56a0: 74 65 72 70 20 64 65 62 75 67 20 62 61 73 69 63 terp debug basic
56b0: 20 73 65 74 75 70 7d 20 2d 62 6f 64 79 20 7b 0a setup} -body {.
56c0: 2b 20 20 20 20 69 6e 74 65 72 70 20 64 65 62 75 + interp debu
56d0: 67 20 2d 66 72 61 6d 65 73 0a 2b 7d 20 2d 72 65 g -frames.+} -re
56e0: 74 75 72 6e 43 6f 64 65 73 20 65 72 72 6f 72 20 turnCodes error
56f0: 2d 72 65 73 75 6c 74 20 7b 63 6f 75 6c 64 20 6e -result {could n
5700: 6f 74 20 66 69 6e 64 20 69 6e 74 65 72 70 72 65 ot find interpre
5710: 74 65 72 20 22 2d 66 72 61 6d 65 73 22 7d 0a 2b ter "-frames"}.+
5720: 74 65 73 74 20 69 6e 74 65 72 70 2d 33 38 2e 37 test interp-38.7
5730: 20 7b 69 6e 74 65 72 70 20 64 65 62 75 67 20 62 {interp debug b
5740: 61 73 69 63 20 73 65 74 75 70 7d 20 2d 62 6f 64 asic setup} -bod
5750: 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 y {.+ interp
5760: 64 65 62 75 67 20 7b 7d 20 2d 66 72 61 6d 65 73 debug {} -frames
5770: 0a 2b 7d 20 2d 72 65 74 75 72 6e 43 6f 64 65 73 .+} -returnCodes
5780: 20 65 72 72 6f 72 20 2d 72 65 73 75 6c 74 20 7b error -result {
5790: 62 61 64 20 64 65 62 75 67 20 6f 70 74 69 6f 6e bad debug option
57a0: 20 22 2d 66 72 61 6d 65 73 22 3a 20 6d 75 73 74 "-frames": must
57b0: 20 62 65 20 2d 66 72 61 6d 65 7d 0a 2b 74 65 73 be -frame}.+tes
57c0: 74 20 69 6e 74 65 72 70 2d 33 38 2e 38 20 7b 69 t interp-38.8 {i
57d0: 6e 74 65 72 70 20 64 65 62 75 67 20 62 61 73 69 nterp debug basi
57e0: 63 20 73 65 74 75 70 7d 20 2d 62 6f 64 79 20 7b c setup} -body {
57f0: 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 64 65 62 .+ interp deb
5800: 75 67 20 7b 7d 20 2d 66 72 61 6d 65 20 30 20 62 ug {} -frame 0 b
5810: 6f 67 75 73 0a 2b 7d 20 2d 72 65 74 75 72 6e 43 ogus.+} -returnC
5820: 6f 64 65 73 20 7b 0a 2b 20 20 20 20 65 72 72 6f odes {.+ erro
5830: 72 0a 2b 7d 20 2d 72 65 73 75 6c 74 20 7b 77 72 r.+} -result {wr
5840: 6f 6e 67 20 23 20 61 72 67 73 3a 20 73 68 6f 75 ong # args: shou
5850: 6c 64 20 62 65 20 22 69 6e 74 65 72 70 20 64 65 ld be "interp de
5860: 62 75 67 20 70 61 74 68 20 3f 2d 66 72 61 6d 65 bug path ?-frame
5870: 20 3f 62 6f 6f 6c 3f 3f 22 7d 0a 2b 0a 20 23 20 ?bool??"}.+. #
5880: 63 6c 65 61 6e 75 70 0a 20 66 6f 72 65 61 63 68 cleanup. foreach
5890: 20 69 20 5b 69 6e 74 65 72 70 20 73 6c 61 76 65 i [interp slave
58a0: 73 5d 20 7b 0a 20 20 20 20 20 69 6e 74 65 72 70 s] {. interp
58b0: 20 64 65 6c 65 74 65 20 24 69 0a delete $i.