Compare commits
450
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ce24093a1 | ||
|
|
9e6b54e433 | ||
|
|
39fcdc3c6e | ||
|
|
1479c62f1c | ||
|
|
54a81d4f0e | ||
|
|
f95a5e7c82 | ||
|
|
5285fe3ede | ||
|
|
8e1f9e82da | ||
|
|
fbac621bfc | ||
|
|
3cc058aa46 | ||
|
|
3e3649a18e | ||
|
|
d35d4b2c53 | ||
|
|
c91c7b7cf1 | ||
|
|
b4a00d3ac5 | ||
|
|
bfcb6b40d2 | ||
|
|
2440231062 | ||
|
|
0f1e352369 | ||
|
|
aed9fbb19c | ||
|
|
4551ca9b2c | ||
|
|
e4dfb0d689 | ||
|
|
63e65ca6f1 | ||
|
|
7887926261 | ||
|
|
91eca443b7 | ||
|
|
cb5d76ed2b | ||
|
|
10372d985a | ||
|
|
5aee161167 | ||
|
|
657b49a9d1 | ||
|
|
bbf4d17089 | ||
|
|
4a2c3b6440 | ||
|
|
3f481feba6 | ||
|
|
1b0845930c | ||
|
|
50a0b81579 | ||
|
|
ad07565ec0 | ||
|
|
3b93da87b3 | ||
|
|
a414da9341 | ||
|
|
345bd636d4 | ||
|
|
134ada8ff9 | ||
|
|
3204893f09 | ||
|
|
7bc81bcbb0 | ||
|
|
6d44125712 | ||
|
|
a2df72aecb | ||
|
|
85c48e5e91 | ||
|
|
d4d8f3201a | ||
|
|
debbae5fd9 | ||
|
|
649d0983f9 | ||
|
|
3146ffb96b | ||
|
|
f1a2117967 | ||
|
|
2044cba5ac | ||
|
|
eee6883d2a | ||
|
|
472fd0a636 | ||
|
|
bfe331b12a | ||
|
|
1092cae12e | ||
|
|
54850c7528 | ||
|
|
365b878745 | ||
|
|
08390e5c47 | ||
|
|
a52254cce9 | ||
|
|
5cc8523f8e | ||
|
|
bcb4faa32f | ||
|
|
fa65ef51ba | ||
|
|
e94119e59b | ||
|
|
0440ab215b | ||
|
|
27c4d781f4 | ||
|
|
8fd5bbdc7c | ||
|
|
612c7a7d4a | ||
|
|
c4a5440ed1 | ||
|
|
822fd2d405 | ||
|
|
e723893895 | ||
|
|
e0623615e3 | ||
|
|
b348c536f6 | ||
|
|
2b788a21e4 | ||
|
|
a8bbc9486a | ||
|
|
f089b1e4a1 | ||
|
|
bb55ca2e95 | ||
|
|
0288a572d8 | ||
|
|
1ecf461e41 | ||
|
|
97f9595151 | ||
|
|
30710a181c | ||
|
|
493b04cbc0 | ||
|
|
8938dbcc25 | ||
|
|
db738e7756 | ||
|
|
c6bb98e763 | ||
|
|
c938932757 | ||
|
|
9878106deb | ||
|
|
4d70c5f1e1 | ||
|
|
c5cad32cd6 | ||
|
|
6a3868f2cc | ||
|
|
3116380710 | ||
|
|
53dc4dcdee | ||
|
|
4733e874fc | ||
|
|
a313e78ffa | ||
|
|
2c3dbea378 | ||
|
|
8520e69f32 | ||
|
|
54223a5f7e | ||
|
|
22515fc47f | ||
|
|
8932701ae7 | ||
|
|
6b45d21b4b | ||
|
|
3adc645802 | ||
|
|
743ced9da3 | ||
|
|
b9ef276505 | ||
|
|
ebd7e8a86b | ||
|
|
4096bf5d01 | ||
|
|
6dcfcb8be9 | ||
|
|
24cec35f7b | ||
|
|
367ade79ed | ||
|
|
e6af5d333b | ||
|
|
24be1383da | ||
|
|
28384139ba | ||
|
|
e5b2f21fe9 | ||
|
|
ccbbb5d288 | ||
|
|
2d27ea7088 | ||
|
|
a33a94ec85 | ||
|
|
f36f801d24 | ||
|
|
841e525556 | ||
|
|
55b0c17067 | ||
|
|
993b39c491 | ||
|
|
272b2008ad | ||
|
|
f7cf1b2bae | ||
|
|
8173bccfd9 | ||
|
|
a5b75dfa9a | ||
|
|
52b97dd00b | ||
|
|
987eb68977 | ||
|
|
f632850eb8 | ||
|
|
ed72e77b7d | ||
|
|
83d427e824 | ||
|
|
f18c1126d5 | ||
|
|
62e1b3723e | ||
|
|
4d6aaa2e8b | ||
|
|
6b6685b8fd | ||
|
|
4bf79aef9b | ||
|
|
066a4b7b35 | ||
|
|
a6f2dee7fb | ||
|
|
a7e397556b | ||
|
|
c084f0ea75 | ||
|
|
5cdaf0e05b | ||
|
|
200e0742b8 | ||
|
|
fe60431f53 | ||
|
|
160ba1cb95 | ||
|
|
058f0df44d | ||
|
|
ff926f2b01 | ||
|
|
bee5c35f44 | ||
|
|
8971b5cdea | ||
|
|
b2e3f2fa04 | ||
|
|
0c1e275cdf | ||
|
|
a2400fbe30 | ||
|
|
211f7d6466 | ||
|
|
6dee5b3e07 | ||
|
|
9d1f38c3e3 | ||
|
|
33647e79c8 | ||
|
|
f440a6ef41 | ||
|
|
c086de021c | ||
|
|
97eb71a629 | ||
|
|
e62b40c808 | ||
|
|
234fb04984 | ||
|
|
1b7d424507 | ||
|
|
5797625e42 | ||
|
|
987422a01f | ||
|
|
5f6b71f3f2 | ||
|
|
f6f0891fff | ||
|
|
27c5ada57e | ||
|
|
5f2f5b63c3 | ||
|
|
59f7320bdd | ||
|
|
00546e5e21 | ||
|
|
a63563bd9a | ||
|
|
1d99884b08 | ||
|
|
8bd533d76e | ||
|
|
23d61a10c2 | ||
|
|
0ee8df700b | ||
|
|
50a950f2b1 | ||
|
|
c74640849e | ||
|
|
861b34625c | ||
|
|
0958b92b37 | ||
|
|
6d9ae4aa16 | ||
|
|
965128fe34 | ||
|
|
ebc5b27c8c | ||
|
|
3916ce9d4c | ||
|
|
4bd227bc12 | ||
|
|
84e92af6dc | ||
|
|
15ca940ca7 | ||
|
|
525bc7c9b5 | ||
|
|
6adf3b8c6c | ||
|
|
3d14dd6bc9 | ||
|
|
41afeeec2b | ||
|
|
623c1cbe5b | ||
|
|
60ef39d24a | ||
|
|
889454ec06 | ||
|
|
752ab085d6 | ||
|
|
c019848148 | ||
|
|
fd1c7c2fb3 | ||
|
|
8f2d19b951 | ||
|
|
f2bea640bb | ||
|
|
d818803502 | ||
|
|
e0437fdf58 | ||
|
|
8163234efd | ||
|
|
f796ad762c | ||
|
|
0185dd6477 | ||
|
|
07d10b8a58 | ||
|
|
bc28cd1ac8 | ||
|
|
9350513d16 | ||
|
|
4fb5d04b2f | ||
|
|
f287d8cb0f | ||
|
|
0c2e553e8f | ||
|
|
915c6abe66 | ||
|
|
0070244914 | ||
|
|
17ebc3cd20 | ||
|
|
5e9e003379 | ||
|
|
2aed1acbd1 | ||
|
|
81a1a91361 | ||
|
|
9a19e4cba0 | ||
|
|
c2d6c48dd9 | ||
|
|
d383707870 | ||
|
|
c33f97005c | ||
|
|
3f126895fb | ||
|
|
d848f30c45 | ||
|
|
d860a2c3a4 | ||
|
|
009f2adf3d | ||
|
|
5684ad8d94 | ||
|
|
774c402365 | ||
|
|
740d1811bc | ||
|
|
451ab6927c | ||
|
|
f302557ad5 | ||
|
|
d061b31460 | ||
|
|
783aea7d3a | ||
|
|
34c17bad36 | ||
|
|
f0992177e4 | ||
|
|
6f4f296706 | ||
|
|
75bc23d59c | ||
|
|
9d91a3db0b | ||
|
|
1dc19d8370 | ||
|
|
458197828b | ||
|
|
c079ab076f | ||
|
|
d69c39d52e | ||
|
|
7a53c36e3a | ||
|
|
ee74db1cbf | ||
|
|
1e62f5ac76 | ||
|
|
afad6ffbb4 | ||
|
|
d72d5f8b7a | ||
|
|
c46c774126 | ||
|
|
ba3bf9b61f | ||
|
|
82bddf4dca | ||
|
|
e10479f3d7 | ||
|
|
7183692271 | ||
|
|
b7fbf3c433 | ||
|
|
c10c796a46 | ||
|
|
582824087d | ||
|
|
da4296c06f | ||
|
|
0dec640514 | ||
|
|
d2b490f552 | ||
|
|
4cfafc3002 | ||
|
|
fb3fc7d5d3 | ||
|
|
de31df63e7 | ||
|
|
a7bebaafdb | ||
|
|
bd6afa9af5 | ||
|
|
c8629fcad6 | ||
|
|
b52ba9ae90 | ||
|
|
a6fe3119b2 | ||
|
|
28bc2e5adf | ||
|
|
191c6d2137 | ||
|
|
7eab500306 | ||
|
|
421cc90918 | ||
|
|
e26d6e29c1 | ||
|
|
57f4decd9b | ||
|
|
e0373f12ec | ||
|
|
fa8b071f04 | ||
|
|
6f68b762d3 | ||
|
|
ade4e6d9bb | ||
|
|
a6b67f2ef2 | ||
|
|
88731d9d93 | ||
|
|
73faa3bbb6 | ||
|
|
89b2fc0982 | ||
|
|
7d8dff7c72 | ||
|
|
aec5846c12 | ||
|
|
05fb0c0810 | ||
|
|
a47b03577b | ||
|
|
fda71d6d4c | ||
|
|
7070acfea1 | ||
|
|
eec0dcb530 | ||
|
|
c0f408b9cd | ||
|
|
ddd130e532 | ||
|
|
e592a6c9d5 | ||
|
|
5ea3e8b570 | ||
|
|
324ca57f3d | ||
|
|
a9f49cd781 | ||
|
|
b3fea91162 | ||
|
|
ae7b32a706 | ||
|
|
eaf387ef13 | ||
|
|
78b0a4a13c | ||
|
|
f7fd65de47 | ||
|
|
d751f58f9d | ||
|
|
5eecd400b7 | ||
|
|
3f19b90244 | ||
|
|
11f1a88c12 | ||
|
|
c012287fc8 | ||
|
|
9fd3e86565 | ||
|
|
adb4b18477 | ||
|
|
dc4782f595 | ||
|
|
708da35f79 | ||
|
|
07bfe18a21 | ||
|
|
9497794406 | ||
|
|
8d8c38c7c7 | ||
|
|
dcb4da22fa | ||
|
|
130c6dd203 | ||
|
|
bbca4ec51b | ||
|
|
4a6f1d02be | ||
|
|
202a7c4db1 | ||
|
|
4d9fc81c0f | ||
|
|
cdd8467ca9 | ||
|
|
099345d98c | ||
|
|
76df95e6e4 | ||
|
|
7243b34d80 | ||
|
|
6a445a3fe6 | ||
|
|
d6ca452640 | ||
|
|
7b9871647a | ||
|
|
5f13065a33 | ||
|
|
e80db5fa35 | ||
|
|
3215339ef0 | ||
|
|
b7289f092d | ||
|
|
ded13430f9 | ||
|
|
6eb0e8555d | ||
|
|
c05b753e95 | ||
|
|
f332c17690 | ||
|
|
df6a99b1f7 | ||
|
|
07096327dc | ||
|
|
a831b299f7 | ||
|
|
b6b9185fa8 | ||
|
|
bd6f6a89c6 | ||
|
|
169288808b | ||
|
|
615ab1a0d4 | ||
|
|
c961880a26 | ||
|
|
f118d91a3d | ||
|
|
3c473ee0c4 | ||
|
|
67264f1e10 | ||
|
|
9cccd5fd91 | ||
|
|
470fc04dd0 | ||
|
|
46db2c3edd | ||
|
|
52ce2fdeb0 | ||
|
|
d8bed612b0 | ||
|
|
41da12e756 | ||
|
|
18fcba4c82 | ||
|
|
41462bf4fa | ||
|
|
4e13219dfb | ||
|
|
854eec9e0f | ||
|
|
849acd6e96 | ||
|
|
b5c0305e8b | ||
|
|
a8ee0b7831 | ||
|
|
a989f1616a | ||
|
|
af76b69dcd | ||
|
|
ab224ed8ee | ||
|
|
68dfdc609e | ||
|
|
10ccda4936 | ||
|
|
c718bb66ac | ||
|
|
5dad1c5205 | ||
|
|
270a615a09 | ||
|
|
4a21f51055 | ||
|
|
532b8988c1 | ||
|
|
b2423f72cf | ||
|
|
3903b017ec | ||
|
|
3c76eb88e8 | ||
|
|
544626ba84 | ||
|
|
b5f51d5007 | ||
|
|
a20873ddab | ||
|
|
68d7745b27 | ||
|
|
c8b0ad64d1 | ||
|
|
a097532afd | ||
|
|
7b43d03c2b | ||
|
|
fdf63d1e28 | ||
|
|
17f4b04d10 | ||
|
|
2a3000c25e | ||
|
|
546d781de9 | ||
|
|
e7d31b9449 | ||
|
|
d2b951b436 | ||
|
|
79f58ebfb3 | ||
|
|
2797b611e3 | ||
|
|
7da4d96216 | ||
|
|
15425ace0b | ||
|
|
7390940817 | ||
|
|
7484715183 | ||
|
|
bcc14fb740 | ||
|
|
90dba8327c | ||
|
|
db5a66dd2c | ||
|
|
82c027f092 | ||
|
|
e7da373e0c | ||
|
|
2a26edf602 | ||
|
|
c929650e2f | ||
|
|
b1a3a83b3d | ||
|
|
fb728f1f53 | ||
|
|
b3b9cb8d35 | ||
|
|
251b09c99a | ||
|
|
43cea24ef3 | ||
|
|
2debf51b24 | ||
|
|
f677af67e2 | ||
|
|
622cb44fa4 | ||
|
|
50c73b80d3 | ||
|
|
b24c54bed3 | ||
|
|
c74bb69040 | ||
|
|
4b5869de07 | ||
|
|
d421fc1bdf | ||
|
|
6c3b503dbd | ||
|
|
68afad0c67 | ||
|
|
7965559c05 | ||
|
|
18b0700dbe | ||
|
|
4ee4a959b9 | ||
|
|
0a18b6e286 | ||
|
|
5c0e6b295a | ||
|
|
45e4dfd471 | ||
|
|
89acc1c033 | ||
|
|
be69161b43 | ||
|
|
025d1997eb | ||
|
|
648841a413 | ||
|
|
276bcea418 | ||
|
|
1ac9419646 | ||
|
|
c0b55c5efd | ||
|
|
643a9ae4b0 | ||
|
|
6880761727 | ||
|
|
119cc47a41 | ||
|
|
72a0fab411 | ||
|
|
7f79d3446c | ||
|
|
c7e9f685b7 | ||
|
|
06cfc15d05 | ||
|
|
c52117cb0c | ||
|
|
143dd064c6 | ||
|
|
43d07e03c7 | ||
|
|
a425618034 | ||
|
|
b5f1bdb187 | ||
|
|
007c00ed28 | ||
|
|
13a2a82c81 | ||
|
|
b55a06a8a5 | ||
|
|
87d602d36b | ||
|
|
472c40ee51 | ||
|
|
06130c47bf | ||
|
|
bf048c0574 | ||
|
|
8654042602 | ||
|
|
11832ca791 | ||
|
|
e516af3ee3 | ||
|
|
27e4c0fd0a | ||
|
|
5f10b318a9 | ||
|
|
45f9ea1e07 | ||
|
|
9cebbfe5c2 | ||
|
|
15f3cf55c9 | ||
|
|
b12676f0d0 | ||
|
|
cac74426e8 | ||
|
|
41c4cbfb48 | ||
|
|
64e39b2d5a | ||
|
|
cc984c4e6e | ||
|
|
64bf3c8f4a | ||
|
|
064f7e5513 | ||
|
|
6597872335 | ||
|
|
5044035ec0 | ||
|
|
b6b0d1b8dd | ||
|
|
1ddb66bfda | ||
|
|
6b17a1e25a |
@@ -1,3 +1,193 @@
|
||||
A NOTE ON THE CHANGELOG:
|
||||
Starting in early 2011, Tcl source code has been under the management of
|
||||
fossil, hosted at http://core.tcl.tk/tcl/ . Fossil presents a "Timeline"
|
||||
view of changes made that is superior in every way to a hand edited log file.
|
||||
Because of this, many Tcl developers are now out of the habit of maintaining
|
||||
this log file. You may still find useful things in it, but the Timeline is
|
||||
a better first place to look now.
|
||||
============================================================================
|
||||
|
||||
2013-09-19 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
*** 8.6.1 TAGGED FOR RELEASE ***
|
||||
|
||||
* generic/tcl.h: Bump version number to 8.6.1.
|
||||
* library/init.tcl:
|
||||
* unix/configure.in:
|
||||
* win/configure.in:
|
||||
* unix/tcl.spec:
|
||||
* README:
|
||||
|
||||
* unix/configure: autoconf-2.59
|
||||
* win/configure:
|
||||
|
||||
2013-09-19 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
* doc/next.n (METHOD SEARCH ORDER): Bug [3606943]: Corrected
|
||||
description of method search order.
|
||||
|
||||
2013-09-18 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
Bump TclOO version to 1.0.1 for release.
|
||||
|
||||
2013-09-17 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclBinary.c (BinaryEncodeUu, BinaryDecodeUu): [Bug 2152292]:
|
||||
Corrected implementation of the core of uuencode handling so that the
|
||||
line length processing is correctly applied.
|
||||
***POTENTIAL INCOMPATIBILITY***
|
||||
Existing code that was using the old versions and working around the
|
||||
limitations will now need to do far less. The -maxlen option now has
|
||||
strict limits on the range of supported lengths; this is a limitation
|
||||
of the format itself.
|
||||
|
||||
2013-09-09 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclOOMethod.c (CloneProcedureMethod): [Bug 3609693]: Strip
|
||||
the internal representation of method bodies during cloning in order
|
||||
to ensure that any bound references to instance variables are removed.
|
||||
|
||||
2013-09-01 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclBinary.c (BinaryDecodeHex): [Bug b98fa55285]: Ensure that
|
||||
whitespace at the end of a string don't cause the decoder to drop the
|
||||
last decoded byte.
|
||||
|
||||
2013-08-03 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
* library/auto.tcl: [Patch 3611643]: Allow TclOO classes to be found
|
||||
by the autoloading mechanism.
|
||||
|
||||
2013-08-02 Donal Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclOODefineCmds.c (ClassSuperSet): Bug [9d61624b3d]: Stop
|
||||
crashes when emptying the superclass slot, even when doing elaborate
|
||||
things with metaclasses.
|
||||
|
||||
2013-08-01 Harald Oehlmann <oehhar@users.sf.net>
|
||||
|
||||
* tclUnixNotify.c (Tcl_InitNotifier): Bug [a0bc856dcd]: Start notifier
|
||||
thread again if we were forked, to solve Rivet bug 55153.
|
||||
|
||||
2013-07-05 Kevin B. Kenny <kennykb@acm.org>
|
||||
|
||||
* library/tzdata/Africa/Casablanca:
|
||||
* library/tzdata/America/Asuncion:
|
||||
* library/tzdata/Antarctica/Macquarie:
|
||||
* library/tzdata/Asia/Gaza:
|
||||
* library/tzdata/Asia/Hebron:
|
||||
* library/tzdata/Asia/Jerusalem:
|
||||
http://www.iana.org/time-zones/repository/releases/tzdata2013d.tar.gz
|
||||
|
||||
2013-07-03 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* unix/tclXtNotify.c: Bug [817249]: bring tclXtNotify.c up to date with
|
||||
Tcl_SetNotifier() change.
|
||||
|
||||
2013-07-02 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* unix/tcl.m4: Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4
|
||||
* unix/configure: (thanks to Brian Griffin)
|
||||
|
||||
2013-06-27 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* generic/tclConfig.c: Bug [9b2e636361]: Tcl_CreateInterp() needs
|
||||
* generic/tclMain.c: initialized encodings.
|
||||
|
||||
2013-06-18 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* generic/tclEvent.c: Bug [3611974]: InitSubsystems multiple thread
|
||||
issue.
|
||||
|
||||
2013-06-17 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* generic/regc_locale.c: Bug [a876646efe]: re_expr character class
|
||||
[:cntrl:] should contain \u0000 - \u001f
|
||||
|
||||
2013-06-09 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclCompCmdsSZ.c (TclCompileTryCmd): [Bug 779d38b996]:
|
||||
Rewrote the [try] compiler to generate better code in some cases and
|
||||
to behave correctly in others; when an error happens during the
|
||||
processing of an exception-trap clause or a finally clause, the
|
||||
*original* return options are now captured in a -during option, even
|
||||
when fully compiled.
|
||||
|
||||
2013-06-05 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclExecute.c (INST_EXPAND_DROP): [Bugs 2835313, 3614226]:
|
||||
New opcode to allow resetting the stack to get rid of an expansion,
|
||||
restoring the stack to a known state in the process.
|
||||
* generic/tclCompile.c, generic/tclCompCmds.c: Adjusted the compilers
|
||||
for [break] and [continue] to get stack cleanup right in the majority
|
||||
of cases.
|
||||
* tests/for.test (for-7.*): Set of tests for these evil cases.
|
||||
|
||||
2013-06-04 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* unix/tcl.m4: Eliminate NO_VIZ macro as current zlib uses HAVE_HIDDEN
|
||||
instead. One more last-moment fix for FreeBSD by Pietro Cerutti
|
||||
|
||||
2013-06-03 Miguel Sofer <msofer@users.sf.net>
|
||||
|
||||
* generic/tclExecute.c: fix for perf bug detected by Kieran
|
||||
(https://groups.google.com/forum/?fromgroups#!topic/comp.lang.tcl/vfpI3bc-DkQ),
|
||||
diagnosed by dgp to be a close relative of [Bug 781585], which was
|
||||
fixed by commit [f46fb50cb3]. This bug was introduced by myself in
|
||||
commit [cbfe055d8c].
|
||||
|
||||
2013-06-03 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclCompCmds.c (TclCompileBreakCmd, TclCompileContinueCmd):
|
||||
Added code to allow [break] and [continue] to be issued as a jump (in
|
||||
the most common cases) rather than using the more expensive exception
|
||||
processing path in the bytecode engine. [Bug 3614226]: Partial fix for
|
||||
the issues relating to cleaning up the stack when dealing with [break]
|
||||
and [continue].
|
||||
|
||||
2013-05-27 Harald Oehlmann <oehhar@users.sf.net>
|
||||
|
||||
* library/msgcat/msgcat.tcl: [Bug 3036566]: Also get locale from
|
||||
registry key HCU\Control Panel\Desktop : PreferredUILanguages to honor
|
||||
installed language packs on Vista+.
|
||||
Bumped msgcat version to 1.5.2
|
||||
|
||||
2013-05-22 Andreas Kupries <andreask@activestate.com>
|
||||
|
||||
* tclCompile.c: Removed duplicate const qualifier causing the HP
|
||||
native cc to error out.
|
||||
|
||||
2013-05-22 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclUtf.c (TclUtfCasecmp): [Bug 3613609]: Replace problematic
|
||||
uses of strcasecmp with a proper UTF-8-aware version. Affects both
|
||||
[lsearch -nocase] and [lsort -nocase].
|
||||
|
||||
2013-05-22 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* doc/file.n: [Bug 3613671]: Added note to portability section on the
|
||||
fact that [file owned] does not produce useful results on Windows.
|
||||
|
||||
2013-05-20 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* unix/tclUnixFCmd.c (DefaultTempDir): [Bug 3613567]: Corrected logic
|
||||
for checking return code of access() system call, which was inverted.
|
||||
|
||||
2013-05-19 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* unix/tcl.m4: Fix for FreeBSD, and remove support for older
|
||||
* unix/configure: FreeBSD versions. Patch by Pietro Cerutti.
|
||||
|
||||
2013-05-18 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
* generic/tclCompCmdsGR.c: Split tclCompCmds.c again to keep size of
|
||||
code down.
|
||||
|
||||
2013-05-16 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* generic/tclBasic.c: Add panic in order to detect incompatible
|
||||
mingw32 sys/stat.h and sys/time.h headers.
|
||||
|
||||
2013-05-13 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* compat/zlib/*: Upgrade to zlib 1.2.8
|
||||
@@ -19,18 +209,17 @@
|
||||
|
||||
* generic/tclStubInit.c: Add support for Cygwin64, which has a 64-bit
|
||||
* generic/tclDecls.h: "long" type. Binary compatibility with win64
|
||||
requires that all stub entries use 32-bit long's, therefore the
|
||||
need for various wrapper functions/macros. For Tcl 9 a better
|
||||
solution is needed, but that cannot be done without introducing
|
||||
binary incompatibility.
|
||||
requires that all stub entries use 32-bit long's, therefore the need
|
||||
for various wrapper functions/macros. For Tcl 9 a better solution is
|
||||
needed, but that cannot be done without introducing binary
|
||||
incompatibility.
|
||||
|
||||
2013-04-30 Andreas Kupries <andreask@activestate.com>
|
||||
|
||||
* library/platform/platform.tcl (::platform::LibcVersion):
|
||||
* library/platform/pkgIndex.tcl: Followup to the 2013-01-30
|
||||
change. The RE become too restrictive again. SuSe added a
|
||||
timestamp after the version. Loosened up a bit. Bumped package
|
||||
to version 1.0.12.
|
||||
* library/platform/pkgIndex.tcl: Followup to the 2013-01-30 change.
|
||||
The RE become too restrictive again. SuSe added a timestamp after the
|
||||
version. Loosened up a bit. Bumped package to version 1.0.12.
|
||||
|
||||
2013-04-29 Donal K. Fellows <dkf@users.sf.net>
|
||||
|
||||
@@ -41,16 +230,16 @@
|
||||
|
||||
* generic/tclDecls.h: Implement Tcl_NewBooleanObj, Tcl_DbNewBooleanObj
|
||||
and Tcl_SetBooleanObj as macros using Tcl_NewIntObj, Tcl_DbNewLongObj
|
||||
and Tcl_SetIntObj. Starting with Tcl 8.5, this is exactly the same,
|
||||
it only eliminates code duplication.
|
||||
and Tcl_SetIntObj. Starting with Tcl 8.5, this is exactly the same, it
|
||||
only eliminates code duplication.
|
||||
* generic/tclInt.h: Eliminate use of NO_WIDE_TYPE everywhere: It's
|
||||
exactly the same as TCL_WIDE_INT_IS_LONG
|
||||
|
||||
2013-04-19 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* generic/tclDecls.h: Implement many Tcl_*Var* functions and
|
||||
Tcl_GetIndexFromObj as (faster/stack-saving) macros around resp
|
||||
their Tcl_*Var*2 equivalent and Tcl_GetIndexFromObjStruct.
|
||||
Tcl_GetIndexFromObj as (faster/stack-saving) macros around resp their
|
||||
Tcl_*Var*2 equivalent and Tcl_GetIndexFromObjStruct.
|
||||
|
||||
2013-04-12 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
@@ -59,16 +248,16 @@
|
||||
|
||||
2013-04-08 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
* generic/regc_color.c: [Bug 3610026] Stop crash when the number of
|
||||
* generic/regerrs.h: "colors" in a regular expression overflows
|
||||
* generic/regex.h: a short int. Thanks to Heikki Linnakangas
|
||||
* generic/regguts.h: for the report and the patch.
|
||||
* generic/regc_color.c: [Bug 3610026]: Stop crash when the number of
|
||||
* generic/regerrs.h: "colors" in a regular expression overflows a
|
||||
* generic/regex.h: short int. Thanks to Heikki Linnakangas for
|
||||
* generic/regguts.h: the report and the patch.
|
||||
* tests/regexp.test:
|
||||
|
||||
2013-04-04 Reinhard Max <max@suse.de>
|
||||
|
||||
* library/http/http.tcl (http::geturl): Allow URLs that don't have
|
||||
a path, but a query query, e.g. http://example.com?foo=bar .
|
||||
* library/http/http.tcl (http::geturl): Allow URLs that don't have a
|
||||
path, but a query query, e.g. http://example.com?foo=bar
|
||||
* Bump the http package to 2.8.7.
|
||||
|
||||
2013-03-22 Venkat Iyer <venkat@comit.com>
|
||||
@@ -100,12 +289,12 @@
|
||||
|
||||
2013-03-21 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
* library/auto.tcl: [Bug 2102614] Add ensemble indexing support
|
||||
* tests/autoMkindex.test: to [auto_mkindex]. Thanks Brian Griffin.
|
||||
* library/auto.tcl: [Bug 2102614]: Add ensemble indexing support to
|
||||
* tests/autoMkindex.test: [auto_mkindex]. Thanks Brian Griffin.
|
||||
|
||||
2013-03-19 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
* generic/tclFCmd.c: [Bug 3597000] Consistent [file copy] result.
|
||||
* generic/tclFCmd.c: [Bug 3597000]: Consistent [file copy] result.
|
||||
* tests/fileSystem.test:
|
||||
|
||||
2013-03-19 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
@@ -125,20 +314,20 @@
|
||||
|
||||
2013-03-11 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
* generic/tclCompile.c: [Bugs 3607246,3607372] Unbalanced refcounts
|
||||
* generic/tclCompile.c: [Bugs 3607246,3607372]: Unbalanced refcounts
|
||||
* generic/tclLiteral.c: of literals in the global literal table.
|
||||
|
||||
2013-03-06 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
* generic/regc_nfa.c: [Bugs 3604074,3606683] Rewrite of the
|
||||
* generic/regcomp.c: fixempties() routine (and supporting
|
||||
routines) to completely eliminate the infinite loop hazard.
|
||||
Thanks to Tom Lane for the much improved solution.
|
||||
* generic/regc_nfa.c: [Bugs 3604074,3606683]: Rewrite of the
|
||||
* generic/regcomp.c: fixempties() routine (and supporting routines)
|
||||
to completely eliminate the infinite loop hazard. Thanks to Tom Lane
|
||||
for the much improved solution.
|
||||
|
||||
2013-02-28 Don Porter <dgp@users.sourceforge.net>
|
||||
|
||||
* generic/tclLiteral.c: Revise TclReleaseLiteral() to tolerate a
|
||||
NULL interp argument.
|
||||
* generic/tclLiteral.c: Revise TclReleaseLiteral() to tolerate a NULL
|
||||
interp argument.
|
||||
|
||||
* generic/tclCompile.c: Update callers and revise mistaken comments.
|
||||
* generic/tclProc.c:
|
||||
@@ -4833,8 +5022,7 @@
|
||||
2010-05-19 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
|
||||
|
||||
* tests/dict.test: Add missing tests for [Bug 3004007], fixed under
|
||||
the radar on 2010-02-24 (dkf): EIAS violation in
|
||||
list-dict conversions.
|
||||
the radar on 2010-02-24 (dkf): EIAS violation in list-dict conversions
|
||||
|
||||
2010-05-19 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
@@ -6688,10 +6876,9 @@
|
||||
|
||||
2009-11-11 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
|
||||
|
||||
* generic/tclIO.c: Fix [Bug 2888099] (close discards ENOSPC error)
|
||||
by saving the errno from the first of two
|
||||
FlushChannel()s. Uneasy to test; might need
|
||||
specific channel drivers. Four-hands with aku.
|
||||
* generic/tclIO.c: Fix [Bug 2888099] (close discards ENOSPC error) by
|
||||
saving the errno from the first of two FlushChannel()s. Uneasy to
|
||||
test; might need specific channel drivers. Four-hands with aku.
|
||||
|
||||
2009-11-10 Pat Thoyts <patthoyts@users.sourceforge.net>
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
README: Tcl
|
||||
This is the Tcl 8.6.0 source distribution.
|
||||
http://tcl.sourceforge.net/
|
||||
You can get any source release of Tcl from the file distributions
|
||||
link at the above URL.
|
||||
This is the Tcl 8.6.1 source distribution.
|
||||
http://sourceforge.net/projects/tcl/files/Tcl/
|
||||
You can get any source release of Tcl from the URL above.
|
||||
|
||||
Contents
|
||||
--------
|
||||
@@ -27,9 +26,14 @@ Tcl can also be used for a variety of web-related tasks and for creating
|
||||
powerful command languages for applications.
|
||||
|
||||
Tcl is maintained, enhanced, and distributed freely by the Tcl community.
|
||||
The home for Tcl/Tk releases and bug/patch database is on SourceForge:
|
||||
Source code development and tracking of bug reports and feature requests
|
||||
takes place at:
|
||||
|
||||
http://tcl.sourceforge.net/
|
||||
http://core.tcl.tk/
|
||||
|
||||
Tcl/Tk release and mailing list services are hosted by SourceForge:
|
||||
|
||||
http://sourceforge.net/projects/tcl/
|
||||
|
||||
with the Tcl Developer Xchange hosted at:
|
||||
|
||||
@@ -49,7 +53,7 @@ The home page for this release, including new features, is
|
||||
|
||||
Detailed release notes can be found at the file distributions page
|
||||
by clicking on the relevant version.
|
||||
http://sourceforge.net/projects/tcl/files/
|
||||
http://sourceforge.net/projects/tcl/files/Tcl/
|
||||
|
||||
Information about Tcl itself can be found at
|
||||
http://www.tcl.tk/about/
|
||||
@@ -146,18 +150,13 @@ and go to the Mailing Lists page.
|
||||
------------------------
|
||||
|
||||
We are very interested in receiving bug reports, patches, and suggestions
|
||||
for improvements. We prefer that you send this information to us via the
|
||||
bug form at SourceForge, rather than emailing us directly. The bug
|
||||
database is at:
|
||||
for improvements. We prefer that you send this information to us as
|
||||
tickets entered into our tracker at:
|
||||
|
||||
http://tcl.sourceforge.net/
|
||||
|
||||
The bug form was designed to give uniform structure to bug reports as
|
||||
well as to solicit enough information to minimize followup questions.
|
||||
http://core.tcl.tk/tcl/reportlist
|
||||
|
||||
We will log and follow-up on each bug, although we cannot promise a
|
||||
specific turn-around time. Enhancements, reported via the Feature
|
||||
Requests form at the same web site, may take longer and may not happen
|
||||
specific turn-around time. Enhancements may take longer and may not happen
|
||||
at all unless there is widespread support for them (we're trying to
|
||||
slow the rate at which Tcl/Tk turns into a kitchen sink). It's very
|
||||
difficult to make incompatible changes to Tcl/Tk at this point, due to
|
||||
|
||||
@@ -8163,3 +8163,144 @@ Dropped support for OS X versions less than 10.4 (Tiger) (fellows)
|
||||
2012-12-13 (bug fix) crash: [zlib gunzip $data -header noSuchNs::var] (porter)
|
||||
|
||||
--- Released 8.6.0, December 20, 2012 --- See ChangeLog for details ---
|
||||
|
||||
2012-12-22 (bug fix)[3598150] DString to Tcl_Obj memleak (afredd)
|
||||
|
||||
2012-12-27 (bug fix)[3598580] Tcl_ListObjReplace() refcount fix (nijtmans)
|
||||
|
||||
2013-01-04 (bug fix) memleak in [format] compiler (fellows)
|
||||
|
||||
2013-01-08 (bug fix)[3092089,3587096] [file normalize] on junction points
|
||||
|
||||
2013-01-09 (bug fix)[3599395] status line processing (nijtmans)
|
||||
2013-01-23 (bug fix)[2911139] repair async connection management (fellows)
|
||||
=> http 2.8.6
|
||||
|
||||
2013-01-26 (bug fix)[3601804] Darwin segfault platformCPUID (nijtmans)
|
||||
|
||||
2013-01-28 (enhancement) improve ensemble bytecode (fellows)
|
||||
|
||||
2013-01-30 (enhancement) selected script code improvements (fradin)
|
||||
=> tcltest 2.3.6
|
||||
|
||||
2013-01-30 (bug fix)[3599098] update to handle glibc banner changes (kupries)
|
||||
=> platform 1.0.11
|
||||
|
||||
2013-01-31 (bug fix)[3598282] make install DESTDIR support (cassoff)
|
||||
|
||||
2013-02-05 (bug fix)[3603434] [file normalize a:/] flaw in VFS (porter,griffin)
|
||||
|
||||
2013-02-09 (bug fix)[3603695] $obj varname resolution rules (venable,fellows)
|
||||
|
||||
2013-02-11 (bug fix)[3603553] zlib flushing errors (vampiera,fellows)
|
||||
|
||||
2013-02-14 (bug fix)[3604576] msgcat use of Windows registry (oehlmann,nijtmans)
|
||||
=> msgcat 1.5.1
|
||||
|
||||
2013-02-19 (bug fix)[2438181] report errors in trace handlers (yorick)
|
||||
|
||||
2013-02-21 (bug fix)[3605447] unbreak [namespace export -clear] (porter)
|
||||
|
||||
2013-02-23 (bug fix)[3599194] fallback IPv6 routines (afredd,max)
|
||||
|
||||
2013-02-27 (bug fix)[3606139] stop crash in [regexp] (lane)
|
||||
|
||||
2013-03-03 (bug fix)[3606258] major serial port update (english)
|
||||
|
||||
2013-03-06 (bug fix)[3606683] [regexp (((((a)*)*)*)*)* {}] hangs
|
||||
(grathwohl,lane,porter)
|
||||
|
||||
2013-03-12 (enhancement) better build support for Debian arch (shadura)
|
||||
|
||||
2013-03-19 (bug fix)[2893771] [file stat] on locked files (thoyts,nijtmans)
|
||||
|
||||
2013-03-21 (bug fix)[2102614] [auto_mkindex] ensemble support (griffin)
|
||||
|
||||
2013-03-27 Tcl_Zlib*() routines tolerate NULL interps (porter
|
||||
|
||||
2013-04-04 (bug fix) Support URLs with query but no path (max)
|
||||
=> http 2.8.7
|
||||
|
||||
2013-04-08 (bug fix)[3610026] regexp crash on color overflow (linnakangas)
|
||||
|
||||
2013-04-29 (enhancement) [array set] compile improvement (fellows)
|
||||
|
||||
2013-04-30 (enhancement) broaden glibc version detection (kupries)
|
||||
=> platform 1.0.12
|
||||
|
||||
2013-05-06 (platform support) Cygwin64 (nijtmans)
|
||||
|
||||
2013-05-15 (enhancement) Improved [list {*}...] compile (fellows)
|
||||
|
||||
2013-05-16 (platform support) mingw-4.0 (nijtmans)
|
||||
|
||||
2013-05-19 (platform support) FreeBSD updates (cerutti)
|
||||
|
||||
2013-05-20 (bug fix)[3613567] access error temp file creation (keene)
|
||||
|
||||
2013-05-20 (bug fix)[3613569] temp file open fail can crash [load] (keene)
|
||||
|
||||
2013-05-22 (bug fix)[3613609] [lsort -nocase] failed on non-ASCII (fellows)
|
||||
|
||||
2013-05-28 (bug fix)[3036566] Use language packs (Vista+) locale (oehlmann)
|
||||
=> msgcat 1.5.2
|
||||
|
||||
2013-05-29 (bug fix)[3614102] [apply {{} {list [if 1]}}] stack woes (porter)
|
||||
|
||||
2013-06-03 Restored lost performance appending to long strings (elby,porter)
|
||||
|
||||
2013-06-05 (bug fix)[2835313] [while 1 {foo [continue]}] crash (fellows)
|
||||
|
||||
2013-06-17 (bug fix)[a876646] [:cntrl:] includes \x00 to \x1f (nijtmans)
|
||||
|
||||
2013-06-27 (bug fix)[983509] missing encodings for config values (nijtmans)
|
||||
|
||||
2013-06-27 (bug fix)[34538b] apply DST in 2099 (lang)
|
||||
|
||||
2013-07-02 (bug fix)[32afa6] corrected dirent64 check (griffin)
|
||||
|
||||
2013-07-06 tzdata updated to Olson's tzdata2013d (kenny)
|
||||
|
||||
2013-07-10 (bug fix)[86fb5e] [info frame] in compiled ensembles (porter)
|
||||
|
||||
2013-07-18 (bug fix)[1c17fb] revisd syntax errorinfo that shows error (porter)
|
||||
|
||||
2013-07-26 (bug fix)[6585b2] regexp {(\w).*?\1} abb (lane)
|
||||
|
||||
2013-07-29 [string is space \u202f] => 1 (nijtmans)
|
||||
|
||||
2013-08-01 [a0bc85] Limited support for fork with threads (for Rivet) (nijtmans)
|
||||
|
||||
2013-08-01 (bug fix)[1905562] RE recursion limit increased to support
|
||||
reported usage of large expressions (porter)
|
||||
|
||||
2013-08-02 (bug fix)[9d6162] superclass slot empty crash (vdgoot,fellows)2013-08-02 (bug fix)[9d6162] superclass slot empty crash (vdgoot,fellows)
|
||||
|
||||
2013-08-03 (enhancement)[3611643] [auto_mkindex] support TclOO (fellows)
|
||||
|
||||
2013-08-14 (bug fix)[a16752] Missing command delete callbacks (porter)
|
||||
|
||||
2013-08-15 (bug fix)[3610404] reresolve traced forwards (porter)
|
||||
|
||||
2013-08-15 Errors from execution traces become errors of the command (porter)
|
||||
|
||||
2013-08-23 (bug fix)[8ff0cb9] Tcl_NR*Eval*() schedule only, as doc'd (porter)
|
||||
|
||||
2013-08-29 (bug fix)[2486550] enable [interp invokehidden {} yield] (porter)
|
||||
|
||||
2013-09-01 (bug fix)[b98fa55] [binary decode] fail on whitespace (reche,fellows)
|
||||
|
||||
2013-09-07 (bug fix)[86ceb4] have tm path favor first provider (neumann,porter)
|
||||
|
||||
2013-09-09 (bug fix)[3609693] copied object member variable confusion (fellows)
|
||||
=> TclOO 1.0.1
|
||||
|
||||
2013-09-17 (bug fix)[2152292] [binary encode uuencode] corrected (fellows)
|
||||
|
||||
2013-09-19 (bug fix)[3487626] segfaults in [dict] compilers (porter)
|
||||
|
||||
2013-09-19 (bug fix)[31661d2] mem leak in [lreplace] (ade,porter)
|
||||
|
||||
Many optmizations, improvements, and tightened stack management in bytecode.
|
||||
|
||||
--- Released 8.6.1, Septemer 20, 2013 --- http://core.tcl.tk/tcl/ for details
|
||||
|
||||
Binary file not shown.
+6
-6
@@ -176,16 +176,16 @@ these return options.
|
||||
The \fB\-errorinfo\fR option holds a stack trace of the
|
||||
operations that were in progress when an error occurred,
|
||||
and is intended to be human-readable.
|
||||
The \fB\-errorcode\fR option holds a list of items that
|
||||
The \fB\-errorcode\fR option holds a Tcl list of items that
|
||||
are intended to be machine-readable.
|
||||
The first item in the \fB\-errorcode\fR value identifies the class of
|
||||
error that occurred
|
||||
(e.g. POSIX means an error occurred in a POSIX system call)
|
||||
(e.g., POSIX means an error occurred in a POSIX system call)
|
||||
and additional elements hold additional pieces
|
||||
of information that depend on the class.
|
||||
See the \fBtclvars\fR manual entry for details on the various
|
||||
formats for the \fB\-errorcode\fR option used by
|
||||
Tcl's built-in commands.
|
||||
See the manual entry on the \fBerrorCode\fR variable for details on the
|
||||
various formats for the \fB\-errorcode\fR option used by Tcl's built-in
|
||||
commands.
|
||||
.PP
|
||||
The \fB\-errorinfo\fR option value is gradually built up as an
|
||||
error unwinds through the nested operations.
|
||||
@@ -307,6 +307,6 @@ so they continue to hold a record of information about the
|
||||
most recent error seen in an interpreter.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_Interp(3), Tcl_ResetResult(3),
|
||||
Tcl_SetErrno(3), tclvars(n)
|
||||
Tcl_SetErrno(3), errorCode(n), errorInfo(n)
|
||||
.SH KEYWORDS
|
||||
error, value, value result, stack, trace, variable
|
||||
|
||||
+4
-3
@@ -41,8 +41,9 @@ may only be passed to Tcl routines called from the same thread as
|
||||
the original \fBTcl_CreateInterp\fR call. It is not safe for multiple
|
||||
threads to pass the same token to Tcl's routines.
|
||||
The new interpreter is initialized with the built-in Tcl commands
|
||||
and with the variables documented in the \fBtclvars\fR manual page. To bind in
|
||||
additional commands, call \fBTcl_CreateCommand\fR.
|
||||
and with standard variables like \fBtcl_platform\fR and \fBenv\fR. To
|
||||
bind in additional commands, call \fBTcl_CreateCommand\fR, and to
|
||||
create additional variables, call \fBTcl_SetVar\fR.
|
||||
.PP
|
||||
\fBTcl_DeleteInterp\fR marks an interpreter as deleted; the interpreter
|
||||
will eventually be deleted when all calls to \fBTcl_Preserve\fR for it have
|
||||
@@ -144,6 +145,6 @@ should be used to determine when an interpreter is a candidate for deletion
|
||||
due to inactivity.
|
||||
.VE 8.6
|
||||
.SH "SEE ALSO"
|
||||
Tcl_Preserve(3), Tcl_Release(3), tclvars(n)
|
||||
Tcl_Preserve(3), Tcl_Release(3)
|
||||
.SH KEYWORDS
|
||||
command, create, delete, interpreter
|
||||
|
||||
+1
-1
@@ -33,6 +33,6 @@ Tcl-based applications using \fBputenv\fR should redefine it to
|
||||
\fBTcl_PutEnv\fR so that they will interface properly to the Tcl
|
||||
runtime.
|
||||
.SH "SEE ALSO"
|
||||
tclvars(n)
|
||||
env(n)
|
||||
.SH KEYWORDS
|
||||
environment, variable
|
||||
|
||||
+3
-2
@@ -172,8 +172,9 @@ typedef struct {
|
||||
.PP
|
||||
The \fIversion\fR field allows for future expansion of the structure, and
|
||||
should always be declared equal to TCL_OO_METHOD_VERSION_CURRENT. The
|
||||
\fIname\fR field provides a human-readable name for the type, and is reserved
|
||||
for debugging.
|
||||
\fIname\fR field provides a human-readable name for the type, and is the value
|
||||
that is exposed via the \fBinfo class methodtype\fR and
|
||||
\fBinfo object methodtype\fR Tcl commands.
|
||||
.PP
|
||||
The \fIcallProc\fR field gives a function that is called when the method is
|
||||
invoked; it must never be NULL.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
.TH NRE 3 8.6 Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts.
|
||||
Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRExprObj, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts.
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -207,7 +207,7 @@ is something like:
|
||||
.PP
|
||||
.CS
|
||||
int
|
||||
\fITheCmdObjProc\fR(
|
||||
\fITheCmdOldObjProc\fR(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -225,7 +225,7 @@ int
|
||||
return result;
|
||||
}
|
||||
\fBTcl_CreateObjCommand\fR(interp, "theCommand",
|
||||
\fITheCmdObjProc\fR, clientData, TheCmdDeleteProc);
|
||||
\fITheCmdOldObjProc\fR, clientData, TheCmdDeleteProc);
|
||||
.CE
|
||||
.PP
|
||||
To enable a command like this one for trampoline-based evaluation,
|
||||
@@ -255,8 +255,8 @@ int
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
return \fBTcl_NRCallObjProc\fR(interp, name,
|
||||
\fITheCmdNRObjProc\fR, clientData, objc, objv);
|
||||
return \fBTcl_NRCallObjProc\fR(interp, \fITheCmdNRObjProc\fR,
|
||||
clientData, objc, objv);
|
||||
}
|
||||
.CE
|
||||
.PP
|
||||
@@ -317,7 +317,7 @@ and the second is for use when there is already a trampoline in place.
|
||||
.PP
|
||||
.CS
|
||||
\fBTcl_NRCreateCommand\fR(interp, "theCommand",
|
||||
\fITheCmdObjProc\fR, \fITheCmdNRObjProc\fR, clientData,
|
||||
\fITheCmdNewObjProc\fR, \fITheCmdNRObjProc\fR, clientData,
|
||||
TheCmdDeleteProc);
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
|
||||
+4
-1
@@ -85,6 +85,9 @@ proc bgerror {message} {
|
||||
}
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
after(n), interp(n), tclvars(n)
|
||||
after(n), errorCode(n), errorInfo(n), interp(n)
|
||||
.SH KEYWORDS
|
||||
background error, reporting
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
|
||||
+21
-5
@@ -36,6 +36,13 @@ The \fBbinary encode\fR and \fBbinary decode\fR subcommands convert
|
||||
binary data to or from string encodings such as base64 (used in MIME
|
||||
messages for example).
|
||||
.VE 8.6
|
||||
.PP
|
||||
Note that other operations on binary data, such as taking a subsequence of it,
|
||||
getting its length, or reinterpreting it as a string in some encoding, are
|
||||
done by other Tcl commands (respectively \fBstring range\fR,
|
||||
\fBstring length\fR and \fBencoding convertfrom\fR in the example cases). A
|
||||
binary string in Tcl is merely one where all the characters it contains are in
|
||||
the range \eu0000\-\eu00FF.
|
||||
.SH "BINARY ENCODE AND DECODE"
|
||||
.VS 8.6
|
||||
.PP
|
||||
@@ -95,13 +102,14 @@ between Unix systems and on USENET, but is less common these days, having been
|
||||
largely superseded by the \fBbase64\fR binary encoding.
|
||||
.RS
|
||||
.PP
|
||||
During encoding, the following options are supported:
|
||||
'\" This is wrong! The uuencode format had more complexity than this!
|
||||
During encoding, the following options are supported (though changing them may
|
||||
produce files that other implementations of decoders cannot process):
|
||||
.TP
|
||||
\fB\-maxlen \fIlength\fR
|
||||
.
|
||||
Indicates that the output should be split into lines of no more than
|
||||
\fIlength\fR characters. By default, lines are not split.
|
||||
\fIlength\fR characters. By default, lines are split every 61 characters, and
|
||||
this must be in the range 3 to 85 due to limitations in the encoding.
|
||||
.TP
|
||||
\fB\-wrapchar \fIcharacter\fR
|
||||
.
|
||||
@@ -114,7 +122,11 @@ During decoding, the following options are supported:
|
||||
.TP
|
||||
\fB\-strict\fR
|
||||
.
|
||||
Instructs the decoder to throw an error if it encounters whitespace characters. Otherwise it ignores them.
|
||||
Instructs the decoder to throw an error if it encounters unexpected whitespace
|
||||
characters. Otherwise it ignores them.
|
||||
.PP
|
||||
Note that neither the encoder nor the decoder handle the header and footer of
|
||||
the uuencode format.
|
||||
.RE
|
||||
.VE 8.6
|
||||
.SH "BINARY FORMAT"
|
||||
@@ -855,6 +867,7 @@ architectures, use their textual representation (as produced by
|
||||
.PP
|
||||
This is a procedure to write a Tcl string to a binary-encoded channel as
|
||||
UTF-8 data preceded by a length word:
|
||||
.PP
|
||||
.CS
|
||||
proc \fIwriteString\fR {channel string} {
|
||||
set data [encoding convertto utf-8 $string]
|
||||
@@ -865,6 +878,7 @@ proc \fIwriteString\fR {channel string} {
|
||||
.PP
|
||||
This procedure reads a string from a channel that was written by the
|
||||
previously presented \fIwriteString\fR procedure:
|
||||
.PP
|
||||
.CS
|
||||
proc \fIreadString\fR {channel} {
|
||||
if {![\fBbinary scan\fR [read $channel 4] I length]} {
|
||||
@@ -877,6 +891,7 @@ proc \fIreadString\fR {channel} {
|
||||
.PP
|
||||
This converts the contents of a file (named in the variable \fIfilename\fR) to
|
||||
base64 and prints them:
|
||||
.PP
|
||||
.CS
|
||||
set f [open $filename rb]
|
||||
set data [read $f]
|
||||
@@ -884,9 +899,10 @@ close $f
|
||||
puts [\fBbinary encode\fR base64 \-maxlen 64 $data]
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
format(n), scan(n), tclvars(n)
|
||||
encoding(n), format(n), scan(n), string(n), tcl_platform(n)
|
||||
.SH KEYWORDS
|
||||
binary, format, scan
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" fill-column: 78
|
||||
'\" End:
|
||||
|
||||
+2
-1
@@ -115,7 +115,8 @@ if { [\fBcatch\fR {open $someFile w} fid] } {
|
||||
There are more complex examples of \fBcatch\fR usage in the
|
||||
documentation for the \fBreturn\fR command.
|
||||
.SH "SEE ALSO"
|
||||
break(n), continue(n), dict(n), error(n), info(n), return(n), tclvars(n)
|
||||
break(n), continue(n), dict(n), error(n), errorCode(n), errorInfo(n), info(n),
|
||||
return(n)
|
||||
.SH KEYWORDS
|
||||
catch, error, exception
|
||||
'\" Local Variables:
|
||||
|
||||
+2
-1
@@ -75,7 +75,8 @@ However, the last line would now normally be written without
|
||||
set var [linsert $var 0 {*}$args]
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
catch(n), concat(n), error(n), interp(n), list(n), namespace(n), subst(n), tclvars(n), uplevel(n)
|
||||
catch(n), concat(n), error(n), errorCode(n), errorInfo(n), interp(n), list(n),
|
||||
namespace(n), subst(n), uplevel(n)
|
||||
.SH KEYWORDS
|
||||
concatenate, evaluate, script
|
||||
'\" Local Variables:
|
||||
|
||||
@@ -481,6 +481,13 @@ Returns \fB1\fR if file \fIname\fR is writable by the current user,
|
||||
.
|
||||
These commands always operate using the real user and group identifiers,
|
||||
not the effective ones.
|
||||
.TP
|
||||
\fBWindows\fR\0\0\0\0
|
||||
.
|
||||
The \fBfile owned\fR subcommand currently always reports that the current user
|
||||
is the owner of the file, without regard for what the operating system
|
||||
believes to be true, making an ownership test useless. This issue (#3613671)
|
||||
may be fixed in a future release of Tcl.
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
This procedure shows how to search for C files in a given directory
|
||||
|
||||
+6
-6
@@ -296,7 +296,6 @@ Returns the name of the library directory in which standard Tcl
|
||||
scripts are stored.
|
||||
This is actually the value of the \fBtcl_library\fR
|
||||
variable and may be changed by setting \fBtcl_library\fR.
|
||||
See the \fBtclvars\fR manual entry for more information.
|
||||
.TP
|
||||
\fBinfo loaded \fR?\fIinterp\fR?
|
||||
.
|
||||
@@ -336,8 +335,8 @@ described in \fBOBJECT INTROSPECTION\fR below.
|
||||
.TP
|
||||
\fBinfo patchlevel\fR
|
||||
.
|
||||
Returns the value of the global variable \fBtcl_patchLevel\fR; see
|
||||
the \fBtclvars\fR manual entry for more information.
|
||||
Returns the value of the global variable \fBtcl_patchLevel\fR, which holds
|
||||
the exact version of the Tcl library by default.
|
||||
.TP
|
||||
\fBinfo procs \fR?\fIpattern\fR?
|
||||
.
|
||||
@@ -374,8 +373,8 @@ string is returned.
|
||||
.TP
|
||||
\fBinfo tclversion\fR
|
||||
.
|
||||
Returns the value of the global variable \fBtcl_version\fR; see
|
||||
the \fBtclvars\fR manual entry for more information.
|
||||
Returns the value of the global variable \fBtcl_version\fR, which holds the
|
||||
major and minor version of the Tcl library by default.
|
||||
.TP
|
||||
\fBinfo vars\fR ?\fIpattern\fR?
|
||||
.
|
||||
@@ -763,8 +762,9 @@ proc getDef {obj method} {
|
||||
.VE 8.6
|
||||
.SH "SEE ALSO"
|
||||
.VS 8.6
|
||||
global(n), oo::class(n), oo::define(n), oo::object(n), proc(n), self(n)
|
||||
global(n), oo::class(n), oo::define(n), oo::object(n), proc(n), self(n),
|
||||
.VE 8.6
|
||||
tcl_library(n), tcl_patchLevel(n), tcl_version(n)
|
||||
.SH KEYWORDS
|
||||
command, information, interpreter, introspection, level, namespace,
|
||||
.VS 8.6
|
||||
|
||||
+7
-3
@@ -262,13 +262,17 @@ If set to any value, then \fBunknown\fR will not attempt to auto-load
|
||||
any commands.
|
||||
.TP
|
||||
\fBauto_path\fR
|
||||
.
|
||||
If set, then it must contain a valid Tcl list giving directories to
|
||||
search during auto-load operations.
|
||||
search during auto-load operations (including for package index
|
||||
files when using the default \fBpackage unknown\fR handler).
|
||||
This variable is initialized during startup to contain, in order:
|
||||
the directories listed in the \fBTCLLIBPATH\fR environment variable,
|
||||
the directory named by the \fBtcl_library\fR variable,
|
||||
the directory named by the \fBtcl_library\fR global variable,
|
||||
the parent directory of \fBtcl_library\fR,
|
||||
the directories listed in the \fBtcl_pkgPath\fR variable.
|
||||
Additional locations to look for files and package indices should
|
||||
normally be added to this variable using \fBlappend\fR.
|
||||
.TP
|
||||
\fBenv(TCL_LIBRARY)\fR
|
||||
If set, then it specifies the location of the directory containing
|
||||
@@ -306,7 +310,7 @@ considered to be a word character. On Windows platforms, words are
|
||||
comprised of any character that is not a space, tab, or newline. Under
|
||||
Unix, words are comprised of numbers, letters or underscores.
|
||||
.SH "SEE ALSO"
|
||||
info(n), re_syntax(n), tclvars(n)
|
||||
env(n), info(n), re_syntax(n)
|
||||
.SH KEYWORDS
|
||||
auto-exec, auto-load, library, unknown, word, whitespace
|
||||
'\"Local Variables:
|
||||
|
||||
+4
-3
@@ -35,7 +35,7 @@ msgcat \- Tcl message catalog
|
||||
\fB::msgcat::mcflmset \fIsrc-trans-list\fR
|
||||
.VE "TIP 404"
|
||||
.sp
|
||||
\fB::msgcat::mcunknown \fIlocale src-string\fR
|
||||
\fB::msgcat::mcunknown \fIlocale src-string\fR ?\fIarg arg ...\fR?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -157,12 +157,13 @@ translate-string\fR ?\fIsrc-string translate-string ...\fR?}
|
||||
of \fB::msgcat::mcflset\fR. The function returns the number of translations set.
|
||||
.VE "TIP 404"
|
||||
.TP
|
||||
\fB::msgcat::mcunknown \fIlocale src-string\fR
|
||||
\fB::msgcat::mcunknown \fIlocale src-string\fR ?\fIarg arg ...\fR?
|
||||
.
|
||||
This routine is called by \fB::msgcat::mc\fR in the case when
|
||||
a translation for \fIsrc-string\fR is not defined in the
|
||||
current locale. The default action is to return
|
||||
\fIsrc-string\fR. This procedure can be redefined by the
|
||||
\fIsrc-string\fR passed by format if there are any arguments. This
|
||||
procedure can be redefined by the
|
||||
application, for example to log error messages for each unknown
|
||||
string. The \fB::msgcat::mcunknown\fR procedure is invoked at the
|
||||
same stack context as the call to \fB::msgcat::mc\fR. The return value
|
||||
|
||||
+7
-4
@@ -62,14 +62,14 @@ The method chain is cached for future use.
|
||||
When constructing the method chain, method implementations are searched for in
|
||||
the following order:
|
||||
.IP [1]
|
||||
In the object.
|
||||
.IP [2]
|
||||
In the classes mixed into the object, in class traversal order. The list of
|
||||
mixins is checked in natural order.
|
||||
.IP [3]
|
||||
.IP [2]
|
||||
In the classes mixed into the classes of the object, with sources of mixing in
|
||||
being searched in class traversal order. Within each class, the list of mixins
|
||||
is processed in natural order.
|
||||
.IP [3]
|
||||
In the object itself.
|
||||
.IP [4]
|
||||
In the object's class.
|
||||
.IP [5]
|
||||
@@ -77,7 +77,10 @@ In the superclasses of the class, following each superclass in a depth-first
|
||||
fashion in the natural order of the superclass list.
|
||||
.PP
|
||||
Any particular method implementation always comes as \fIlate\fR in the
|
||||
resulting list of implementations as possible.
|
||||
resulting list of implementations as possible; this means that if some class,
|
||||
A, is both mixed into a class, B, and is also a superclass of B, the instances
|
||||
of B will always treat A as a superclass from the perspective of inheritance.
|
||||
This is true even when the multiple inheritance is processed indirectly.
|
||||
.SS FILTERS
|
||||
.PP
|
||||
When an object has a list of filter names set upon it, or is an instance of a
|
||||
|
||||
+2
-2
@@ -317,8 +317,8 @@ proc myReturn {args} {
|
||||
}
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
break(n), catch(n), continue(n), dict(n), error(n), proc(n),
|
||||
source(n), tclvars(n), throw(n), try(n)
|
||||
break(n), catch(n), continue(n), dict(n), error(n), errorCode(n),
|
||||
errorInfo(n), proc(n), source(n), throw(n), try(n)
|
||||
.SH KEYWORDS
|
||||
break, catch, continue, error, exception, procedure, result, return
|
||||
.\" Local Variables:
|
||||
|
||||
+5
-3
@@ -102,7 +102,9 @@ but also the disadvantage of making it harder to write scripts that
|
||||
start up uniformly across different versions of Tcl.
|
||||
.SH "VARIABLES"
|
||||
.PP
|
||||
\fBTclsh\fR sets the following Tcl variables:
|
||||
\fBTclsh\fR sets the following global Tcl variables in addition to those
|
||||
created by the Tcl library itself (such as \fBenv\fR, which maps
|
||||
environment variables such as \fBPATH\fR into Tcl):
|
||||
.TP 15
|
||||
\fBargc\fR
|
||||
.
|
||||
@@ -129,7 +131,7 @@ device), 0 otherwise.
|
||||
When \fBtclsh\fR is invoked interactively it normally prompts for each
|
||||
command with
|
||||
.QW "\fB% \fR" .
|
||||
You can change the prompt by setting the
|
||||
You can change the prompt by setting the global
|
||||
variables \fBtcl_prompt1\fR and \fBtcl_prompt2\fR. If variable
|
||||
\fBtcl_prompt1\fR exists then it must consist of a Tcl script
|
||||
to output a prompt; instead of outputting a prompt \fBtclsh\fR
|
||||
@@ -142,6 +144,6 @@ incomplete commands.
|
||||
.PP
|
||||
See \fBTcl_StandardChannels\fR for more explanations.
|
||||
.SH "SEE ALSO"
|
||||
encoding(n), fconfigure(n), tclvars(n)
|
||||
auto_path(n), encoding(n), env(n), fconfigure(n)
|
||||
.SH KEYWORDS
|
||||
application, argument, interpreter, prompt, script file, shell
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ The following produces an error that is identical to that produced by
|
||||
\fBthrow\fR {ARITH DIVZERO {divide by zero}} {divide by zero}
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
catch(n), error(n), return(n), tclvars(n), try(n)
|
||||
catch(n), error(n), errorCode(n), errorInfo(n), return(n), try(n)
|
||||
.SH "KEYWORDS"
|
||||
error, exception
|
||||
'\" Local Variables:
|
||||
|
||||
@@ -259,8 +259,9 @@ static const chr alphaCharTable[] = {
|
||||
*/
|
||||
|
||||
static const crange controlRangeTable[] = {
|
||||
{0x7f, 0x9f}, {0x600, 0x604}, {0x200b, 0x200f}, {0x202a, 0x202e},
|
||||
{0x2060, 0x2064}, {0x206a, 0x206f}, {0xe000, 0xf8ff}, {0xfff9, 0xfffb}
|
||||
{0x0, 0x1f}, {0x7f, 0x9f}, {0x600, 0x604}, {0x200b, 0x200f},
|
||||
{0x202a, 0x202e}, {0x2060, 0x2064}, {0x206a, 0x206f}, {0xe000, 0xf8ff},
|
||||
{0xfff9, 0xfffb}
|
||||
#if TCL_UTF_MAX > 4
|
||||
,{0x1d173, 0x1d17a}, {0xe0020, 0xe007f}, {0xf0000, 0xffffd}, {0x100000, 0x10fffd}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -824,7 +824,7 @@ duptraverse(
|
||||
* make all normal tests (not reg-33.14) pass.
|
||||
*/
|
||||
#ifndef DUPTRAVERSE_MAX_DEPTH
|
||||
#define DUPTRAVERSE_MAX_DEPTH 700
|
||||
#define DUPTRAVERSE_MAX_DEPTH 15000
|
||||
#endif
|
||||
|
||||
if (depth++ > DUPTRAVERSE_MAX_DEPTH) {
|
||||
|
||||
+1
-6
@@ -504,12 +504,7 @@ complicatedFindLoop(
|
||||
return er;
|
||||
}
|
||||
if ((shorter) ? end == estop : end == begin) {
|
||||
/*
|
||||
* No point in trying again.
|
||||
*/
|
||||
|
||||
*coldp = cold;
|
||||
return REG_NOMATCH;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+3
-3
@@ -341,12 +341,12 @@ struct subre {
|
||||
#define CAP 010 /* capturing parens below */
|
||||
#define BACKR 020 /* back reference below */
|
||||
#define INUSE 0100 /* in use in final tree */
|
||||
#define LOCAL 03 /* bits which may not propagate up */
|
||||
#define NOPROP 03 /* bits which may not propagate up */
|
||||
#define LMIX(f) ((f)<<2) /* LONGER -> MIXED */
|
||||
#define SMIX(f) ((f)<<1) /* SHORTER -> MIXED */
|
||||
#define UP(f) (((f)&~LOCAL) | (LMIX(f) & SMIX(f) & MIXED))
|
||||
#define UP(f) (((f)&~NOPROP) | (LMIX(f) & SMIX(f) & MIXED))
|
||||
#define MESSY(f) ((f)&(MIXED|CAP|BACKR))
|
||||
#define PREF(f) ((f)&LOCAL)
|
||||
#define PREF(f) ((f)&NOPROP)
|
||||
#define PREF2(f1, f2) ((PREF(f1) != 0) ? PREF(f1) : PREF(f2))
|
||||
#define COMBINE(f1, f2) (UP((f1)|(f2)) | PREF2(f1, f2))
|
||||
short retry; /* index into retry memory */
|
||||
|
||||
+9
-7
@@ -56,10 +56,10 @@ extern "C" {
|
||||
#define TCL_MAJOR_VERSION 8
|
||||
#define TCL_MINOR_VERSION 6
|
||||
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
|
||||
#define TCL_RELEASE_SERIAL 0
|
||||
#define TCL_RELEASE_SERIAL 1
|
||||
|
||||
#define TCL_VERSION "8.6"
|
||||
#define TCL_PATCH_LEVEL "8.6.0"
|
||||
#define TCL_PATCH_LEVEL "8.6.1"
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
@@ -329,10 +329,12 @@ typedef long LONG;
|
||||
* in ANSI C; maps them to type "char *" in non-ANSI systems.
|
||||
*/
|
||||
|
||||
#ifndef NO_VOID
|
||||
# define VOID void
|
||||
#else
|
||||
# define VOID char
|
||||
#ifndef __VXWORKS__
|
||||
# ifndef NO_VOID
|
||||
# define VOID void
|
||||
# else
|
||||
# define VOID char
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2415,7 +2417,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
|
||||
*/
|
||||
|
||||
#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
|
||||
(Tcl_FindExecutable(argv[0]), (Tcl_CreateInterp)()))
|
||||
((Tcl_CreateInterp)()))
|
||||
EXTERN void Tcl_MainEx(int argc, char **argv,
|
||||
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
|
||||
EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
|
||||
|
||||
+37
-42
@@ -20,7 +20,7 @@
|
||||
*- break and continue - if exception ranges can be sorted out.
|
||||
*- foreach_start4, foreach_step4
|
||||
*- returnImm, returnStk
|
||||
*- expandStart, expandStkTop, invokeExpanded, listExpanded
|
||||
*- expandStart, expandStkTop, invokeExpanded, expandDrop
|
||||
*- dictFirst, dictNext, dictDone
|
||||
*- dictUpdateStart, dictUpdateEnd
|
||||
*- jumpTable testing
|
||||
@@ -323,29 +323,6 @@ static const Tcl_ObjType assembleCodeType = {
|
||||
NULL /* setFromAnyProc */
|
||||
};
|
||||
|
||||
/*
|
||||
* TIP #280: Remember the per-word line information of the current command. An
|
||||
* index is used instead of a pointer as recursive compilation may reallocate,
|
||||
* i.e. move, the array. This is also the reason to save the nuloc now, it may
|
||||
* change during the course of the function.
|
||||
*
|
||||
* Macro to encapsulate the variable definition and setup.
|
||||
*/
|
||||
|
||||
#define DefineLineInformation \
|
||||
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
|
||||
int eclIndex = mapPtr->nuloc - 1
|
||||
|
||||
#define SetLineInformation(word) \
|
||||
envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
|
||||
envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
|
||||
|
||||
/*
|
||||
* Flags bits used by PushVarName.
|
||||
*/
|
||||
|
||||
#define TCL_NO_LARGE_INDEX 1 /* Do not return localIndex value > 255 */
|
||||
|
||||
/*
|
||||
* Source instructions recognized in the Tcl Assembly Language (TAL)
|
||||
*/
|
||||
@@ -410,9 +387,8 @@ static const TalInstDesc TalInstructionTable[] = {
|
||||
{"incrArrayStkImm", ASSEM_SINT1, INST_INCR_ARRAY_STK_IMM,2, 1},
|
||||
{"incrImm", ASSEM_LVT1_SINT1,
|
||||
INST_INCR_SCALAR1_IMM, 0, 1},
|
||||
{"incrStk", ASSEM_1BYTE, INST_INCR_SCALAR_STK, 2, 1},
|
||||
{"incrStkImm", ASSEM_SINT1, INST_INCR_SCALAR_STK_IMM,
|
||||
1, 1},
|
||||
{"incrStk", ASSEM_1BYTE, INST_INCR_STK, 2, 1},
|
||||
{"incrStkImm", ASSEM_SINT1, INST_INCR_STK_IMM, 1, 1},
|
||||
{"infoLevelArgs", ASSEM_1BYTE, INST_INFO_LEVEL_ARGS, 1, 1},
|
||||
{"infoLevelNumber", ASSEM_1BYTE, INST_INFO_LEVEL_NUM, 0, 1},
|
||||
{"invokeStk", ASSEM_INVOKE, (INST_INVOKE_STK1 << 8
|
||||
@@ -448,7 +424,7 @@ static const TalInstDesc TalInstructionTable[] = {
|
||||
{"loadArray", ASSEM_LVT, (INST_LOAD_ARRAY1<<8
|
||||
| INST_LOAD_ARRAY4), 1, 1},
|
||||
{"loadArrayStk", ASSEM_1BYTE, INST_LOAD_ARRAY_STK, 2, 1},
|
||||
{"loadStk", ASSEM_1BYTE, INST_LOAD_SCALAR_STK, 1, 1},
|
||||
{"loadStk", ASSEM_1BYTE, INST_LOAD_STK, 1, 1},
|
||||
{"lor", ASSEM_1BYTE, INST_LOR, 2, 1},
|
||||
{"lsetFlat", ASSEM_LSET_FLAT,INST_LSET_FLAT, INT_MIN,1},
|
||||
{"lsetList", ASSEM_1BYTE, INST_LSET_LIST, 3, 1},
|
||||
@@ -475,7 +451,7 @@ static const TalInstDesc TalInstructionTable[] = {
|
||||
{"storeArray", ASSEM_LVT, (INST_STORE_ARRAY1<<8
|
||||
| INST_STORE_ARRAY4), 2, 1},
|
||||
{"storeArrayStk", ASSEM_1BYTE, INST_STORE_ARRAY_STK, 3, 1},
|
||||
{"storeStk", ASSEM_1BYTE, INST_STORE_SCALAR_STK, 2, 1},
|
||||
{"storeStk", ASSEM_1BYTE, INST_STORE_STK, 2, 1},
|
||||
{"strcmp", ASSEM_1BYTE, INST_STR_CMP, 2, 1},
|
||||
{"streq", ASSEM_1BYTE, INST_STR_EQ, 2, 1},
|
||||
{"strfind", ASSEM_1BYTE, INST_STR_FIND, 2, 1},
|
||||
@@ -674,7 +650,7 @@ BBEmitOpcode(
|
||||
}
|
||||
|
||||
TclEmitInt1(op, envPtr);
|
||||
envPtr->atCmdStart = ((op) == INST_START_CMD);
|
||||
TclUpdateAtCmdStart(op, envPtr);
|
||||
BBUpdateStackReqs(bbPtr, tblIdx, count);
|
||||
}
|
||||
|
||||
@@ -735,7 +711,7 @@ BBEmitInst1or4(
|
||||
} else {
|
||||
TclEmitInt4(param, envPtr);
|
||||
}
|
||||
envPtr->atCmdStart = ((op) == INST_START_CMD);
|
||||
TclUpdateAtCmdStart(op, envPtr);
|
||||
BBUpdateStackReqs(bbPtr, tblIdx, count);
|
||||
}
|
||||
|
||||
@@ -954,6 +930,10 @@ TclCompileAssembleCmd(
|
||||
{
|
||||
Tcl_Token *tokenPtr; /* Token in the input script */
|
||||
|
||||
int numCommands = envPtr->numCommands;
|
||||
int offset = envPtr->codeNext - envPtr->codeStart;
|
||||
int depth = envPtr->currStackDepth;
|
||||
|
||||
/*
|
||||
* Make sure that the command has a single arg that is a simple word.
|
||||
*/
|
||||
@@ -967,10 +947,23 @@ TclCompileAssembleCmd(
|
||||
}
|
||||
|
||||
/*
|
||||
* Compile the code and return any error from the compilation.
|
||||
* Compile the code and convert any error from the compilation into
|
||||
* bytecode reporting the error;
|
||||
*/
|
||||
|
||||
return TclAssembleCode(envPtr, tokenPtr[1].start, tokenPtr[1].size, 0);
|
||||
if (TCL_ERROR == TclAssembleCode(envPtr, tokenPtr[1].start,
|
||||
tokenPtr[1].size, TCL_EVAL_DIRECT)) {
|
||||
|
||||
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
|
||||
"\n (\"%.*s\" body, line %d)",
|
||||
parsePtr->tokenPtr->size, parsePtr->tokenPtr->start,
|
||||
Tcl_GetErrorLine(interp)));
|
||||
envPtr->numCommands = numCommands;
|
||||
envPtr->codeNext = envPtr->codeStart + offset;
|
||||
envPtr->currStackDepth = depth;
|
||||
TclCompileSyntaxError(interp, envPtr);
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1009,8 +1002,6 @@ TclAssembleCode(
|
||||
|
||||
const char* instPtr = codePtr;
|
||||
/* Where to start looking for a line of code */
|
||||
int instLen; /* Length in bytes of the current line of
|
||||
* code */
|
||||
const char* nextPtr; /* Pointer to the end of the line of code */
|
||||
int bytesLeft = codeLen; /* Number of bytes of source code remaining to
|
||||
* be parsed */
|
||||
@@ -1024,10 +1015,6 @@ TclAssembleCode(
|
||||
*/
|
||||
|
||||
status = Tcl_ParseCommand(interp, instPtr, bytesLeft, 0, parsePtr);
|
||||
instLen = parsePtr->commandSize;
|
||||
if (parsePtr->term == parsePtr->commandStart + instLen - 1) {
|
||||
--instLen;
|
||||
}
|
||||
|
||||
/*
|
||||
* Report errors in the parse.
|
||||
@@ -1036,7 +1023,7 @@ TclAssembleCode(
|
||||
if (status != TCL_OK) {
|
||||
if (flags & TCL_EVAL_DIRECT) {
|
||||
Tcl_LogCommandInfo(interp, codePtr, parsePtr->commandStart,
|
||||
instLen);
|
||||
parsePtr->term + 1 - parsePtr->commandStart);
|
||||
}
|
||||
FreeAssemblyEnv(assemEnvPtr);
|
||||
return TCL_ERROR;
|
||||
@@ -1056,6 +1043,13 @@ TclAssembleCode(
|
||||
*/
|
||||
|
||||
if (parsePtr->numWords > 0) {
|
||||
int instLen = parsePtr->commandSize;
|
||||
/* Length in bytes of the current command */
|
||||
|
||||
if (parsePtr->term == parsePtr->commandStart + instLen - 1) {
|
||||
--instLen;
|
||||
}
|
||||
|
||||
/*
|
||||
* If tracing, show each line assembled as it happens.
|
||||
*/
|
||||
@@ -1131,7 +1125,7 @@ NewAssemblyEnv(
|
||||
|
||||
assemEnvPtr->envPtr = envPtr;
|
||||
assemEnvPtr->parsePtr = parsePtr;
|
||||
assemEnvPtr->cmdLine = envPtr->line;
|
||||
assemEnvPtr->cmdLine = 1;
|
||||
assemEnvPtr->clNext = envPtr->clNext;
|
||||
|
||||
/*
|
||||
@@ -2623,6 +2617,7 @@ AllocBB(
|
||||
bb->minStackDepth = 0;
|
||||
bb->maxStackDepth = 0;
|
||||
bb->finalStackDepth = 0;
|
||||
bb->catchDepth = 0;
|
||||
bb->enclosingCatch = NULL;
|
||||
bb->foreignExceptionBase = -1;
|
||||
bb->foreignExceptionCount = 0;
|
||||
@@ -3053,7 +3048,7 @@ ResolveJumpTableTargets(
|
||||
auxDataIndex = TclGetInt4AtPtr(envPtr->codeStart + bbPtr->jumpOffset + 1);
|
||||
DEBUG_PRINT("bbPtr = %p jumpOffset = %d auxDataIndex = %d\n",
|
||||
bbPtr, bbPtr->jumpOffset, auxDataIndex);
|
||||
realJumpTablePtr = envPtr->auxDataArrayPtr[auxDataIndex].clientData;
|
||||
realJumpTablePtr = TclFetchAuxData(envPtr, auxDataIndex);
|
||||
realJumpHashPtr = &realJumpTablePtr->hashTable;
|
||||
|
||||
/*
|
||||
|
||||
+358
-467
File diff suppressed because it is too large
Load Diff
+251
-55
@@ -87,10 +87,13 @@ static int BinaryDecodeHex(ClientData clientData,
|
||||
static int BinaryEncode64(ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
static int BinaryDecodeUu(ClientData clientData,
|
||||
static int BinaryDecode64(ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
static int BinaryDecode64(ClientData clientData,
|
||||
static int BinaryEncodeUu(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
static int BinaryDecodeUu(ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
|
||||
@@ -139,9 +142,9 @@ static const EnsembleImplMap binaryMap[] = {
|
||||
{ NULL, NULL, NULL, NULL, NULL, 0 }
|
||||
};
|
||||
static const EnsembleImplMap encodeMap[] = {
|
||||
{ "hex", BinaryEncodeHex, TclCompileBasic1ArgCmd, NULL, (ClientData)HexDigits, 0 },
|
||||
{ "uuencode", BinaryEncode64, NULL, NULL, (ClientData)UueDigits, 0 },
|
||||
{ "base64", BinaryEncode64, NULL, NULL, (ClientData)B64Digits, 0 },
|
||||
{ "hex", BinaryEncodeHex, TclCompileBasic1ArgCmd, NULL, NULL, 0 },
|
||||
{ "uuencode", BinaryEncodeUu, NULL, NULL, NULL, 0 },
|
||||
{ "base64", BinaryEncode64, NULL, NULL, NULL, 0 },
|
||||
{ NULL, NULL, NULL, NULL, NULL, 0 }
|
||||
};
|
||||
static const EnsembleImplMap decodeMap[] = {
|
||||
@@ -2312,7 +2315,6 @@ BinaryEncodeHex(
|
||||
Tcl_Obj *resultObj = NULL;
|
||||
unsigned char *data = NULL;
|
||||
unsigned char *cursor = NULL;
|
||||
const char *digits = clientData;
|
||||
int offset = 0, count = 0;
|
||||
|
||||
if (objc != 2) {
|
||||
@@ -2324,8 +2326,8 @@ BinaryEncodeHex(
|
||||
data = Tcl_GetByteArrayFromObj(objv[1], &count);
|
||||
cursor = Tcl_SetByteArrayLength(resultObj, count * 2);
|
||||
for (offset = 0; offset < count; ++offset) {
|
||||
*cursor++ = digits[((data[offset] >> 4) & 0x0f)];
|
||||
*cursor++ = digits[(data[offset] & 0x0f)];
|
||||
*cursor++ = HexDigits[((data[offset] >> 4) & 0x0f)];
|
||||
*cursor++ = HexDigits[(data[offset] & 0x0f)];
|
||||
}
|
||||
Tcl_SetObjResult(interp, resultObj);
|
||||
return TCL_OK;
|
||||
@@ -2386,29 +2388,32 @@ BinaryDecodeHex(
|
||||
while (data < dataend) {
|
||||
value = 0;
|
||||
for (i=0 ; i<2 ; i++) {
|
||||
if (data < dataend) {
|
||||
c = *data++;
|
||||
|
||||
if (!isxdigit((int) c)) {
|
||||
if (strict || !isspace(c)) {
|
||||
goto badChar;
|
||||
}
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
if (data >= dataend) {
|
||||
value <<= 4;
|
||||
c -= '0';
|
||||
if (c > 9) {
|
||||
c += ('0' - 'A') + 10;
|
||||
}
|
||||
if (c > 16) {
|
||||
c += ('A' - 'a');
|
||||
}
|
||||
value |= (c & 0xf);
|
||||
} else {
|
||||
value <<= 4;
|
||||
cut++;
|
||||
break;
|
||||
}
|
||||
|
||||
c = *data++;
|
||||
if (!isxdigit((int) c)) {
|
||||
if (strict || !isspace(c)) {
|
||||
goto badChar;
|
||||
}
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
value <<= 4;
|
||||
c -= '0';
|
||||
if (c > 9) {
|
||||
c += ('0' - 'A') + 10;
|
||||
}
|
||||
if (c > 16) {
|
||||
c += ('A' - 'a');
|
||||
}
|
||||
value |= (c & 0xf);
|
||||
}
|
||||
if (i < 2) {
|
||||
cut++;
|
||||
}
|
||||
*cursor++ = UCHAR(value);
|
||||
value = 0;
|
||||
@@ -2436,7 +2441,7 @@ BinaryDecodeHex(
|
||||
* This implements a generic 6 bit binary encoding. Input is broken into
|
||||
* 6 bit chunks and a lookup table passed in via clientData is used to
|
||||
* turn these values into output characters. This is used to implement
|
||||
* base64 and uuencode binary encodings.
|
||||
* base64 binary encodings.
|
||||
*
|
||||
* Results:
|
||||
* Interp result set to an encoded byte array object
|
||||
@@ -2472,7 +2477,6 @@ BinaryEncode64(
|
||||
{
|
||||
Tcl_Obj *resultObj;
|
||||
unsigned char *data, *cursor, *limit;
|
||||
const char *digits = clientData;
|
||||
int maxlen = 0;
|
||||
const char *wrapchar = "\n";
|
||||
int wrapcharlen = 1;
|
||||
@@ -2495,6 +2499,12 @@ BinaryEncode64(
|
||||
if (Tcl_GetIntFromObj(interp, objv[i+1], &maxlen) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (maxlen < 0) {
|
||||
Tcl_SetResult(interp, "line length out of range", TCL_STATIC);
|
||||
Tcl_SetErrorCode(interp, "TCL", "BINARY", "ENCODE",
|
||||
"LINE_LENGTH", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
break;
|
||||
case OPT_WRAPCHAR:
|
||||
wrapchar = Tcl_GetStringFromObj(objv[i+1], &wrapcharlen);
|
||||
@@ -2525,17 +2535,17 @@ BinaryEncode64(
|
||||
for (i = 0; i < 3 && offset+i < count; ++i) {
|
||||
d[i] = data[offset + i];
|
||||
}
|
||||
OUTPUT(digits[d[0] >> 2]);
|
||||
OUTPUT(digits[((d[0] & 0x03) << 4) | (d[1] >> 4)]);
|
||||
OUTPUT(B64Digits[d[0] >> 2]);
|
||||
OUTPUT(B64Digits[((d[0] & 0x03) << 4) | (d[1] >> 4)]);
|
||||
if (offset+1 < count) {
|
||||
OUTPUT(digits[((d[1] & 0x0f) << 2) | (d[2] >> 6)]);
|
||||
OUTPUT(B64Digits[((d[1] & 0x0f) << 2) | (d[2] >> 6)]);
|
||||
} else {
|
||||
OUTPUT(digits[64]);
|
||||
OUTPUT(B64Digits[64]);
|
||||
}
|
||||
if (offset+2 < count) {
|
||||
OUTPUT(digits[d[2] & 0x3f]);
|
||||
OUTPUT(B64Digits[d[2] & 0x3f]);
|
||||
} else {
|
||||
OUTPUT(digits[64]);
|
||||
OUTPUT(B64Digits[64]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2544,6 +2554,124 @@ BinaryEncode64(
|
||||
}
|
||||
#undef OUTPUT
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* BinaryEncodeUu --
|
||||
*
|
||||
* This implements the uuencode binary encoding. Input is broken into 6
|
||||
* bit chunks and a lookup table is used to turn these values into output
|
||||
* characters. This differs from the generic code above in that line
|
||||
* lengths are also encoded.
|
||||
*
|
||||
* Results:
|
||||
* Interp result set to an encoded byte array object
|
||||
*
|
||||
* Side effects:
|
||||
* None
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int
|
||||
BinaryEncodeUu(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
Tcl_Obj *resultObj;
|
||||
unsigned char *data, *start, *cursor;
|
||||
int offset, count, rawLength, n, i, j, bits, index;
|
||||
int lineLength = 61;
|
||||
const unsigned char SingleNewline[] = { (unsigned char) '\n' };
|
||||
const unsigned char *wrapchar = SingleNewline;
|
||||
int wrapcharlen = sizeof(SingleNewline);
|
||||
enum { OPT_MAXLEN, OPT_WRAPCHAR };
|
||||
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
|
||||
|
||||
if (objc < 2 || objc%2 != 0) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv,
|
||||
"?-maxlen len? ?-wrapchar char? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for (i = 1; i < objc-1; i += 2) {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option",
|
||||
TCL_EXACT, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
switch (index) {
|
||||
case OPT_MAXLEN:
|
||||
if (Tcl_GetIntFromObj(interp, objv[i+1], &lineLength) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (lineLength < 3 || lineLength > 85) {
|
||||
Tcl_SetResult(interp, "line length out of range", TCL_STATIC);
|
||||
Tcl_SetErrorCode(interp, "TCL", "BINARY", "ENCODE",
|
||||
"LINE_LENGTH", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
break;
|
||||
case OPT_WRAPCHAR:
|
||||
wrapchar = Tcl_GetByteArrayFromObj(objv[i+1], &wrapcharlen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the buffer. This is a little bit too long, but is "good
|
||||
* enough".
|
||||
*/
|
||||
|
||||
resultObj = Tcl_NewObj();
|
||||
offset = 0;
|
||||
data = Tcl_GetByteArrayFromObj(objv[objc-1], &count);
|
||||
rawLength = (lineLength - 1) * 3 / 4;
|
||||
start = cursor = Tcl_SetByteArrayLength(resultObj,
|
||||
(lineLength + wrapcharlen) *
|
||||
((count + (rawLength - 1)) / rawLength));
|
||||
n = bits = 0;
|
||||
|
||||
/*
|
||||
* Encode the data. Each output line first has the length of raw data
|
||||
* encoded by the output line described in it by one encoded byte, then
|
||||
* the encoded data follows (encoding each 6 bits as one character).
|
||||
* Encoded lines are always terminated by a newline.
|
||||
*/
|
||||
|
||||
while (offset < count) {
|
||||
int lineLen = count - offset;
|
||||
|
||||
if (lineLen > rawLength) {
|
||||
lineLen = rawLength;
|
||||
}
|
||||
*cursor++ = UueDigits[lineLen];
|
||||
for (i=0 ; i<lineLen ; i++) {
|
||||
n <<= 8;
|
||||
n |= data[offset++];
|
||||
for (bits += 8; bits > 6 ; bits -= 6) {
|
||||
*cursor++ = UueDigits[(n >> (bits-6)) & 0x3f];
|
||||
}
|
||||
}
|
||||
if (bits > 0) {
|
||||
n <<= 8;
|
||||
*cursor++ = UueDigits[(n >> (bits + 2)) & 0x3f];
|
||||
bits = 0;
|
||||
}
|
||||
for (j=0 ; j<wrapcharlen ; ++j) {
|
||||
*cursor++ = wrapchar[j];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Fix the length of the output bytearray.
|
||||
*/
|
||||
|
||||
Tcl_SetByteArrayLength(resultObj, cursor-start);
|
||||
Tcl_SetObjResult(interp, resultObj);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -2570,8 +2698,8 @@ BinaryDecodeUu(
|
||||
Tcl_Obj *resultObj = NULL;
|
||||
unsigned char *data, *datastart, *dataend;
|
||||
unsigned char *begin, *cursor;
|
||||
int i, index, size, count = 0, cut = 0, strict = 0;
|
||||
char c;
|
||||
int i, index, size, count = 0, strict = 0, lineLen;
|
||||
unsigned char c;
|
||||
enum {OPT_STRICT };
|
||||
static const char *const optStrings[] = { "-strict", NULL };
|
||||
|
||||
@@ -2597,44 +2725,112 @@ BinaryDecodeUu(
|
||||
dataend = data + count;
|
||||
size = ((count + 3) & ~3) * 3 / 4;
|
||||
begin = cursor = Tcl_SetByteArrayLength(resultObj, size);
|
||||
lineLen = -1;
|
||||
|
||||
/*
|
||||
* The decoding loop. First, we get the length of line (strictly, the
|
||||
* number of data bytes we expect to generate from the line) we're
|
||||
* processing this time round if it is not already known (i.e., when the
|
||||
* lineLen variable is set to the magic value, -1).
|
||||
*/
|
||||
|
||||
while (data < dataend) {
|
||||
char d[4] = {0, 0, 0, 0};
|
||||
|
||||
if (lineLen < 0) {
|
||||
c = *data++;
|
||||
if (c < 32 || c > 96) {
|
||||
if (strict || !isspace(c)) {
|
||||
goto badUu;
|
||||
}
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
lineLen = (c - 32) & 0x3f;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we read a four-character grouping.
|
||||
*/
|
||||
|
||||
for (i=0 ; i<4 ; i++) {
|
||||
if (data < dataend) {
|
||||
d[i] = c = *data++;
|
||||
if (c < 33 || c > 96) {
|
||||
if (strict || !isspace(UCHAR(c))) {
|
||||
goto badUu;
|
||||
if (c < 32 || c > 96) {
|
||||
if (strict) {
|
||||
if (!isspace(c)) {
|
||||
goto badUu;
|
||||
} else if (c == '\n') {
|
||||
goto shortUu;
|
||||
}
|
||||
}
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
cut++;
|
||||
}
|
||||
}
|
||||
if (cut > 3) {
|
||||
cut = 3;
|
||||
|
||||
/*
|
||||
* Translate that grouping into (up to) three binary bytes output.
|
||||
*/
|
||||
|
||||
if (lineLen > 0) {
|
||||
*cursor++ = (((d[0] - 0x20) & 0x3f) << 2)
|
||||
| (((d[1] - 0x20) & 0x3f) >> 4);
|
||||
if (--lineLen > 0) {
|
||||
*cursor++ = (((d[1] - 0x20) & 0x3f) << 4)
|
||||
| (((d[2] - 0x20) & 0x3f) >> 2);
|
||||
if (--lineLen > 0) {
|
||||
*cursor++ = (((d[2] - 0x20) & 0x3f) << 6)
|
||||
| (((d[3] - 0x20) & 0x3f));
|
||||
lineLen--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we've reached the end of the line, skip until we process a
|
||||
* newline.
|
||||
*/
|
||||
|
||||
if (lineLen == 0 && data < dataend) {
|
||||
lineLen = -1;
|
||||
do {
|
||||
c = *data++;
|
||||
if (c == '\n') {
|
||||
break;
|
||||
} else if (c >= 32 && c <= 96) {
|
||||
data--;
|
||||
break;
|
||||
} else if (strict || !isspace(c)) {
|
||||
goto badUu;
|
||||
}
|
||||
} while (data < dataend);
|
||||
}
|
||||
*cursor++ = (((d[0] - 0x20) & 0x3f) << 2)
|
||||
| (((d[1] - 0x20) & 0x3f) >> 4);
|
||||
*cursor++ = (((d[1] - 0x20) & 0x3f) << 4)
|
||||
| (((d[2] - 0x20) & 0x3f) >> 2);
|
||||
*cursor++ = (((d[2] - 0x20) & 0x3f) << 6)
|
||||
| (((d[3] - 0x20) & 0x3f));
|
||||
}
|
||||
if (cut > size) {
|
||||
cut = size;
|
||||
|
||||
/*
|
||||
* Sanity check, clean up and finish.
|
||||
*/
|
||||
|
||||
if (lineLen > 0 && strict) {
|
||||
goto shortUu;
|
||||
}
|
||||
Tcl_SetByteArrayLength(resultObj, cursor - begin - cut);
|
||||
Tcl_SetByteArrayLength(resultObj, cursor - begin);
|
||||
Tcl_SetObjResult(interp, resultObj);
|
||||
return TCL_OK;
|
||||
|
||||
shortUu:
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf("short uuencode data"));
|
||||
Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "SHORT", NULL);
|
||||
TclDecrRefCount(resultObj);
|
||||
return TCL_ERROR;
|
||||
|
||||
badUu:
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"invalid uuencode character \"%c\" at position %d",
|
||||
c, (int) (data - datastart - 1)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL);
|
||||
TclDecrRefCount(resultObj);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
+3
-4
@@ -194,8 +194,7 @@ Tcl_CaseObjCmd(
|
||||
for (i = 0; i < caseObjc; i += 2) {
|
||||
int patObjc, j;
|
||||
const char **patObjv;
|
||||
const char *pat;
|
||||
unsigned char *p;
|
||||
const char *pat, *p;
|
||||
|
||||
if (i == caseObjc-1) {
|
||||
Tcl_ResetResult(interp);
|
||||
@@ -210,8 +209,8 @@ Tcl_CaseObjCmd(
|
||||
*/
|
||||
|
||||
pat = TclGetString(caseObjv[i]);
|
||||
for (p = (unsigned char *) pat; *p != '\0'; p++) {
|
||||
if (isspace(*p) || (*p == '\\')) { /* INTL: ISO space, UCHAR */
|
||||
for (p = pat; *p != '\0'; p++) {
|
||||
if (TclIsSpaceProc(*p) || (*p == '\\')) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+15
-32
@@ -1302,28 +1302,12 @@ TclInfoFrame(
|
||||
*/
|
||||
|
||||
ADD_PAIR("type", Tcl_NewStringObj(typeString[framePtr->type], -1));
|
||||
ADD_PAIR("line", Tcl_NewIntObj(framePtr->line[0]));
|
||||
ADD_PAIR("cmd", Tcl_NewStringObj(framePtr->cmd.str.cmd,
|
||||
framePtr->cmd.str.len));
|
||||
break;
|
||||
|
||||
case TCL_LOCATION_EVAL_LIST:
|
||||
/*
|
||||
* List optimized evaluation. Type, line, cmd, the latter through
|
||||
* listPtr, possibly a frame.
|
||||
*/
|
||||
|
||||
ADD_PAIR("type", Tcl_NewStringObj(typeString[framePtr->type], -1));
|
||||
ADD_PAIR("line", Tcl_NewIntObj(1));
|
||||
|
||||
/*
|
||||
* We put a duplicate of the command list obj into the result to
|
||||
* ensure that the 'pure List'-property of the command itself is not
|
||||
* destroyed. Otherwise the query here would disable the list
|
||||
* optimization path in Tcl_EvalObjEx.
|
||||
*/
|
||||
|
||||
ADD_PAIR("cmd", Tcl_DuplicateObj(framePtr->cmd.listPtr));
|
||||
if (framePtr->line) {
|
||||
ADD_PAIR("line", Tcl_NewIntObj(framePtr->line[0]));
|
||||
} else {
|
||||
ADD_PAIR("line", Tcl_NewIntObj(1));
|
||||
}
|
||||
ADD_PAIR("cmd", TclGetSourceFromFrame(framePtr, 0, NULL));
|
||||
break;
|
||||
|
||||
case TCL_LOCATION_PREBC:
|
||||
@@ -1371,8 +1355,7 @@ TclInfoFrame(
|
||||
Tcl_DecrRefCount(fPtr->data.eval.path);
|
||||
}
|
||||
|
||||
ADD_PAIR("cmd",
|
||||
Tcl_NewStringObj(fPtr->cmd.str.cmd, fPtr->cmd.str.len));
|
||||
ADD_PAIR("cmd", TclGetSourceFromFrame(fPtr, 0, NULL));
|
||||
TclStackFree(interp, fPtr);
|
||||
break;
|
||||
}
|
||||
@@ -1391,8 +1374,7 @@ TclInfoFrame(
|
||||
* the result list object.
|
||||
*/
|
||||
|
||||
ADD_PAIR("cmd", Tcl_NewStringObj(framePtr->cmd.str.cmd,
|
||||
framePtr->cmd.str.len));
|
||||
ADD_PAIR("cmd", TclGetSourceFromFrame(framePtr, 0, NULL));
|
||||
break;
|
||||
|
||||
case TCL_LOCATION_PROC:
|
||||
@@ -3005,7 +2987,7 @@ Tcl_LsearchObjCmd(
|
||||
dataType = INTEGER;
|
||||
break;
|
||||
case LSEARCH_NOCASE: /* -nocase */
|
||||
strCmpFn = strcasecmp;
|
||||
strCmpFn = TclUtfCasecmp;
|
||||
noCase = 1;
|
||||
break;
|
||||
case LSEARCH_NOT: /* -not */
|
||||
@@ -3400,7 +3382,7 @@ Tcl_LsearchObjCmd(
|
||||
*/
|
||||
|
||||
if (noCase) {
|
||||
match = (strcasecmp(bytes, patternBytes) == 0);
|
||||
match = (TclUtfCasecmp(bytes, patternBytes) == 0);
|
||||
} else {
|
||||
match = (memcmp(bytes, patternBytes,
|
||||
(size_t) length) == 0);
|
||||
@@ -3645,7 +3627,8 @@ Tcl_LsortObjCmd(
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument values. */
|
||||
{
|
||||
int i, j, index, indices, length, nocase = 0, sortMode, indexc;
|
||||
int i, j, index, indices, length, nocase = 0, indexc;
|
||||
int sortMode = SORTMODE_ASCII;
|
||||
int group, groupSize, groupOffset, idx, allocatedIndexVector = 0;
|
||||
Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr;
|
||||
SortElement *elementArray, *elementPtr;
|
||||
@@ -3991,7 +3974,7 @@ Tcl_LsortObjCmd(
|
||||
goto done1;
|
||||
}
|
||||
elementArray[i].collationKey.intValue = a;
|
||||
} else if (sortInfo.sortMode == SORTMODE_REAL) {
|
||||
} else if (sortMode == SORTMODE_REAL) {
|
||||
double a;
|
||||
|
||||
if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr,
|
||||
@@ -4088,7 +4071,7 @@ Tcl_LsortObjCmd(
|
||||
TclStackFree(interp, elementArray);
|
||||
|
||||
done:
|
||||
if (sortInfo.sortMode == SORTMODE_COMMAND) {
|
||||
if (sortMode == SORTMODE_COMMAND) {
|
||||
TclDecrRefCount(sortInfo.compareCmdPtr);
|
||||
TclDecrRefCount(listObj);
|
||||
sortInfo.compareCmdPtr = NULL;
|
||||
@@ -4233,7 +4216,7 @@ SortCompare(
|
||||
order = strcmp(elemPtr1->collationKey.strValuePtr,
|
||||
elemPtr2->collationKey.strValuePtr);
|
||||
} else if (infoPtr->sortMode == SORTMODE_ASCII_NC) {
|
||||
order = strcasecmp(elemPtr1->collationKey.strValuePtr,
|
||||
order = TclUtfCasecmp(elemPtr1->collationKey.strValuePtr,
|
||||
elemPtr2->collationKey.strValuePtr);
|
||||
} else if (infoPtr->sortMode == SORTMODE_DICTIONARY) {
|
||||
order = DictionaryCompare(elemPtr1->collationKey.strValuePtr,
|
||||
|
||||
+1
-1
@@ -3527,7 +3527,7 @@ TclNRSwitchObjCmd(
|
||||
i++;
|
||||
goto finishedOptions;
|
||||
case OPT_NOCASE:
|
||||
strCmpFn = strcasecmp;
|
||||
strCmpFn = TclUtfCasecmp;
|
||||
noCase = 1;
|
||||
break;
|
||||
|
||||
|
||||
+314
-3427
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+548
-660
File diff suppressed because it is too large
Load Diff
+41
-64
@@ -490,13 +490,6 @@ typedef struct JumpList {
|
||||
JumpFixup jump; /* Pass this argument to matching calls of
|
||||
* TclEmitForwardJump() and
|
||||
* TclFixupForwardJump(). */
|
||||
int depth; /* Remember the currStackDepth of the
|
||||
* CompileEnv here. */
|
||||
int offset; /* Data used to compute jump lengths to pass
|
||||
* to TclFixupForwardJump() */
|
||||
int convert; /* Temporary storage used to compute whether
|
||||
* numeric conversion will be needed following
|
||||
* the operator we're compiling. */
|
||||
struct JumpList *next; /* Point to next item on the stack */
|
||||
} JumpList;
|
||||
|
||||
@@ -2261,30 +2254,8 @@ CompileExprTree(
|
||||
if (nodePtr->mark == MARK_LEFT) {
|
||||
next = nodePtr->left;
|
||||
|
||||
switch (nodePtr->lexeme) {
|
||||
case QUESTION:
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
jumpPtr->depth = envPtr->currStackDepth;
|
||||
if (nodePtr->lexeme == QUESTION) {
|
||||
convert = 1;
|
||||
break;
|
||||
case AND:
|
||||
case OR:
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
jumpPtr->depth = envPtr->currStackDepth;
|
||||
break;
|
||||
}
|
||||
} else if (nodePtr->mark == MARK_RIGHT) {
|
||||
next = nodePtr->right;
|
||||
@@ -2317,25 +2288,35 @@ CompileExprTree(
|
||||
break;
|
||||
}
|
||||
case QUESTION:
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, &jumpPtr->jump);
|
||||
break;
|
||||
case COLON:
|
||||
CLANG_ASSERT(jumpPtr);
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP,
|
||||
&jumpPtr->next->jump);
|
||||
envPtr->currStackDepth = jumpPtr->depth;
|
||||
jumpPtr->offset = (envPtr->codeNext - envPtr->codeStart);
|
||||
jumpPtr->convert = convert;
|
||||
&jumpPtr->jump);
|
||||
TclAdjustStackDepth(-1, envPtr);
|
||||
if (convert) {
|
||||
jumpPtr->jump.jumpType = TCL_TRUE_JUMP;
|
||||
}
|
||||
convert = 1;
|
||||
break;
|
||||
case AND:
|
||||
TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, &jumpPtr->jump);
|
||||
break;
|
||||
case OR:
|
||||
TclEmitForwardJump(envPtr, TCL_TRUE_JUMP, &jumpPtr->jump);
|
||||
newJump = TclStackAlloc(interp, sizeof(JumpList));
|
||||
newJump->next = jumpPtr;
|
||||
jumpPtr = newJump;
|
||||
TclEmitForwardJump(envPtr, (nodePtr->lexeme == AND)
|
||||
? TCL_FALSE_JUMP : TCL_TRUE_JUMP, &jumpPtr->jump);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
int pc1, pc2, target;
|
||||
|
||||
switch (nodePtr->lexeme) {
|
||||
case START:
|
||||
case QUESTION:
|
||||
@@ -2375,18 +2356,20 @@ CompileExprTree(
|
||||
break;
|
||||
case COLON:
|
||||
CLANG_ASSERT(jumpPtr);
|
||||
if (TclFixupForwardJump(envPtr, &jumpPtr->next->jump,
|
||||
(envPtr->codeNext - envPtr->codeStart)
|
||||
- jumpPtr->next->jump.codeOffset, 127)) {
|
||||
jumpPtr->offset += 3;
|
||||
if (jumpPtr->jump.jumpType == TCL_TRUE_JUMP) {
|
||||
jumpPtr->jump.jumpType = TCL_UNCONDITIONAL_JUMP;
|
||||
convert = 1;
|
||||
}
|
||||
target = jumpPtr->jump.codeOffset + 2;
|
||||
if (TclFixupForwardJumpToHere(envPtr, &jumpPtr->jump, 127)) {
|
||||
target += 3;
|
||||
}
|
||||
TclFixupForwardJump(envPtr, &jumpPtr->jump,
|
||||
jumpPtr->offset - jumpPtr->jump.codeOffset, 127);
|
||||
convert |= jumpPtr->convert;
|
||||
envPtr->currStackDepth = jumpPtr->depth + 1;
|
||||
freePtr = jumpPtr;
|
||||
jumpPtr = jumpPtr->next;
|
||||
TclStackFree(interp, freePtr);
|
||||
TclFixupForwardJump(envPtr, &jumpPtr->jump,
|
||||
target - jumpPtr->jump.codeOffset, 127);
|
||||
|
||||
freePtr = jumpPtr;
|
||||
jumpPtr = jumpPtr->next;
|
||||
TclStackFree(interp, freePtr);
|
||||
@@ -2394,29 +2377,24 @@ CompileExprTree(
|
||||
case AND:
|
||||
case OR:
|
||||
CLANG_ASSERT(jumpPtr);
|
||||
TclEmitForwardJump(envPtr, (nodePtr->lexeme == AND)
|
||||
? TCL_FALSE_JUMP : TCL_TRUE_JUMP,
|
||||
&jumpPtr->next->jump);
|
||||
pc1 = CurrentOffset(envPtr);
|
||||
TclEmitInstInt1((nodePtr->lexeme == AND) ? INST_JUMP_FALSE1
|
||||
: INST_JUMP_TRUE1, 0, envPtr);
|
||||
TclEmitPush(TclRegisterNewLiteral(envPtr,
|
||||
(nodePtr->lexeme == AND) ? "1" : "0", 1), envPtr);
|
||||
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP,
|
||||
&jumpPtr->next->next->jump);
|
||||
TclFixupForwardJumpToHere(envPtr, &jumpPtr->next->jump, 127);
|
||||
pc2 = CurrentOffset(envPtr);
|
||||
TclEmitInstInt1(INST_JUMP1, 0, envPtr);
|
||||
TclAdjustStackDepth(-1, envPtr);
|
||||
TclStoreInt1AtPtr(CurrentOffset(envPtr) - pc1,
|
||||
envPtr->codeStart + pc1 + 1);
|
||||
if (TclFixupForwardJumpToHere(envPtr, &jumpPtr->jump, 127)) {
|
||||
jumpPtr->next->next->jump.codeOffset += 3;
|
||||
pc2 += 3;
|
||||
}
|
||||
TclEmitPush(TclRegisterNewLiteral(envPtr,
|
||||
(nodePtr->lexeme == AND) ? "0" : "1", 1), envPtr);
|
||||
TclFixupForwardJumpToHere(envPtr, &jumpPtr->next->next->jump,
|
||||
127);
|
||||
TclStoreInt1AtPtr(CurrentOffset(envPtr) - pc2,
|
||||
envPtr->codeStart + pc2 + 1);
|
||||
convert = 0;
|
||||
envPtr->currStackDepth = jumpPtr->depth + 1;
|
||||
freePtr = jumpPtr;
|
||||
jumpPtr = jumpPtr->next;
|
||||
TclStackFree(interp, freePtr);
|
||||
freePtr = jumpPtr;
|
||||
jumpPtr = jumpPtr->next;
|
||||
TclStackFree(interp, freePtr);
|
||||
freePtr = jumpPtr;
|
||||
jumpPtr = jumpPtr->next;
|
||||
TclStackFree(interp, freePtr);
|
||||
@@ -2485,8 +2463,7 @@ CompileExprTree(
|
||||
break;
|
||||
}
|
||||
case OT_TOKENS:
|
||||
TclCompileTokens(interp, tokenPtr+1, tokenPtr->numComponents,
|
||||
envPtr);
|
||||
CompileTokens(envPtr, tokenPtr, interp);
|
||||
tokenPtr += tokenPtr->numComponents + 1;
|
||||
break;
|
||||
default:
|
||||
|
||||
+769
-704
File diff suppressed because it is too large
Load Diff
+176
-24
@@ -99,6 +99,54 @@ typedef struct ExceptionRange {
|
||||
* offset for any "exception" in range. */
|
||||
} ExceptionRange;
|
||||
|
||||
/*
|
||||
* Auxiliary data used when issuing (currently just loop) exception ranges,
|
||||
* but which is not required during execution.
|
||||
*/
|
||||
|
||||
typedef struct ExceptionAux {
|
||||
int supportsContinue; /* Whether this exception range will have a
|
||||
* continueOffset created for it; if it is a
|
||||
* loop exception range that *doesn't* have
|
||||
* one (see [for] next-clause) then we must
|
||||
* not pick up the range when scanning for a
|
||||
* target to continue to. */
|
||||
int stackDepth; /* The stack depth at the point where the
|
||||
* exception range was created. This is used
|
||||
* to calculate the number of POPs required to
|
||||
* restore the stack to its prior state. */
|
||||
int expandTarget; /* The number of expansions expected on the
|
||||
* auxData stack at the time the loop starts;
|
||||
* we can't currently discard them except by
|
||||
* doing INST_INVOKE_EXPANDED; this is a known
|
||||
* problem. */
|
||||
int expandTargetDepth; /* The stack depth expected at the outermost
|
||||
* expansion within the loop. Not meaningful
|
||||
* if there are no open expansions between the
|
||||
* looping level and the point of jump
|
||||
* issue. */
|
||||
int numBreakTargets; /* The number of [break]s that want to be
|
||||
* targeted to the place where this loop
|
||||
* exception will be bound to. */
|
||||
int *breakTargets; /* The offsets of the INST_JUMP4 instructions
|
||||
* issued by the [break]s that we must
|
||||
* update. Note that resizing a jump (via
|
||||
* TclFixupForwardJump) can cause the contents
|
||||
* of this array to be updated. When
|
||||
* numBreakTargets==0, this is NULL. */
|
||||
int allocBreakTargets; /* The size of the breakTargets array. */
|
||||
int numContinueTargets; /* The number of [continue]s that want to be
|
||||
* targeted to the place where this loop
|
||||
* exception will be bound to. */
|
||||
int *continueTargets; /* The offsets of the INST_JUMP4 instructions
|
||||
* issued by the [continue]s that we must
|
||||
* update. Note that resizing a jump (via
|
||||
* TclFixupForwardJump) can cause the contents
|
||||
* of this array to be updated. When
|
||||
* numContinueTargets==0, this is NULL. */
|
||||
int allocContinueTargets; /* The size of the continueTargets array. */
|
||||
} ExceptionAux;
|
||||
|
||||
/*
|
||||
* Structure used to map between instruction pc and source locations. It
|
||||
* defines for each compiled Tcl command its code's starting offset and its
|
||||
@@ -145,13 +193,6 @@ typedef struct ExtCmdLoc {
|
||||
ECL *loc; /* Command word locations (lines). */
|
||||
int nloc; /* Number of allocated entries in 'loc'. */
|
||||
int nuloc; /* Number of used entries in 'loc'. */
|
||||
Tcl_HashTable litInfo; /* Indexed by bytecode 'PC', to have the
|
||||
* information accessible per command and
|
||||
* argument, not per whole bytecode. Value is
|
||||
* index of command in 'loc', giving us the
|
||||
* literals to associate with line information
|
||||
* as command argument, see
|
||||
* TclArgumentBCEnter() */
|
||||
} ExtCmdLoc;
|
||||
|
||||
/*
|
||||
@@ -275,6 +316,11 @@ typedef struct CompileEnv {
|
||||
* entry. */
|
||||
int mallocedExceptArray; /* 1 if ExceptionRange array was expanded and
|
||||
* exceptArrayPtr points in heap, else 0. */
|
||||
ExceptionAux *exceptAuxArrayPtr;
|
||||
/* Array of information used to restore the
|
||||
* state when processing BREAK/CONTINUE
|
||||
* exceptions. Must be the same size as the
|
||||
* exceptArrayPtr. */
|
||||
CmdLocation *cmdMapPtr; /* Points to start of CmdLocation array.
|
||||
* numCommands is the index of the next entry
|
||||
* to use; (numCommands-1) is the entry index
|
||||
@@ -296,6 +342,9 @@ typedef struct CompileEnv {
|
||||
/* Initial storage of LiteralEntry array. */
|
||||
ExceptionRange staticExceptArraySpace[COMPILEENV_INIT_EXCEPT_RANGES];
|
||||
/* Initial ExceptionRange array storage. */
|
||||
ExceptionAux staticExAuxArraySpace[COMPILEENV_INIT_EXCEPT_RANGES];
|
||||
/* Initial static except auxiliary info array
|
||||
* storage. */
|
||||
CmdLocation staticCmdMapSpace[COMPILEENV_INIT_CMD_MAP_SIZE];
|
||||
/* Initial storage for cmd location map. */
|
||||
AuxData staticAuxDataArraySpace[COMPILEENV_INIT_AUX_DATA_SIZE];
|
||||
@@ -312,10 +361,10 @@ typedef struct CompileEnv {
|
||||
* inefficient. If set to 2, that instruction
|
||||
* should not be issued at all (by the generic
|
||||
* part of the command compiler). */
|
||||
ContLineLoc *clLoc; /* If not NULL, the table holding the
|
||||
* locations of the invisible continuation
|
||||
* lines in the input script, to adjust the
|
||||
* line counter. */
|
||||
int expandCount; /* Number of INST_EXPAND_START instructions
|
||||
* encountered that have not yet been paired
|
||||
* with a corresponding
|
||||
* INST_INVOKE_EXPANDED. */
|
||||
int *clNext; /* If not NULL, it refers to the next slot in
|
||||
* clLoc to check for an invisible
|
||||
* continuation line. */
|
||||
@@ -717,8 +766,10 @@ typedef struct ByteCode {
|
||||
|
||||
#define INST_LIST_CONCAT 164
|
||||
|
||||
#define INST_EXPAND_DROP 165
|
||||
|
||||
/* The last opcode */
|
||||
#define LAST_INST_OPCODE 164
|
||||
#define LAST_INST_OPCODE 165
|
||||
|
||||
/*
|
||||
* Table describing the Tcl bytecode instructions: their name (for displaying
|
||||
@@ -929,7 +980,12 @@ MODULE_SCOPE ByteCode * TclCompileObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
*----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
MODULE_SCOPE int TclAttemptCompileProc(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, int depth, Command *cmdPtr,
|
||||
CompileEnv *envPtr);
|
||||
MODULE_SCOPE void TclCleanupByteCode(ByteCode *codePtr);
|
||||
MODULE_SCOPE void TclCleanupStackForBreakContinue(CompileEnv *envPtr,
|
||||
ExceptionAux *auxPtr);
|
||||
MODULE_SCOPE void TclCompileCmdWord(Tcl_Interp *interp,
|
||||
Tcl_Token *tokenPtr, int count,
|
||||
CompileEnv *envPtr);
|
||||
@@ -938,6 +994,9 @@ MODULE_SCOPE void TclCompileExpr(Tcl_Interp *interp, const char *script,
|
||||
MODULE_SCOPE void TclCompileExprWords(Tcl_Interp *interp,
|
||||
Tcl_Token *tokenPtr, int numWords,
|
||||
CompileEnv *envPtr);
|
||||
MODULE_SCOPE void TclCompileInvocation(Tcl_Interp *interp,
|
||||
Tcl_Token *tokenPtr, Tcl_Obj *cmdObj, int numWords,
|
||||
CompileEnv *envPtr);
|
||||
MODULE_SCOPE void TclCompileScript(Tcl_Interp *interp,
|
||||
const char *script, int numBytes,
|
||||
CompileEnv *envPtr);
|
||||
@@ -984,10 +1043,19 @@ MODULE_SCOPE void TclInitCompileEnv(Tcl_Interp *interp,
|
||||
int numBytes, const CmdFrame *invoker, int word);
|
||||
MODULE_SCOPE void TclInitJumpFixupArray(JumpFixupArray *fixupArrayPtr);
|
||||
MODULE_SCOPE void TclInitLiteralTable(LiteralTable *tablePtr);
|
||||
MODULE_SCOPE ExceptionRange *TclGetInnermostExceptionRange(CompileEnv *envPtr,
|
||||
int returnCode, ExceptionAux **auxPtrPtr);
|
||||
MODULE_SCOPE void TclAddLoopBreakFixup(CompileEnv *envPtr,
|
||||
ExceptionAux *auxPtr);
|
||||
MODULE_SCOPE void TclAddLoopContinueFixup(CompileEnv *envPtr,
|
||||
ExceptionAux *auxPtr);
|
||||
MODULE_SCOPE void TclFinalizeLoopExceptionRange(CompileEnv *envPtr,
|
||||
int range);
|
||||
#ifdef TCL_COMPILE_STATS
|
||||
MODULE_SCOPE char * TclLiteralStats(LiteralTable *tablePtr);
|
||||
MODULE_SCOPE int TclLog2(int value);
|
||||
#endif
|
||||
MODULE_SCOPE void TclOptimizeBytecode(CompileEnv *envPtr);
|
||||
#ifdef TCL_COMPILE_DEBUG
|
||||
MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr);
|
||||
@@ -998,6 +1066,10 @@ MODULE_SCOPE void TclPrintObject(FILE *outFile,
|
||||
Tcl_Obj *objPtr, int maxChars);
|
||||
MODULE_SCOPE void TclPrintSource(FILE *outFile,
|
||||
const char *string, int maxChars);
|
||||
MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
|
||||
Tcl_Token *varTokenPtr, CompileEnv *envPtr,
|
||||
int flags, int *localIndexPtr,
|
||||
int *isScalarPtr);
|
||||
MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr,
|
||||
char *bytes, int length, int flags);
|
||||
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
|
||||
@@ -1037,6 +1109,15 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
|
||||
*----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Simplified form to access AuxData.
|
||||
*
|
||||
* ClientData TclFetchAuxData(CompileEng *envPtr, int index);
|
||||
*/
|
||||
|
||||
#define TclFetchAuxData(envPtr, index) \
|
||||
(envPtr)->auxDataArrayPtr[(index)].clientData
|
||||
|
||||
#define LITERAL_ON_HEAP 0x01
|
||||
#define LITERAL_CMD_NAME 0x02
|
||||
|
||||
@@ -1330,16 +1411,16 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
|
||||
#define TclMax(i, j) ((((int) i) > ((int) j))? (i) : (j))
|
||||
|
||||
/*
|
||||
* Convenience macro for use when compiling bodies of commands. The ANSI C
|
||||
* "prototype" for this macro is:
|
||||
* Convenience macros for use when compiling bodies of commands. The ANSI C
|
||||
* "prototype" for these macros are:
|
||||
*
|
||||
* static void CompileBody(CompileEnv *envPtr, Tcl_Token *tokenPtr,
|
||||
* Tcl_Interp *interp);
|
||||
* static void BODY(Tcl_Token *tokenPtr, int word);
|
||||
*/
|
||||
|
||||
#define CompileBody(envPtr, tokenPtr, interp) \
|
||||
TclCompileCmdWord((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \
|
||||
(envPtr))
|
||||
#define BODY(tokenPtr, word) \
|
||||
SetLineInformation((word)); \
|
||||
TclCompileCmdWord(interp, (tokenPtr)+1, (tokenPtr)->numComponents, \
|
||||
envPtr)
|
||||
|
||||
/*
|
||||
* Convenience macro for use when compiling tokens to be pushed. The ANSI C
|
||||
@@ -1353,15 +1434,19 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
|
||||
TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \
|
||||
(envPtr));
|
||||
/*
|
||||
* Convenience macro for use when pushing literals. The ANSI C "prototype" for
|
||||
* this macro is:
|
||||
* Convenience macros for use when pushing literals. The ANSI C "prototype" for
|
||||
* these macros are:
|
||||
*
|
||||
* static void PushLiteral(CompileEnv *envPtr,
|
||||
* const char *string, int length);
|
||||
* static void PushStringLiteral(CompileEnv *envPtr,
|
||||
* const char *string);
|
||||
*/
|
||||
|
||||
#define PushLiteral(envPtr, string, length) \
|
||||
TclEmitPush(TclRegisterNewLiteral((envPtr), (string), (length)), (envPtr))
|
||||
#define PushStringLiteral(envPtr, string) \
|
||||
PushLiteral((envPtr), (string), (int) (sizeof(string "") - 1))
|
||||
|
||||
/*
|
||||
* Macro to advance to the next token; it is more mnemonic than the address
|
||||
@@ -1390,14 +1475,11 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
|
||||
* of LOOP ranges is an interesting datum for debugging purposes, and that is
|
||||
* what we compute now.
|
||||
*
|
||||
* static int DeclareExceptionRange(CompileEnv *envPtr, int type);
|
||||
* static int ExceptionRangeStarts(CompileEnv *envPtr, int index);
|
||||
* static void ExceptionRangeEnds(CompileEnv *envPtr, int index);
|
||||
* static void ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);
|
||||
*/
|
||||
|
||||
#define DeclareExceptionRange(envPtr, type) \
|
||||
(TclCreateExceptRange((type), (envPtr)))
|
||||
#define ExceptionRangeStarts(envPtr, index) \
|
||||
(((envPtr)->exceptDepth++), \
|
||||
((envPtr)->maxExceptDepth = \
|
||||
@@ -1427,6 +1509,76 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
|
||||
TclRegisterLiteral(envPtr, Tcl_DStringValue(dsPtr), \
|
||||
Tcl_DStringLength(dsPtr), /*flags*/ 0)
|
||||
|
||||
/*
|
||||
* Macro that encapsulates an efficiency trick that avoids a function call for
|
||||
* the simplest of compiles. The ANSI C "prototype" for this macro is:
|
||||
*
|
||||
* static void CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr,
|
||||
* Tcl_Interp *interp, int word);
|
||||
*/
|
||||
|
||||
#define CompileWord(envPtr, tokenPtr, interp, word) \
|
||||
if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \
|
||||
PushLiteral((envPtr), (tokenPtr)[1].start, (tokenPtr)[1].size); \
|
||||
} else { \
|
||||
SetLineInformation((word)); \
|
||||
CompileTokens((envPtr), (tokenPtr), (interp)); \
|
||||
}
|
||||
|
||||
/*
|
||||
* TIP #280: Remember the per-word line information of the current command. An
|
||||
* index is used instead of a pointer as recursive compilation may reallocate,
|
||||
* i.e. move, the array. This is also the reason to save the nuloc now, it may
|
||||
* change during the course of the function.
|
||||
*
|
||||
* Macro to encapsulate the variable definition and setup.
|
||||
*/
|
||||
|
||||
#define DefineLineInformation \
|
||||
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
|
||||
int eclIndex = mapPtr->nuloc - 1
|
||||
|
||||
#define SetLineInformation(word) \
|
||||
envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
|
||||
envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
|
||||
|
||||
#define PushVarNameWord(i,v,e,f,l,sc,word) \
|
||||
SetLineInformation(word); \
|
||||
TclPushVarName(i,v,e,f,l,sc)
|
||||
|
||||
/*
|
||||
* Often want to issue one of two versions of an instruction based on whether
|
||||
* the argument will fit in a single byte or not. This makes it much clearer.
|
||||
*/
|
||||
|
||||
#define Emit14Inst(nm,idx,envPtr) \
|
||||
if (idx <= 255) { \
|
||||
TclEmitInstInt1(nm##1,idx,envPtr); \
|
||||
} else { \
|
||||
TclEmitInstInt4(nm##4,idx,envPtr); \
|
||||
}
|
||||
|
||||
/*
|
||||
* How to get an anonymous local variable (used for holding temporary values
|
||||
* off the stack) or a local simple scalar.
|
||||
*/
|
||||
|
||||
#define AnonymousLocal(envPtr) \
|
||||
(TclFindCompiledLocal(NULL, /*nameChars*/ 0, /*create*/ 1, (envPtr)))
|
||||
#define LocalScalar(chars,len,envPtr) \
|
||||
(!TclIsLocalScalar((chars), (len)) ? -1 : \
|
||||
TclFindCompiledLocal((chars), (len), /*create*/ 1, (envPtr)))
|
||||
#define LocalScalarFromToken(tokenPtr,envPtr) \
|
||||
((tokenPtr)->type != TCL_TOKEN_SIMPLE_WORD ? -1 : \
|
||||
LocalScalar((tokenPtr)[1].start, (tokenPtr)[1].size, (envPtr)))
|
||||
|
||||
/*
|
||||
* Flags bits used by TclPushVarName.
|
||||
*/
|
||||
|
||||
#define TCL_NO_LARGE_INDEX 1 /* Do not return localIndex value > 255 */
|
||||
#define TCL_NO_ELEMENT 2 /* Do not push the array element. */
|
||||
|
||||
/*
|
||||
* DTrace probe macros (NOPs if DTrace support is not enabled).
|
||||
*/
|
||||
|
||||
+62
-51
@@ -26,14 +26,15 @@
|
||||
#define ASSOC_KEY "tclPackageAboutDict"
|
||||
|
||||
/*
|
||||
* A ClientData struct for the QueryConfig command. Store the two bits
|
||||
* A ClientData struct for the QueryConfig command. Store the three bits
|
||||
* of data we need; the package name for which we store a config dict,
|
||||
* and the (Tcl_Interp *) in which it is stored.
|
||||
* the (Tcl_Interp *) in which it is stored, and the encoding.
|
||||
*/
|
||||
|
||||
typedef struct QCCD {
|
||||
Tcl_Obj *pkg;
|
||||
Tcl_Interp *interp;
|
||||
char *encoding;
|
||||
} QCCD;
|
||||
|
||||
/*
|
||||
@@ -75,22 +76,28 @@ Tcl_RegisterConfig(
|
||||
const char *valEncoding) /* Name of the encoding used to store the
|
||||
* configuration values, ASCII, thus UTF-8. */
|
||||
{
|
||||
Tcl_Obj *pDB, *pkgDict;
|
||||
Tcl_DString cmdName;
|
||||
const Tcl_Config *cfg;
|
||||
Tcl_Encoding venc = Tcl_GetEncoding(NULL, valEncoding);
|
||||
QCCD *cdPtr = ckalloc(sizeof(QCCD));
|
||||
|
||||
cdPtr->interp = interp;
|
||||
if (valEncoding) {
|
||||
cdPtr->encoding = ckalloc(strlen(valEncoding)+1);
|
||||
strcpy(cdPtr->encoding, valEncoding);
|
||||
} else {
|
||||
cdPtr->encoding = NULL;
|
||||
}
|
||||
cdPtr->pkg = Tcl_NewStringObj(pkgName, -1);
|
||||
|
||||
/*
|
||||
* Phase I: Adding the provided information to the internal database of
|
||||
* package meta data. Only if we have an ok encoding.
|
||||
* package meta data.
|
||||
*
|
||||
* Phase II: Create a command for querying this database, specific to the
|
||||
* package registerting its configuration. This is the approved interface
|
||||
* package registering its configuration. This is the approved interface
|
||||
* in TIP 59. In the future a more general interface should be done, as
|
||||
* followup to TIP 59. Simply because our database is now general across
|
||||
* follow-up to TIP 59. Simply because our database is now general across
|
||||
* packages, and not a structure tied to one package.
|
||||
*
|
||||
* Note, the created command will have a reference through its clientdata.
|
||||
@@ -103,52 +110,36 @@ Tcl_RegisterConfig(
|
||||
* dictionaries visible at Tcl level. I.e. they are not filled
|
||||
*/
|
||||
|
||||
if (venc != NULL) {
|
||||
Tcl_Obj *pkgDict, *pDB = GetConfigDict(interp);
|
||||
pDB = GetConfigDict(interp);
|
||||
|
||||
/*
|
||||
* Retrieve package specific configuration...
|
||||
*/
|
||||
/*
|
||||
* Retrieve package specific configuration...
|
||||
*/
|
||||
|
||||
if (Tcl_DictObjGet(interp, pDB, cdPtr->pkg, &pkgDict) != TCL_OK
|
||||
|| (pkgDict == NULL)) {
|
||||
pkgDict = Tcl_NewDictObj();
|
||||
} else if (Tcl_IsShared(pkgDict)) {
|
||||
pkgDict = Tcl_DuplicateObj(pkgDict);
|
||||
}
|
||||
|
||||
/*
|
||||
* Extend the package configuration...
|
||||
*/
|
||||
|
||||
for (cfg=configuration ; cfg->key!=NULL && cfg->key[0]!='\0' ; cfg++) {
|
||||
Tcl_DString conv;
|
||||
const char *convValue =
|
||||
Tcl_ExternalToUtfDString(venc, cfg->value, -1, &conv);
|
||||
|
||||
/*
|
||||
* We know that the keys are in ASCII/UTF-8, so for them is no
|
||||
* conversion required.
|
||||
*/
|
||||
|
||||
Tcl_DictObjPut(interp, pkgDict, Tcl_NewStringObj(cfg->key, -1),
|
||||
Tcl_NewStringObj(convValue, -1));
|
||||
Tcl_DStringFree(&conv);
|
||||
}
|
||||
|
||||
/*
|
||||
* We're now done with the encoding, so drop it.
|
||||
*/
|
||||
|
||||
Tcl_FreeEncoding(venc);
|
||||
|
||||
/*
|
||||
* Write the changes back into the overall database.
|
||||
*/
|
||||
|
||||
Tcl_DictObjPut(interp, pDB, cdPtr->pkg, pkgDict);
|
||||
if (Tcl_DictObjGet(interp, pDB, cdPtr->pkg, &pkgDict) != TCL_OK
|
||||
|| (pkgDict == NULL)) {
|
||||
pkgDict = Tcl_NewDictObj();
|
||||
} else if (Tcl_IsShared(pkgDict)) {
|
||||
pkgDict = Tcl_DuplicateObj(pkgDict);
|
||||
}
|
||||
|
||||
/*
|
||||
* Extend the package configuration...
|
||||
* We cannot assume that the encodings are initialized, therefore
|
||||
* store the value as-is in a byte array. See Bug [9b2e636361].
|
||||
*/
|
||||
|
||||
for (cfg=configuration ; cfg->key!=NULL && cfg->key[0]!='\0' ; cfg++) {
|
||||
Tcl_DictObjPut(interp, pkgDict, Tcl_NewStringObj(cfg->key, -1),
|
||||
Tcl_NewByteArrayObj((unsigned char *)cfg->value, strlen(cfg->value)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Write the changes back into the overall database.
|
||||
*/
|
||||
|
||||
Tcl_DictObjPut(interp, pDB, cdPtr->pkg, pkgDict);
|
||||
|
||||
/*
|
||||
* Now create the interface command for retrieval of the package
|
||||
* information.
|
||||
@@ -218,6 +209,9 @@ QueryConfigObjCmd(
|
||||
enum subcmds {
|
||||
CFG_GET, CFG_LIST
|
||||
};
|
||||
Tcl_DString conv;
|
||||
Tcl_Encoding venc = NULL;
|
||||
const char *value;
|
||||
|
||||
if ((objc < 2) || (objc > 3)) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg?");
|
||||
@@ -257,7 +251,21 @@ QueryConfigObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
Tcl_SetObjResult(interp, val);
|
||||
if (cdPtr->encoding) {
|
||||
venc = Tcl_GetEncoding(interp, cdPtr->encoding);
|
||||
if (!venc) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Value is stored as-is in a byte array, see Bug [9b2e636361],
|
||||
* so we have to decode it first.
|
||||
*/
|
||||
value = (const char *) Tcl_GetByteArrayFromObj(val, &n);
|
||||
value = Tcl_ExternalToUtfDString(venc, value, n, &conv);
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(value,
|
||||
Tcl_DStringLength(&conv)));
|
||||
Tcl_DStringFree(&conv);
|
||||
return TCL_OK;
|
||||
|
||||
case CFG_LIST:
|
||||
@@ -324,7 +332,10 @@ QueryConfigDelete(
|
||||
|
||||
Tcl_DictObjRemove(NULL, pDB, pkgName);
|
||||
Tcl_DecrRefCount(pkgName);
|
||||
ckfree(cdPtr);
|
||||
if (cdPtr->encoding) {
|
||||
ckfree((char *)cdPtr->encoding);
|
||||
}
|
||||
ckfree((char *)cdPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -366,7 +377,7 @@ GetConfigDict(
|
||||
*
|
||||
* This function is associated with the "Package About dict" assoc data
|
||||
* for an interpreter; it is invoked when the interpreter is deleted in
|
||||
* order to free the information assoicated with any pending error
|
||||
* order to free the information associated with any pending error
|
||||
* reports.
|
||||
*
|
||||
* Results:
|
||||
|
||||
+1
-1
@@ -2686,7 +2686,7 @@ TclDatelex(
|
||||
|
||||
location->first_column = yyInput - info->dateStart;
|
||||
for ( ; ; ) {
|
||||
while (isspace(UCHAR(*yyInput))) {
|
||||
while (TclIsSpaceProc(*yyInput)) {
|
||||
yyInput++;
|
||||
}
|
||||
|
||||
|
||||
+69
-126
@@ -35,9 +35,6 @@ static void MakeCachedEnsembleCommand(Tcl_Obj *objPtr,
|
||||
static void FreeEnsembleCmdRep(Tcl_Obj *objPtr);
|
||||
static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr);
|
||||
static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr);
|
||||
static int CompileToCompiledCommand(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, int depth, Command *cmdPtr,
|
||||
CompileEnv *envPtr);
|
||||
static void CompileToInvokedCommand(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Tcl_Obj *replacements,
|
||||
Command *cmdPtr, CompileEnv *envPtr);
|
||||
@@ -88,16 +85,6 @@ const Tcl_ObjType tclEnsembleCmdType = {
|
||||
NULL /* setFromAnyProc */
|
||||
};
|
||||
|
||||
/*
|
||||
* Copied from tclCompCmds.c
|
||||
*/
|
||||
|
||||
#define DefineLineInformation \
|
||||
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
|
||||
int eclIndex = mapPtr->nuloc - 1
|
||||
#define SetLineInformation(word) \
|
||||
envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
|
||||
envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
|
||||
|
||||
static inline Tcl_Obj *
|
||||
NewNsObj(
|
||||
@@ -1537,6 +1524,14 @@ TclMakeEnsemble(
|
||||
cmdName = nameParts[nameCount - 1];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Switch on compilation always for core ensembles now that we can do
|
||||
* nice bytecode things with them. Do it now. Waiting until later will
|
||||
* just cause pointless epoch bumps.
|
||||
*/
|
||||
|
||||
ensembleFlags |= ENSEMBLE_COMPILE;
|
||||
ensemble = Tcl_CreateEnsemble(interp, cmdName, ns, ensembleFlags);
|
||||
|
||||
/*
|
||||
@@ -1588,14 +1583,6 @@ TclMakeEnsemble(
|
||||
}
|
||||
}
|
||||
Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict);
|
||||
|
||||
/*
|
||||
* Switch on compilation always for core ensembles now that we can do
|
||||
* nice bytecode things with them.
|
||||
*/
|
||||
|
||||
Tcl_SetEnsembleFlags(interp, ensemble,
|
||||
ensembleFlags | ENSEMBLE_COMPILE);
|
||||
}
|
||||
|
||||
Tcl_DStringFree(&buf);
|
||||
@@ -3004,8 +2991,8 @@ TclCompileEnsemble(
|
||||
*/
|
||||
|
||||
invokeAnyway = 1;
|
||||
if (CompileToCompiledCommand(interp, parsePtr, depth, cmdPtr,
|
||||
envPtr) == TCL_OK) {
|
||||
if (TCL_OK == TclAttemptCompileProc(interp, parsePtr, depth, cmdPtr,
|
||||
envPtr)) {
|
||||
ourResult = TCL_OK;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -3039,95 +3026,88 @@ TclCompileEnsemble(
|
||||
return ourResult;
|
||||
}
|
||||
|
||||
/*
|
||||
* How to compile a subcommand using its own command compiler. To do that, we
|
||||
* have to perform some trickery to rewrite the arguments, as compilers *must*
|
||||
* have parse tokens that refer to addresses in the original script.
|
||||
*/
|
||||
|
||||
static int
|
||||
CompileToCompiledCommand(
|
||||
int
|
||||
TclAttemptCompileProc(
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr,
|
||||
int depth,
|
||||
Command *cmdPtr,
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
Tcl_Parse synthetic;
|
||||
Tcl_Token *tokenPtr;
|
||||
int result, i;
|
||||
int savedNumCmds = envPtr->numCommands;
|
||||
Tcl_Token *saveTokenPtr = parsePtr->tokenPtr;
|
||||
int savedStackDepth = envPtr->currStackDepth;
|
||||
unsigned savedCodeNext = envPtr->codeNext - envPtr->codeStart;
|
||||
DefineLineInformation;
|
||||
|
||||
if (cmdPtr->compileProc == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
TclParseInit(interp, NULL, 0, &synthetic);
|
||||
synthetic.numWords = parsePtr->numWords - depth + 1;
|
||||
TclGrowParseTokenArray(&synthetic, 2);
|
||||
synthetic.numTokens = 2;
|
||||
|
||||
/*
|
||||
* Now we have the space to work in, install something rewritten. The
|
||||
* first word will "officially" be the bytes of the structured ensemble
|
||||
* name. That's technically wrong, but nobody will care; we just need
|
||||
* *something* here...
|
||||
* Advance parsePtr->tokenPtr so that it points at the last subcommand.
|
||||
* This will be wrong, but it will not matter, and it will put the
|
||||
* tokens for the arguments in the right place without the needed to
|
||||
* allocate a synthetic Tcl_Parse struct, or copy tokens around.
|
||||
*/
|
||||
|
||||
synthetic.tokenPtr[0].type = TCL_TOKEN_SIMPLE_WORD;
|
||||
synthetic.tokenPtr[0].start = parsePtr->tokenPtr[0].start;
|
||||
synthetic.tokenPtr[0].numComponents = 1;
|
||||
synthetic.tokenPtr[1].type = TCL_TOKEN_TEXT;
|
||||
synthetic.tokenPtr[1].start = parsePtr->tokenPtr[0].start;
|
||||
synthetic.tokenPtr[1].numComponents = 0;
|
||||
for (i=0,tokenPtr=parsePtr->tokenPtr ; i<depth ; i++) {
|
||||
int sclen = (tokenPtr->start - synthetic.tokenPtr[0].start)
|
||||
+ tokenPtr->size;
|
||||
|
||||
synthetic.tokenPtr[0].size = sclen;
|
||||
synthetic.tokenPtr[1].size = sclen;
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
for (i = 0; i < depth - 1; i++) {
|
||||
parsePtr->tokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
}
|
||||
parsePtr->numWords -= (depth - 1);
|
||||
|
||||
/*
|
||||
* Copy over the real argument tokens.
|
||||
* Shift the line information arrays to account for different word
|
||||
* index values.
|
||||
*/
|
||||
|
||||
for (i=1; i<synthetic.numWords; i++) {
|
||||
int toCopy;
|
||||
|
||||
toCopy = tokenPtr->numComponents + 1;
|
||||
TclGrowParseTokenArray(&synthetic, toCopy);
|
||||
memcpy(synthetic.tokenPtr + synthetic.numTokens, tokenPtr,
|
||||
sizeof(Tcl_Token) * toCopy);
|
||||
synthetic.numTokens += toCopy;
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
}
|
||||
mapPtr->loc[eclIndex].line += (depth - 1);
|
||||
mapPtr->loc[eclIndex].next += (depth - 1);
|
||||
|
||||
/*
|
||||
* Hand off compilation to the subcommand compiler. At last!
|
||||
*/
|
||||
|
||||
result = cmdPtr->compileProc(interp, &synthetic, cmdPtr, envPtr);
|
||||
result = cmdPtr->compileProc(interp, parsePtr, cmdPtr, envPtr);
|
||||
|
||||
/*
|
||||
* If our target fails to compile, revert the number of commands and the
|
||||
* pointer to the place to issue the next instruction. [Bug 3600328]
|
||||
* Undo the shift.
|
||||
*/
|
||||
|
||||
mapPtr->loc[eclIndex].line -= (depth - 1);
|
||||
mapPtr->loc[eclIndex].next -= (depth - 1);
|
||||
|
||||
parsePtr->numWords += (depth - 1);
|
||||
parsePtr->tokenPtr = saveTokenPtr;
|
||||
|
||||
/*
|
||||
* If our target failed to compile, revert any data from failed partial
|
||||
* compiles. Note that envPtr->numCommands need not be checked because
|
||||
* we avoid compiling subcommands that recursively call TclCompileScript().
|
||||
*/
|
||||
|
||||
if (result != TCL_OK) {
|
||||
envPtr->numCommands = savedNumCmds;
|
||||
envPtr->currStackDepth = savedStackDepth;
|
||||
envPtr->codeNext = envPtr->codeStart + savedCodeNext;
|
||||
#ifdef TCL_COMPILE_DEBUG
|
||||
} else {
|
||||
/*
|
||||
* Confirm that the command compiler generated a single value on
|
||||
* the stack as its result. This is only done in debugging mode,
|
||||
* as it *should* be correct and normal users have no reasonable
|
||||
* way to fix it anyway.
|
||||
*/
|
||||
|
||||
int diff = envPtr->currStackDepth - savedStackDepth;
|
||||
|
||||
if (diff != 1) {
|
||||
Tcl_Panic("bad stack adjustment when compiling"
|
||||
" %.*s (was %d instead of 1)", parsePtr->tokenPtr->size,
|
||||
parsePtr->tokenPtr->start, diff);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Clean up if necessary.
|
||||
*/
|
||||
|
||||
Tcl_FreeParse(&synthetic);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -3157,11 +3137,16 @@ CompileToInvokedCommand(
|
||||
*/
|
||||
|
||||
Tcl_ListObjGetElements(NULL, replacements, &numWords, &words);
|
||||
for (i=0,tokPtr=parsePtr->tokenPtr ; i<parsePtr->numWords ; i++) {
|
||||
for (i = 0, tokPtr = parsePtr->tokenPtr; i < parsePtr->numWords;
|
||||
i++, tokPtr = TokenAfter(tokPtr)) {
|
||||
if (i > 0 && i < numWords+1) {
|
||||
bytes = Tcl_GetStringFromObj(words[i-1], &length);
|
||||
PushLiteral(envPtr, bytes, length);
|
||||
} else if (tokPtr->type == TCL_TOKEN_SIMPLE_WORD) {
|
||||
continue;
|
||||
}
|
||||
|
||||
SetLineInformation(i);
|
||||
if (tokPtr->type == TCL_TOKEN_SIMPLE_WORD) {
|
||||
int literal = TclRegisterNewLiteral(envPtr,
|
||||
tokPtr[1].start, tokPtr[1].size);
|
||||
|
||||
@@ -3169,16 +3154,12 @@ CompileToInvokedCommand(
|
||||
TclContinuationsEnterDerived(
|
||||
TclFetchLiteral(envPtr, literal),
|
||||
tokPtr[1].start - envPtr->source,
|
||||
mapPtr->loc[eclIndex].next[i]);
|
||||
envPtr->clNext);
|
||||
}
|
||||
TclEmitPush(literal, envPtr);
|
||||
} else {
|
||||
if (envPtr->clNext) {
|
||||
SetLineInformation(i);
|
||||
}
|
||||
CompileTokens(envPtr, tokPtr, interp);
|
||||
}
|
||||
tokPtr = TokenAfter(tokPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3224,51 +3205,13 @@ CompileBasicNArgCommand(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
Tcl_Token *tokenPtr;
|
||||
Tcl_Obj *objPtr;
|
||||
char *bytes;
|
||||
int length, i, literal;
|
||||
DefineLineInformation;
|
||||
Tcl_Obj *objPtr = Tcl_NewObj();
|
||||
|
||||
/*
|
||||
* Push the name of the command we're actually dispatching to as part of
|
||||
* the implementation.
|
||||
*/
|
||||
|
||||
objPtr = Tcl_NewObj();
|
||||
Tcl_IncrRefCount(objPtr);
|
||||
Tcl_GetCommandFullName(interp, (Tcl_Command) cmdPtr, objPtr);
|
||||
bytes = Tcl_GetStringFromObj(objPtr, &length);
|
||||
literal = TclRegisterNewCmdLiteral(envPtr, bytes, length);
|
||||
TclSetCmdNameObj(interp, TclFetchLiteral(envPtr, literal), cmdPtr);
|
||||
TclEmitPush(literal, envPtr);
|
||||
TclDecrRefCount(objPtr);
|
||||
|
||||
/*
|
||||
* Push the words of the command.
|
||||
*/
|
||||
|
||||
tokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
for (i=1 ; i<parsePtr->numWords ; i++) {
|
||||
if (envPtr->clNext) {
|
||||
SetLineInformation(i);
|
||||
}
|
||||
if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
|
||||
PushLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size);
|
||||
} else {
|
||||
CompileTokens(envPtr, tokenPtr, interp);
|
||||
}
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do the standard dispatch.
|
||||
*/
|
||||
|
||||
if (i <= 255) {
|
||||
TclEmitInstInt1(INST_INVOKE_STK1, i, envPtr);
|
||||
} else {
|
||||
TclEmitInstInt4(INST_INVOKE_STK4, i, envPtr);
|
||||
}
|
||||
TclCompileInvocation(interp, parsePtr->tokenPtr, objPtr,
|
||||
parsePtr->numWords, envPtr);
|
||||
Tcl_DecrRefCount(objPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
+2
-9
@@ -1030,14 +1030,8 @@ TclInitSubsystems(void)
|
||||
|
||||
TclpInitLock();
|
||||
if (subsystemsInitialized == 0) {
|
||||
/*
|
||||
* Have to set this bit here to avoid deadlock with the routines
|
||||
* below us that call into TclInitSubsystems.
|
||||
*/
|
||||
|
||||
subsystemsInitialized = 1;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Initialize locks used by the memory allocators before anything
|
||||
* interesting happens so we can use the allocators in the
|
||||
* implementation of self-initializing locks.
|
||||
@@ -1061,6 +1055,7 @@ TclInitSubsystems(void)
|
||||
TclInitEncodingSubsystem(); /* Process wide encoding init. */
|
||||
TclpSetInterfaces();
|
||||
TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */
|
||||
subsystemsInitialized = 1;
|
||||
}
|
||||
TclpInitUnlock();
|
||||
}
|
||||
@@ -1176,8 +1171,6 @@ Tcl_Finalize(void)
|
||||
|
||||
TclFinalizeEncodingSubsystem();
|
||||
|
||||
Tcl_SetPanicProc(NULL);
|
||||
|
||||
/*
|
||||
* Repeat finalization of the thread local storage once more. Although
|
||||
* this step is already done by the Tcl_FinalizeThread call above, series
|
||||
|
||||
+139
-79
@@ -202,6 +202,9 @@ typedef struct TEBCdata {
|
||||
|
||||
#define PUSH_TAUX_OBJ(objPtr) \
|
||||
do { \
|
||||
if (auxObjList) { \
|
||||
objPtr->length += auxObjList->length; \
|
||||
} \
|
||||
objPtr->internalRep.ptrAndLongRep.ptr = auxObjList; \
|
||||
auxObjList = objPtr; \
|
||||
} while (0)
|
||||
@@ -257,7 +260,7 @@ VarHashCreateVar(
|
||||
|
||||
/* Verify the stack depth, only when no expansion is in progress */
|
||||
|
||||
#if TCL_COMPILE_DEBUG
|
||||
#ifdef TCL_COMPILE_DEBUG
|
||||
#define CHECK_STACK() \
|
||||
do { \
|
||||
ValidatePcAndStackTop(codePtr, pc, CURR_DEPTH, \
|
||||
@@ -718,13 +721,13 @@ static ExceptionRange * GetExceptRangeForPc(const unsigned char *pc,
|
||||
int catchOnly, ByteCode *codePtr);
|
||||
static const char * GetSrcInfoForPc(const unsigned char *pc,
|
||||
ByteCode *codePtr, int *lengthPtr,
|
||||
const unsigned char **pcBeg);
|
||||
const unsigned char **pcBeg, int *cmdIdxPtr);
|
||||
static Tcl_Obj ** GrowEvaluationStack(ExecEnv *eePtr, int growth,
|
||||
int move);
|
||||
static void IllegalExprOperandType(Tcl_Interp *interp,
|
||||
const unsigned char *pc, Tcl_Obj *opndPtr);
|
||||
static void InitByteCodeExecution(Tcl_Interp *interp);
|
||||
static inline int OFFSET(void *ptr);
|
||||
static inline int wordSkip(void *ptr);
|
||||
static void ReleaseDictIterator(Tcl_Obj *objPtr);
|
||||
/* Useful elsewhere, make available in tclInt.h or stubs? */
|
||||
static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, int numWords);
|
||||
@@ -1001,13 +1004,13 @@ TclFinalizeExecution(void)
|
||||
(TCL_ALLOCALIGN/sizeof(Tcl_Obj *))
|
||||
|
||||
/*
|
||||
* OFFSET computes how many words have to be skipped until the next aligned
|
||||
* wordSkip computes how many words have to be skipped until the next aligned
|
||||
* word. Note that we are only interested in the low order bits of ptr, so
|
||||
* that any possible information loss in PTR2INT is of no consequence.
|
||||
*/
|
||||
|
||||
static inline int
|
||||
OFFSET(
|
||||
wordSkip(
|
||||
void *ptr)
|
||||
{
|
||||
int mask = TCL_ALLOCALIGN-1;
|
||||
@@ -1020,7 +1023,7 @@ OFFSET(
|
||||
*/
|
||||
|
||||
#define MEMSTART(markerPtr) \
|
||||
((markerPtr) + OFFSET(markerPtr))
|
||||
((markerPtr) + wordSkip(markerPtr))
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -1065,7 +1068,7 @@ GrowEvaluationStack(
|
||||
} else {
|
||||
#ifndef PURIFY
|
||||
Tcl_Obj **tmpMarkerPtr = esPtr->tosPtr + 1;
|
||||
int offset = OFFSET(tmpMarkerPtr);
|
||||
int offset = wordSkip(tmpMarkerPtr);
|
||||
|
||||
if (needed + offset < 0) {
|
||||
/*
|
||||
@@ -1423,17 +1426,12 @@ Tcl_NRExprObj(
|
||||
Tcl_Obj *resultPtr)
|
||||
{
|
||||
ByteCode *codePtr;
|
||||
Tcl_InterpState state = Tcl_SaveInterpState(interp, TCL_OK);
|
||||
|
||||
/* TODO: consider saving whole state? */
|
||||
Tcl_Obj *saveObjPtr = Tcl_GetObjResult(interp);
|
||||
|
||||
Tcl_IncrRefCount(saveObjPtr);
|
||||
|
||||
Tcl_ResetResult(interp);
|
||||
codePtr = CompileExprObj(interp, objPtr);
|
||||
|
||||
/* TODO: Confirm reset not required? */
|
||||
/*Tcl_ResetResult(interp);*/
|
||||
Tcl_NRAddCallback(interp, ExprObjCallback, saveObjPtr, resultPtr,
|
||||
Tcl_NRAddCallback(interp, ExprObjCallback, state, resultPtr,
|
||||
NULL, NULL);
|
||||
return TclNRExecuteByteCode(interp, codePtr);
|
||||
}
|
||||
@@ -1444,14 +1442,15 @@ ExprObjCallback(
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
Tcl_Obj *saveObjPtr = data[0];
|
||||
Tcl_InterpState state = data[0];
|
||||
Tcl_Obj *resultPtr = data[1];
|
||||
|
||||
if (result == TCL_OK) {
|
||||
TclSetDuplicateObj(resultPtr, Tcl_GetObjResult(interp));
|
||||
Tcl_SetObjResult(interp, saveObjPtr);
|
||||
(void) Tcl_RestoreInterpState(interp, state);
|
||||
} else {
|
||||
Tcl_DiscardInterpState(state);
|
||||
}
|
||||
TclDecrRefCount(saveObjPtr);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1999,7 +1998,6 @@ TclNRExecuteByteCode(
|
||||
bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED)
|
||||
? TCL_LOCATION_PREBC : TCL_LOCATION_BC);
|
||||
bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1);
|
||||
bcFramePtr->numLevels = iPtr->numLevels;
|
||||
bcFramePtr->framePtr = iPtr->framePtr;
|
||||
bcFramePtr->nextPtr = iPtr->cmdFramePtr;
|
||||
bcFramePtr->nline = 0;
|
||||
@@ -2007,8 +2005,9 @@ TclNRExecuteByteCode(
|
||||
bcFramePtr->litarg = NULL;
|
||||
bcFramePtr->data.tebc.codePtr = codePtr;
|
||||
bcFramePtr->data.tebc.pc = NULL;
|
||||
bcFramePtr->cmd.str.cmd = NULL;
|
||||
bcFramePtr->cmd.str.len = 0;
|
||||
bcFramePtr->cmdObj = NULL;
|
||||
bcFramePtr->cmd = NULL;
|
||||
bcFramePtr->len = 0;
|
||||
|
||||
#ifdef TCL_COMPILE_STATS
|
||||
iPtr->stats.numExecutions++;
|
||||
@@ -2131,6 +2130,11 @@ TEBCresume(
|
||||
result = TCL_ERROR;
|
||||
}
|
||||
NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr);
|
||||
if (bcFramePtr->cmdObj) {
|
||||
Tcl_DecrRefCount(bcFramePtr->cmdObj);
|
||||
bcFramePtr->cmdObj = NULL;
|
||||
bcFramePtr->cmd = NULL;
|
||||
}
|
||||
iPtr->cmdFramePtr = bcFramePtr->nextPtr;
|
||||
if (iPtr->flags & INTERP_DEBUG_FRAME) {
|
||||
TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr);
|
||||
@@ -2142,11 +2146,6 @@ TEBCresume(
|
||||
|
||||
CACHE_STACK_INFO();
|
||||
if (result == TCL_OK) {
|
||||
#ifndef TCL_COMPILE_DEBUG
|
||||
if (*pc == INST_POP) {
|
||||
NEXT_INST_V(1, cleanup, 0);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Push the call's object result and continue execution with the
|
||||
* next instruction.
|
||||
@@ -2155,8 +2154,6 @@ TEBCresume(
|
||||
TRACE_WITH_OBJ(("%u => ... after \"%.20s\": TCL_OK, result=",
|
||||
objc, cmdNameBuf), Tcl_GetObjResult(interp));
|
||||
|
||||
objResultPtr = Tcl_GetObjResult(interp);
|
||||
|
||||
/*
|
||||
* Reset the interp's result to avoid possible duplications of
|
||||
* large objects [Bug 781585]. We do not call Tcl_ResetResult to
|
||||
@@ -2168,9 +2165,16 @@ TEBCresume(
|
||||
* the refCount it had in its role of iPtr->objResultPtr.
|
||||
*/
|
||||
|
||||
objResultPtr = Tcl_GetObjResult(interp);
|
||||
TclNewObj(objPtr);
|
||||
Tcl_IncrRefCount(objPtr);
|
||||
iPtr->objResultPtr = objPtr;
|
||||
#ifndef TCL_COMPILE_DEBUG
|
||||
if (*pc == INST_POP) {
|
||||
TclDecrRefCount(objResultPtr);
|
||||
NEXT_INST_V(1, cleanup, 0);
|
||||
}
|
||||
#endif
|
||||
NEXT_INST_V(0, cleanup, -1);
|
||||
}
|
||||
|
||||
@@ -2320,7 +2324,7 @@ TEBCresume(
|
||||
goto instLoadScalar1;
|
||||
} else if (inst == INST_PUSH1) {
|
||||
PUSH_OBJECT(codePtr->objArrayPtr[TclGetUInt1AtPtr(pc+1)]);
|
||||
TRACE_WITH_OBJ(("%u => ", TclGetInt1AtPtr(pc+1)), OBJ_AT_TOS);
|
||||
TRACE_WITH_OBJ(("%u => ", TclGetUInt1AtPtr(pc+1)), OBJ_AT_TOS);
|
||||
inst = *(pc += 2);
|
||||
goto peepholeStart;
|
||||
} else if (inst == INST_START_CMD) {
|
||||
@@ -2362,7 +2366,7 @@ TEBCresume(
|
||||
TRACE(("%u %u => ", code, level));
|
||||
result = TclProcessReturn(interp, code, level, OBJ_AT_TOS);
|
||||
if (result == TCL_OK) {
|
||||
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")",
|
||||
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")\n",
|
||||
O2S(objResultPtr)));
|
||||
NEXT_INST_F(9, 1, 0);
|
||||
}
|
||||
@@ -2371,6 +2375,7 @@ TEBCresume(
|
||||
iPtr->flags &= ~ERR_ALREADY_LOGGED;
|
||||
}
|
||||
cleanup = 2;
|
||||
TRACE_APPEND(("\n"));
|
||||
goto processExceptionReturn;
|
||||
}
|
||||
|
||||
@@ -2381,7 +2386,7 @@ TEBCresume(
|
||||
if (result == TCL_OK) {
|
||||
Tcl_DecrRefCount(OBJ_AT_TOS);
|
||||
OBJ_AT_TOS = objResultPtr;
|
||||
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")",
|
||||
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")\n",
|
||||
O2S(objResultPtr)));
|
||||
NEXT_INST_F(1, 0, 0);
|
||||
} else if (result == TCL_ERROR) {
|
||||
@@ -2401,6 +2406,7 @@ TEBCresume(
|
||||
Tcl_SetObjResult(interp, objResultPtr);
|
||||
}
|
||||
cleanup = 1;
|
||||
TRACE_APPEND(("\n"));
|
||||
goto processExceptionReturn;
|
||||
|
||||
case INST_YIELD: {
|
||||
@@ -2430,8 +2436,11 @@ TEBCresume(
|
||||
iPtr->cmdFramePtr = bcFramePtr;
|
||||
|
||||
if (iPtr->flags & INTERP_DEBUG_FRAME) {
|
||||
TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc,
|
||||
codePtr, bcFramePtr, pc - codePtr->codeStart);
|
||||
int cmd;
|
||||
if (GetSrcInfoForPc(pc, codePtr, NULL, NULL, &cmd)) {
|
||||
TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc,
|
||||
codePtr, bcFramePtr, cmd, pc - codePtr->codeStart);
|
||||
}
|
||||
}
|
||||
|
||||
pc++;
|
||||
@@ -2630,7 +2639,7 @@ TEBCresume(
|
||||
Tcl_Panic("max size for a Tcl value (%d bytes) exceeded",
|
||||
INT_MAX);
|
||||
}
|
||||
#if !TCL_COMPILE_DEBUG
|
||||
#ifndef TCL_COMPILE_DEBUG
|
||||
if (bytes != tclEmptyStringRep && !Tcl_IsShared(objResultPtr)) {
|
||||
TclFreeIntRep(objResultPtr);
|
||||
objResultPtr->bytes = ckrealloc(bytes, length+appendLen+1);
|
||||
@@ -2666,7 +2675,7 @@ TEBCresume(
|
||||
Tcl_Panic("max size for a Tcl value (%d bytes) exceeded",
|
||||
INT_MAX);
|
||||
}
|
||||
#if !TCL_COMPILE_DEBUG
|
||||
#ifndef TCL_COMPILE_DEBUG
|
||||
if (!Tcl_IsShared(objResultPtr)) {
|
||||
bytes = (char *) Tcl_SetByteArrayLength(objResultPtr,
|
||||
length + appendLen);
|
||||
@@ -2715,9 +2724,26 @@ TEBCresume(
|
||||
|
||||
TclNewObj(objPtr);
|
||||
objPtr->internalRep.ptrAndLongRep.value = CURR_DEPTH;
|
||||
objPtr->length = 0;
|
||||
PUSH_TAUX_OBJ(objPtr);
|
||||
NEXT_INST_F(1, 0, 0);
|
||||
|
||||
case INST_EXPAND_DROP:
|
||||
/*
|
||||
* Drops an element of the auxObjList, popping stack elements to
|
||||
* restore the stack to the state before the point where the aux
|
||||
* element was created.
|
||||
*/
|
||||
|
||||
CLANG_ASSERT(auxObjList);
|
||||
objc = CURR_DEPTH - auxObjList->internalRep.ptrAndLongRep.value;
|
||||
POP_TAUX_OBJ();
|
||||
#ifdef TCL_COMPILE_DEBUG
|
||||
/* Ugly abuse! */
|
||||
starting = 1;
|
||||
#endif
|
||||
NEXT_INST_V(1, objc, 0);
|
||||
|
||||
case INST_EXPAND_STKTOP: {
|
||||
int i;
|
||||
ptrdiff_t moved;
|
||||
@@ -2743,22 +2769,27 @@ TEBCresume(
|
||||
* stack depth, as seen by the compiler.
|
||||
*/
|
||||
|
||||
length = objc + (codePtr->maxStackDepth - TclGetInt4AtPtr(pc+1));
|
||||
DECACHE_STACK_INFO();
|
||||
moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1)
|
||||
- (Tcl_Obj **) TD;
|
||||
if (moved) {
|
||||
/*
|
||||
* Change the global data to point to the new stack: move the
|
||||
* TEBCdataPtr TD, recompute the position of every other
|
||||
* stack-allocated parameter, update the stack pointers.
|
||||
*/
|
||||
auxObjList->length += objc - 1;
|
||||
if ((objc > 1) && (auxObjList->length > 0)) {
|
||||
length = auxObjList->length /* Total expansion room we need */
|
||||
+ codePtr->maxStackDepth /* Beyond the original max */
|
||||
- CURR_DEPTH; /* Relative to where we are */
|
||||
DECACHE_STACK_INFO();
|
||||
moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1)
|
||||
- (Tcl_Obj **) TD;
|
||||
if (moved) {
|
||||
/*
|
||||
* Change the global data to point to the new stack: move the
|
||||
* TEBCdataPtr TD, recompute the position of every other
|
||||
* stack-allocated parameter, update the stack pointers.
|
||||
*/
|
||||
|
||||
esPtr = iPtr->execEnvPtr->execStackPtr;
|
||||
TD = (TEBCdata *) (((Tcl_Obj **)TD) + moved);
|
||||
esPtr = iPtr->execEnvPtr->execStackPtr;
|
||||
TD = (TEBCdata *) (((Tcl_Obj **)TD) + moved);
|
||||
|
||||
catchTop += moved;
|
||||
tosPtr += moved;
|
||||
catchTop += moved;
|
||||
tosPtr += moved;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2862,8 +2893,11 @@ TEBCresume(
|
||||
iPtr->cmdFramePtr = bcFramePtr;
|
||||
|
||||
if (iPtr->flags & INTERP_DEBUG_FRAME) {
|
||||
TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc,
|
||||
codePtr, bcFramePtr, pc - codePtr->codeStart);
|
||||
int cmd;
|
||||
if (GetSrcInfoForPc(pc, codePtr, NULL, NULL, &cmd)) {
|
||||
TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc,
|
||||
codePtr, bcFramePtr, cmd, pc - codePtr->codeStart);
|
||||
}
|
||||
}
|
||||
|
||||
DECACHE_STACK_INFO();
|
||||
@@ -2871,7 +2905,7 @@ TEBCresume(
|
||||
pc += pcAdjustment;
|
||||
TEBC_YIELD();
|
||||
return TclNREvalObjv(interp, objc, objv,
|
||||
TCL_EVAL_NOERR, NULL);
|
||||
TCL_EVAL_NOERR | TCL_EVAL_SOURCE_IN_FRAME, NULL);
|
||||
|
||||
#if TCL_SUPPORT_84_BYTECODE
|
||||
case INST_CALL_BUILTIN_FUNC1:
|
||||
@@ -3008,8 +3042,11 @@ TEBCresume(
|
||||
bcFramePtr->data.tebc.pc = (char *) pc;
|
||||
iPtr->cmdFramePtr = bcFramePtr;
|
||||
if (iPtr->flags & INTERP_DEBUG_FRAME) {
|
||||
TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc,
|
||||
codePtr, bcFramePtr, pc - codePtr->codeStart);
|
||||
int cmd;
|
||||
if (GetSrcInfoForPc(pc, codePtr, NULL, NULL, &cmd)) {
|
||||
TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc,
|
||||
codePtr, bcFramePtr, cmd, pc - codePtr->codeStart);
|
||||
}
|
||||
}
|
||||
iPtr->ensembleRewrite.sourceObjs = objv;
|
||||
iPtr->ensembleRewrite.numRemovedObjs = opnd;
|
||||
@@ -3646,7 +3683,7 @@ TEBCresume(
|
||||
arrayPtr = NULL;
|
||||
part1Ptr = part2Ptr = NULL;
|
||||
cleanup = 0;
|
||||
TRACE(("%u %ld => ", opnd, increment));
|
||||
TRACE(("%u %s => ", opnd, Tcl_GetString(incrPtr)));
|
||||
|
||||
doIncrVar:
|
||||
if (TclIsVarDirectModifyable2(varPtr, arrayPtr)) {
|
||||
@@ -4211,7 +4248,7 @@ TEBCresume(
|
||||
} else {
|
||||
TRACE(("%d => %.20s false, new pc %u\n", jmpOffset[0],
|
||||
O2S(valuePtr),
|
||||
(unsigned)(pc + jmpOffset[1] - codePtr->codeStart)));
|
||||
(unsigned)(pc + jmpOffset[0] - codePtr->codeStart)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -4701,7 +4738,7 @@ TEBCresume(
|
||||
if (listPtr->refCount == 1) {
|
||||
TRACE(("\"%.30s\" %d %d => ", O2S(valuePtr),
|
||||
TclGetInt4AtPtr(pc+1), TclGetInt4AtPtr(pc+5)));
|
||||
for (index=toIdx+1 ; index<objc-1 ; index++) {
|
||||
for (index=toIdx+1; index<objc ; index++) {
|
||||
TclDecrRefCount(objv[index]);
|
||||
}
|
||||
listPtr->elemCount = toIdx+1;
|
||||
@@ -6594,7 +6631,7 @@ TEBCresume(
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACE_APPEND(("\"%.30s\" \"%.30s\" %d",
|
||||
TRACE_APPEND(("\"%.30s\" \"%.30s\" %d\n",
|
||||
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done));
|
||||
objResultPtr = TCONST(done);
|
||||
/* TODO: consider opt like INST_FOREACH_STEP4 */
|
||||
@@ -6608,7 +6645,7 @@ TEBCresume(
|
||||
while (TclIsVarLink(varPtr)) {
|
||||
varPtr = varPtr->value.linkPtr;
|
||||
}
|
||||
TRACE(("%u => ", opnd));
|
||||
TRACE(("%u => \n", opnd));
|
||||
if (TclIsVarDirectReadable(varPtr)) {
|
||||
dictPtr = varPtr->value.objPtr;
|
||||
} else {
|
||||
@@ -6737,6 +6774,7 @@ TEBCresume(
|
||||
O2S(dictPtr), O2S(listPtr)), Tcl_GetObjResult(interp));
|
||||
goto gotError;
|
||||
}
|
||||
TRACE((" => "));
|
||||
TRACE_APPEND(("%.30s\n", O2S(objResultPtr)));
|
||||
NEXT_INST_F(1, 2, 1);
|
||||
|
||||
@@ -6824,7 +6862,7 @@ TEBCresume(
|
||||
*/
|
||||
|
||||
processExceptionReturn:
|
||||
#if TCL_COMPILE_DEBUG
|
||||
#ifdef TCL_COMPILE_DEBUG
|
||||
switch (*pc) {
|
||||
case INST_INVOKE_STK1:
|
||||
opnd = TclGetUInt1AtPtr(pc+1);
|
||||
@@ -6881,7 +6919,7 @@ TEBCresume(
|
||||
rangePtr->codeOffset, rangePtr->continueOffset));
|
||||
NEXT_INST_F(0, 0, 0);
|
||||
}
|
||||
#if TCL_COMPILE_DEBUG
|
||||
#ifdef TCL_COMPILE_DEBUG
|
||||
if (traceInstructions) {
|
||||
objPtr = Tcl_GetObjResult(interp);
|
||||
if ((result != TCL_ERROR) && (result != TCL_RETURN)) {
|
||||
@@ -6943,7 +6981,7 @@ TEBCresume(
|
||||
if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) {
|
||||
const unsigned char *pcBeg;
|
||||
|
||||
bytes = GetSrcInfoForPc(pc, codePtr, &length, &pcBeg);
|
||||
bytes = GetSrcInfoForPc(pc, codePtr, &length, &pcBeg, NULL);
|
||||
DECACHE_STACK_INFO();
|
||||
TclLogCommandInfo(interp, codePtr->source, bytes,
|
||||
bytes ? length : 0, pcBeg, tosPtr);
|
||||
@@ -7125,7 +7163,7 @@ TEBCresume(
|
||||
}
|
||||
|
||||
codePtr->flags |= TCL_BYTECODE_RECOMPILE;
|
||||
bytes = GetSrcInfoForPc(pc, codePtr, &length, NULL);
|
||||
bytes = GetSrcInfoForPc(pc, codePtr, &length, NULL, NULL);
|
||||
opnd = TclGetUInt4AtPtr(pc+1);
|
||||
pc += (opnd-1);
|
||||
PUSH_OBJECT(Tcl_NewStringObj(bytes, length));
|
||||
@@ -8618,7 +8656,7 @@ ValidatePcAndStackTop(
|
||||
if (checkStack &&
|
||||
((stackTop < 0) || (stackTop > stackUpperBound))) {
|
||||
int numChars;
|
||||
const char *cmd = GetSrcInfoForPc(pc, codePtr, &numChars, NULL);
|
||||
const char *cmd = GetSrcInfoForPc(pc, codePtr, &numChars, NULL, NULL);
|
||||
|
||||
fprintf(stderr, "\nBad stack top %d at pc %u in TclNRExecuteByteCode (min 0, max %i)",
|
||||
stackTop, relativePc, stackUpperBound);
|
||||
@@ -8702,7 +8740,7 @@ IllegalExprOperandType(
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclGetSrcInfoForPc, GetSrcInfoForPc, TclGetSrcInfoForCmd --
|
||||
* TclGetSrcInfoForPc, GetSrcInfoForPc, TclGetSourceFromFrame --
|
||||
*
|
||||
* Given a program counter value, finds the closest command in the
|
||||
* bytecode code unit's CmdLocation array and returns information about
|
||||
@@ -8723,16 +8761,26 @@ IllegalExprOperandType(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const char *
|
||||
TclGetSrcInfoForCmd(
|
||||
Interp *iPtr,
|
||||
int *lenPtr)
|
||||
Tcl_Obj *
|
||||
TclGetSourceFromFrame(
|
||||
CmdFrame *cfPtr,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
CmdFrame *cfPtr = iPtr->cmdFramePtr;
|
||||
ByteCode *codePtr = (ByteCode *) cfPtr->data.tebc.codePtr;
|
||||
if (cfPtr == NULL) {
|
||||
return Tcl_NewListObj(objc, objv);
|
||||
}
|
||||
if (cfPtr->cmdObj == NULL) {
|
||||
if (cfPtr->cmd == NULL) {
|
||||
ByteCode *codePtr = (ByteCode *) cfPtr->data.tebc.codePtr;
|
||||
|
||||
return GetSrcInfoForPc((unsigned char *) cfPtr->data.tebc.pc,
|
||||
codePtr, lenPtr, NULL);
|
||||
cfPtr->cmd = GetSrcInfoForPc((unsigned char *)
|
||||
cfPtr->data.tebc.pc, codePtr, &cfPtr->len, NULL, NULL);
|
||||
}
|
||||
cfPtr->cmdObj = Tcl_NewStringObj(cfPtr->cmd, cfPtr->len);
|
||||
Tcl_IncrRefCount(cfPtr->cmdObj);
|
||||
}
|
||||
return cfPtr->cmdObj;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -8741,13 +8789,16 @@ TclGetSrcInfoForPc(
|
||||
{
|
||||
ByteCode *codePtr = (ByteCode *) cfPtr->data.tebc.codePtr;
|
||||
|
||||
if (cfPtr->cmd.str.cmd == NULL) {
|
||||
cfPtr->cmd.str.cmd = GetSrcInfoForPc(
|
||||
assert(cfPtr->type == TCL_LOCATION_BC);
|
||||
|
||||
if (cfPtr->cmd == NULL) {
|
||||
|
||||
cfPtr->cmd = GetSrcInfoForPc(
|
||||
(unsigned char *) cfPtr->data.tebc.pc, codePtr,
|
||||
&cfPtr->cmd.str.len, NULL);
|
||||
&cfPtr->len, NULL, NULL);
|
||||
}
|
||||
|
||||
if (cfPtr->cmd.str.cmd != NULL) {
|
||||
if (cfPtr->cmd != NULL) {
|
||||
/*
|
||||
* We now have the command. We can get the srcOffset back and from
|
||||
* there find the list of word locations for this command.
|
||||
@@ -8764,7 +8815,7 @@ TclGetSrcInfoForPc(
|
||||
return;
|
||||
}
|
||||
|
||||
srcOffset = cfPtr->cmd.str.cmd - codePtr->source;
|
||||
srcOffset = cfPtr->cmd - codePtr->source;
|
||||
eclPtr = Tcl_GetHashValue(hePtr);
|
||||
|
||||
for (i=0; i < eclPtr->nuloc; i++) {
|
||||
@@ -8804,9 +8855,12 @@ GetSrcInfoForPc(
|
||||
int *lengthPtr, /* If non-NULL, the location where the length
|
||||
* of the command's source should be stored.
|
||||
* If NULL, no length is stored. */
|
||||
const unsigned char **pcBeg)/* If non-NULL, the bytecode location
|
||||
const unsigned char **pcBeg,/* If non-NULL, the bytecode location
|
||||
* where the current instruction starts.
|
||||
* If NULL; no pointer is stored. */
|
||||
int *cmdIdxPtr) /* If non-NULL, the location where the index
|
||||
* of the command containing the pc should
|
||||
* be stored. */
|
||||
{
|
||||
register int pcOffset = (pc - codePtr->codeStart);
|
||||
int numCmds = codePtr->numCommands;
|
||||
@@ -8816,6 +8870,7 @@ GetSrcInfoForPc(
|
||||
int bestDist = INT_MAX; /* Distance of pc to best cmd's start pc. */
|
||||
int bestSrcOffset = -1; /* Initialized to avoid compiler warning. */
|
||||
int bestSrcLength = -1; /* Initialized to avoid compiler warning. */
|
||||
int bestCmdIdx = -1;
|
||||
|
||||
if ((pcOffset < 0) || (pcOffset >= codePtr->numCodeBytes)) {
|
||||
if (pcBeg != NULL) *pcBeg = NULL;
|
||||
@@ -8883,6 +8938,7 @@ GetSrcInfoForPc(
|
||||
bestDist = dist;
|
||||
bestSrcOffset = srcOffset;
|
||||
bestSrcLength = srcLen;
|
||||
bestCmdIdx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8912,6 +8968,10 @@ GetSrcInfoForPc(
|
||||
*lengthPtr = bestSrcLength;
|
||||
}
|
||||
|
||||
if (cmdIdxPtr != NULL) {
|
||||
*cmdIdxPtr = bestCmdIdx;
|
||||
}
|
||||
|
||||
return (codePtr->source + bestSrcOffset);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -139,7 +139,7 @@ int
|
||||
TclCreateSocketAddress(
|
||||
Tcl_Interp *interp, /* Interpreter for querying
|
||||
* the desired socket family */
|
||||
struct addrinfo **addrlist, /* Socket address list */
|
||||
void **addrlist, /* Socket address list */
|
||||
const char *host, /* Host. NULL implies INADDR_ANY */
|
||||
int port, /* Port number */
|
||||
int willBind, /* Is this an address to bind() to or
|
||||
@@ -213,7 +213,7 @@ TclCreateSocketAddress(
|
||||
hints.ai_flags |= AI_PASSIVE;
|
||||
}
|
||||
|
||||
result = getaddrinfo(native, portstring, &hints, addrlist);
|
||||
result = getaddrinfo(native, portstring, &hints, (struct addrinfo **) addrlist);
|
||||
|
||||
if (host != NULL) {
|
||||
Tcl_DStringFree(&ds);
|
||||
|
||||
+4
-1
@@ -1944,7 +1944,7 @@ TclNREvalFile(
|
||||
iPtr->evalFlags |= TCL_EVAL_FILE;
|
||||
TclNRAddCallback(interp, EvalFileCallback, oldScriptFile, pathPtr, objPtr,
|
||||
NULL);
|
||||
return TclNREvalObjEx(interp, objPtr, 0, NULL, INT_MIN);
|
||||
return TclNREvalObjEx(interp, objPtr, TCL_EVAL_DIRECT, NULL, INT_MIN);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -3225,6 +3225,9 @@ Tcl_LoadFile(
|
||||
*/
|
||||
|
||||
copyToPtr = TclpTempFileNameForLibrary(interp, pathPtr);
|
||||
if (copyToPtr == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_IncrRefCount(copyToPtr);
|
||||
|
||||
copyFsPtr = Tcl_FSGetFileSystemForPath(copyToPtr);
|
||||
|
||||
+38
-44
@@ -30,8 +30,7 @@
|
||||
* here, so that system-dependent personalizations for the include files only
|
||||
* have to be made in once place. This results in a few extra includes, but
|
||||
* greater modularity. The order of the three groups of #includes is
|
||||
* important. For example, stdio.h is needed by tcl.h, and the _ANSI_ARGS_
|
||||
* declaration in tcl.h is needed by stdlib.h in some configurations.
|
||||
* important. For example, stdio.h is needed by tcl.h.
|
||||
*/
|
||||
|
||||
#include "tclPort.h"
|
||||
@@ -119,6 +118,10 @@ typedef int ptrdiff_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following procedures allow namespaces to be customized to support
|
||||
* special name resolution rules for commands/variables.
|
||||
@@ -1172,29 +1175,27 @@ typedef struct CmdFrame {
|
||||
*
|
||||
* EXECUTION CONTEXTS and usage of CmdFrame
|
||||
*
|
||||
* Field TEBC EvalEx EvalObjEx
|
||||
* ======= ==== ====== =========
|
||||
* level yes yes yes
|
||||
* type BC/PREBC SRC/EVAL EVAL_LIST
|
||||
* line0 yes yes yes
|
||||
* framePtr yes yes yes
|
||||
* ======= ==== ====== =========
|
||||
* Field TEBC EvalEx
|
||||
* ======= ==== ======
|
||||
* level yes yes
|
||||
* type BC/PREBC SRC/EVAL
|
||||
* line0 yes yes
|
||||
* framePtr yes yes
|
||||
* ======= ==== ======
|
||||
*
|
||||
* ======= ==== ====== ========= union data
|
||||
* line1 - yes -
|
||||
* line3 - yes -
|
||||
* path - yes -
|
||||
* ------- ---- ------ ---------
|
||||
* codePtr yes - -
|
||||
* pc yes - -
|
||||
* ======= ==== ====== =========
|
||||
* ======= ==== ========= union data
|
||||
* line1 - yes
|
||||
* line3 - yes
|
||||
* path - yes
|
||||
* ------- ---- ------
|
||||
* codePtr yes -
|
||||
* pc yes -
|
||||
* ======= ==== ======
|
||||
*
|
||||
* ======= ==== ====== ========= | union cmd
|
||||
* listPtr - - yes |
|
||||
* ------- ---- ------ --------- |
|
||||
* cmd yes yes - |
|
||||
* cmdlen yes yes - |
|
||||
* ------- ---- ------ --------- |
|
||||
* ======= ==== ========= union cmd
|
||||
* str.cmd yes yes
|
||||
* str.len yes yes
|
||||
* ------- ---- ------
|
||||
*/
|
||||
|
||||
union {
|
||||
@@ -1207,15 +1208,9 @@ typedef struct CmdFrame {
|
||||
const char *pc; /* ... and instruction pointer. */
|
||||
} tebc;
|
||||
} data;
|
||||
union {
|
||||
struct {
|
||||
const char *cmd; /* The executed command, if possible... */
|
||||
int len; /* ... and its length. */
|
||||
} str;
|
||||
Tcl_Obj *listPtr; /* Tcl_EvalObjEx, cmd list. */
|
||||
} cmd;
|
||||
int numLevels; /* Value of interp's numLevels when the frame
|
||||
* was pushed. */
|
||||
Tcl_Obj *cmdObj;
|
||||
const char *cmd; /* The executed command, if possible... */
|
||||
int len; /* ... and its length. */
|
||||
const struct CFWordBC *litarg;
|
||||
/* Link to set of literal arguments which have
|
||||
* ben pushed on the lineLABCPtr stack by
|
||||
@@ -1279,8 +1274,6 @@ typedef struct ContLineLoc {
|
||||
* location data referenced via the 'baseLocPtr'.
|
||||
*
|
||||
* TCL_LOCATION_EVAL : Frame is for a script evaluated by EvalEx.
|
||||
* TCL_LOCATION_EVAL_LIST : Frame is for a script evaluated by the list
|
||||
* optimization path of EvalObjEx.
|
||||
* TCL_LOCATION_BC : Frame is for bytecode.
|
||||
* TCL_LOCATION_PREBC : Frame is for precompiled bytecode.
|
||||
* TCL_LOCATION_SOURCE : Frame is for a script evaluated by EvalEx, from a
|
||||
@@ -1292,8 +1285,6 @@ typedef struct ContLineLoc {
|
||||
*/
|
||||
|
||||
#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script. */
|
||||
#define TCL_LOCATION_EVAL_LIST (1) /* Location in a dynamic eval script,
|
||||
* list-path. */
|
||||
#define TCL_LOCATION_BC (2) /* Location in byte code. */
|
||||
#define TCL_LOCATION_PREBC (3) /* Location in precompiled byte code, no
|
||||
* location. */
|
||||
@@ -2207,9 +2198,10 @@ typedef struct Interp {
|
||||
* other than these should be turned into errors.
|
||||
*/
|
||||
|
||||
#define TCL_ALLOW_EXCEPTIONS 4
|
||||
#define TCL_EVAL_FILE 2
|
||||
#define TCL_EVAL_CTX 8
|
||||
#define TCL_ALLOW_EXCEPTIONS 0x04
|
||||
#define TCL_EVAL_FILE 0x02
|
||||
#define TCL_EVAL_SOURCE_IN_FRAME 0x10
|
||||
#define TCL_EVAL_NORESOLVE 0x20
|
||||
|
||||
/*
|
||||
* Flag bits for Interp structures:
|
||||
@@ -2734,6 +2726,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd;
|
||||
MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd;
|
||||
MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldmObjCmd;
|
||||
MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldToObjCmd;
|
||||
MODULE_SCOPE Tcl_ObjCmdProc TclNRInvoke;
|
||||
|
||||
MODULE_SCOPE void TclSetTailcall(Tcl_Interp *interp, Tcl_Obj *tailcallPtr);
|
||||
MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp);
|
||||
@@ -2825,7 +2818,7 @@ MODULE_SCOPE void TclArgumentRelease(Tcl_Interp *interp,
|
||||
Tcl_Obj *objv[], int objc);
|
||||
MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp *interp,
|
||||
Tcl_Obj *objv[], int objc,
|
||||
void *codePtr, CmdFrame *cfPtr, int pc);
|
||||
void *codePtr, CmdFrame *cfPtr, int cmd, int pc);
|
||||
MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp *interp,
|
||||
CmdFrame *cfPtr);
|
||||
MODULE_SCOPE void TclArgumentGet(Tcl_Interp *interp, Tcl_Obj *obj,
|
||||
@@ -2916,7 +2909,8 @@ MODULE_SCOPE int TclGetOpenModeEx(Tcl_Interp *interp,
|
||||
const char *modeString, int *seekFlagPtr,
|
||||
int *binaryPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclGetProcessGlobalValue(ProcessGlobalValue *pgvPtr);
|
||||
MODULE_SCOPE const char *TclGetSrcInfoForCmd(Interp *iPtr, int *lenPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclGetSourceFromFrame(CmdFrame *cfPtr, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclGlob(Tcl_Interp *interp, char *pattern,
|
||||
Tcl_Obj *unquotedPrefix, int globFlags,
|
||||
Tcl_GlobTypeData *types);
|
||||
@@ -3007,9 +3001,8 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
|
||||
MODULE_SCOPE void TclpFinalizePipes(void);
|
||||
MODULE_SCOPE void TclpFinalizeSockets(void);
|
||||
MODULE_SCOPE int TclCreateSocketAddress(Tcl_Interp *interp,
|
||||
struct addrinfo **addrlist,
|
||||
const char *host, int port, int willBind,
|
||||
const char **errorMsgPtr);
|
||||
void **addrlist, const char *host, int port,
|
||||
int willBind, const char **errorMsgPtr);
|
||||
MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
|
||||
Tcl_ThreadCreateProc *proc, ClientData clientData,
|
||||
int stackSize, int flags);
|
||||
@@ -3094,6 +3087,7 @@ MODULE_SCOPE int TclTrimLeft(const char *bytes, int numBytes,
|
||||
const char *trim, int numTrim);
|
||||
MODULE_SCOPE int TclTrimRight(const char *bytes, int numBytes,
|
||||
const char *trim, int numTrim);
|
||||
MODULE_SCOPE int TclUtfCasecmp(const char *cs, const char *ct);
|
||||
MODULE_SCOPE Tcl_Obj * TclpNativeToNormalized(ClientData clientData);
|
||||
MODULE_SCOPE Tcl_Obj * TclpFilesystemPathType(Tcl_Obj *pathPtr);
|
||||
MODULE_SCOPE int TclpDlopen(Tcl_Interp *interp, Tcl_Obj *pathPtr,
|
||||
|
||||
@@ -545,6 +545,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
|
||||
#undef TclpGmtime_unix
|
||||
#undef TclWinConvertWSAError
|
||||
#define TclWinConvertWSAError TclWinConvertError
|
||||
#undef TclpInetNtoa
|
||||
#define TclpInetNtoa inet_ntoa
|
||||
|
||||
#if defined(__WIN32__) || defined(__CYGWIN__)
|
||||
# undef TclWinNToHS
|
||||
|
||||
+52
-4
@@ -279,6 +279,12 @@ static void DeleteScriptLimitCallback(ClientData clientData);
|
||||
static void RunLimitHandlers(LimitHandler *handlerPtr,
|
||||
Tcl_Interp *interp);
|
||||
static void TimeLimitCallback(ClientData clientData);
|
||||
|
||||
/* NRE enabling */
|
||||
static Tcl_NRPostProc NRPostInvokeHidden;
|
||||
static Tcl_ObjCmdProc NRInterpCmd;
|
||||
static Tcl_ObjCmdProc NRSlaveCmd;
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -481,7 +487,8 @@ TclInterpInit(
|
||||
slavePtr->interpCmd = NULL;
|
||||
Tcl_InitHashTable(&slavePtr->aliasTable, TCL_STRING_KEYS);
|
||||
|
||||
Tcl_CreateObjCommand(interp, "interp", Tcl_InterpObjCmd, NULL, NULL);
|
||||
Tcl_NRCreateCommand(interp, "interp", Tcl_InterpObjCmd, NRInterpCmd,
|
||||
NULL, NULL);
|
||||
|
||||
Tcl_CallWhenDeleted(interp, InterpInfoDeleteProc, NULL);
|
||||
return TCL_OK;
|
||||
@@ -589,6 +596,16 @@ Tcl_InterpObjCmd(
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
return Tcl_NRCallObjProc(interp, NRInterpCmd, clientData, objc, objv);
|
||||
}
|
||||
|
||||
static int
|
||||
NRInterpCmd(
|
||||
ClientData clientData, /* Unused. */
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
Tcl_Interp *slaveInterp;
|
||||
int index;
|
||||
@@ -2372,8 +2389,8 @@ SlaveCreate(
|
||||
slavePtr->masterInterp = masterInterp;
|
||||
slavePtr->slaveEntryPtr = hPtr;
|
||||
slavePtr->slaveInterp = slaveInterp;
|
||||
slavePtr->interpCmd = Tcl_CreateObjCommand(masterInterp, path,
|
||||
SlaveObjCmd, slaveInterp, SlaveObjCmdDeleteProc);
|
||||
slavePtr->interpCmd = Tcl_NRCreateCommand(masterInterp, path,
|
||||
SlaveObjCmd, NRSlaveCmd, slaveInterp, SlaveObjCmdDeleteProc);
|
||||
Tcl_InitHashTable(&slavePtr->aliasTable, TCL_STRING_KEYS);
|
||||
Tcl_SetHashValue(hPtr, slavePtr);
|
||||
Tcl_SetVar(slaveInterp, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
|
||||
@@ -2461,6 +2478,16 @@ SlaveObjCmd(
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
return Tcl_NRCallObjProc(interp, NRSlaveCmd, clientData, objc, objv);
|
||||
}
|
||||
|
||||
static int
|
||||
NRSlaveCmd(
|
||||
ClientData clientData, /* Slave interpreter. */
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
Tcl_Interp *slaveInterp = clientData;
|
||||
int index;
|
||||
@@ -3052,7 +3079,11 @@ SlaveInvokeHidden(
|
||||
Tcl_AllowExceptions(slaveInterp);
|
||||
|
||||
if (namespaceName == NULL) {
|
||||
result = TclObjInvoke(slaveInterp, objc, objv, TCL_INVOKE_HIDDEN);
|
||||
NRE_callback *rootPtr = TOP_CB(slaveInterp);
|
||||
|
||||
Tcl_NRAddCallback(interp, NRPostInvokeHidden, slaveInterp,
|
||||
rootPtr, NULL, NULL);
|
||||
return TclNRInvoke(NULL, slaveInterp, objc, objv);
|
||||
} else {
|
||||
Namespace *nsPtr, *dummy1, *dummy2;
|
||||
const char *tail;
|
||||
@@ -3071,6 +3102,23 @@ SlaveInvokeHidden(
|
||||
Tcl_Release(slaveInterp);
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
NRPostInvokeHidden(
|
||||
ClientData data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
Tcl_Interp *slaveInterp = (Tcl_Interp *)data[0];
|
||||
NRE_callback *rootPtr = (NRE_callback *)data[1];
|
||||
|
||||
if (interp != slaveInterp) {
|
||||
result = TclNRRunCallbacks(slaveInterp, result, rootPtr);
|
||||
Tcl_TransferResult(slaveInterp, result, interp);
|
||||
}
|
||||
Tcl_Release(slaveInterp);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
+3
-1
@@ -313,6 +313,9 @@ Tcl_MainEx(
|
||||
Tcl_Channel chan;
|
||||
InteractiveState is;
|
||||
|
||||
TclpSetInitialEncodings();
|
||||
TclpFindExecutable((const char *)argv[0]);
|
||||
|
||||
Tcl_InitMemory(interp);
|
||||
|
||||
is.interp = interp;
|
||||
@@ -640,7 +643,6 @@ Tcl_Main(
|
||||
* function to call after most initialization
|
||||
* but before starting to execute commands. */
|
||||
{
|
||||
Tcl_FindExecutable(argv[0]);
|
||||
Tcl_MainEx(argc, argv, appInitProc, Tcl_CreateInterp());
|
||||
}
|
||||
#endif /* TCL_MAJOR_VERSION == 8 && !UNICODE */
|
||||
|
||||
+1
-1
@@ -1942,7 +1942,7 @@ InvokeImportedNRCmd(
|
||||
Command *realCmdPtr = dataPtr->realCmdPtr;
|
||||
|
||||
TclSkipTailcall(interp);
|
||||
return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv, 0);
|
||||
return TclNREvalObjv(interp, objc, objv, TCL_EVAL_NOERR, realCmdPtr);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ extern const char *TclOOInitializeStubs(
|
||||
* win/tclooConfig.sh
|
||||
*/
|
||||
|
||||
#define TCLOO_VERSION "1.0"
|
||||
#define TCLOO_VERSION "1.0.1"
|
||||
#define TCLOO_PATCHLEVEL TCLOO_VERSION
|
||||
|
||||
/*
|
||||
|
||||
+10
-6
@@ -4,7 +4,7 @@
|
||||
* This file contains implementations of the "simple" commands and
|
||||
* methods from the object-system core.
|
||||
*
|
||||
* Copyright (c) 2005-2012 by Donal K. Fellows
|
||||
* Copyright (c) 2005-2013 by Donal K. Fellows
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
@@ -88,7 +88,7 @@ TclOO_Class_Constructor(
|
||||
Tcl_Obj *const *objv)
|
||||
{
|
||||
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
|
||||
Tcl_Obj *invoke[3];
|
||||
Tcl_Obj **invoke;
|
||||
|
||||
if (objc-1 > Tcl_ObjectContextSkippedArgs(context)) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
@@ -102,6 +102,7 @@ TclOO_Class_Constructor(
|
||||
* Delegate to [oo::define] to do the work.
|
||||
*/
|
||||
|
||||
invoke = ckalloc(3 * sizeof(Tcl_Obj *));
|
||||
invoke[0] = oPtr->fPtr->defineName;
|
||||
invoke[1] = TclOOObjectName(interp, oPtr);
|
||||
invoke[2] = objv[objc-1];
|
||||
@@ -115,7 +116,7 @@ TclOO_Class_Constructor(
|
||||
Tcl_IncrRefCount(invoke[1]);
|
||||
Tcl_IncrRefCount(invoke[2]);
|
||||
TclNRAddCallback(interp, DecrRefsPostClassConstructor,
|
||||
invoke[0], invoke[1], invoke[2], NULL);
|
||||
invoke, NULL, NULL, NULL);
|
||||
|
||||
/*
|
||||
* Tricky point: do not want the extra reported level in the Tcl stack
|
||||
@@ -131,9 +132,12 @@ DecrRefsPostClassConstructor(
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
TclDecrRefCount((Tcl_Obj *) data[0]);
|
||||
TclDecrRefCount((Tcl_Obj *) data[1]);
|
||||
TclDecrRefCount((Tcl_Obj *) data[2]);
|
||||
Tcl_Obj **invoke = data[0];
|
||||
|
||||
TclDecrRefCount(invoke[0]);
|
||||
TclDecrRefCount(invoke[1]);
|
||||
TclDecrRefCount(invoke[2]);
|
||||
ckfree(invoke);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+32
-19
@@ -4,7 +4,7 @@
|
||||
* This file contains the implementation of the ::oo::define command,
|
||||
* part of the object-system core (NB: not Tcl_Obj, but ::oo).
|
||||
*
|
||||
* Copyright (c) 2006-2012 by Donal K. Fellows
|
||||
* Copyright (c) 2006-2013 by Donal K. Fellows
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
@@ -2206,29 +2206,42 @@ ClassSuperSet(
|
||||
|
||||
/*
|
||||
* Parse the arguments to get the class to use as superclasses.
|
||||
*
|
||||
* Note that zero classes is special, as it is equivalent to just the
|
||||
* class of objects. [Bug 9d61624b3d]
|
||||
*/
|
||||
|
||||
for (i=0 ; i<superc ; i++) {
|
||||
superclasses[i] = GetClassInOuterContext(interp, superv[i],
|
||||
"only a class can be a superclass");
|
||||
if (superclasses[i] == NULL) {
|
||||
goto failedAfterAlloc;
|
||||
if (superc == 0) {
|
||||
superclasses = ckrealloc(superclasses, sizeof(Class *));
|
||||
superclasses[0] = oPtr->fPtr->objectCls;
|
||||
superc = 1;
|
||||
if (TclOOIsReachable(oPtr->fPtr->classCls, oPtr->classPtr)) {
|
||||
superclasses[0] = oPtr->fPtr->classCls;
|
||||
}
|
||||
for (j=0 ; j<i ; j++) {
|
||||
if (superclasses[j] == superclasses[i]) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"class should only be a direct superclass once", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "OO", "REPETITIOUS", NULL);
|
||||
} else {
|
||||
for (i=0 ; i<superc ; i++) {
|
||||
superclasses[i] = GetClassInOuterContext(interp, superv[i],
|
||||
"only a class can be a superclass");
|
||||
if (superclasses[i] == NULL) {
|
||||
goto failedAfterAlloc;
|
||||
}
|
||||
}
|
||||
if (TclOOIsReachable(oPtr->classPtr, superclasses[i])) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"attempt to form circular dependency graph", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "OO", "CIRCULARITY", NULL);
|
||||
failedAfterAlloc:
|
||||
ckfree((char *) superclasses);
|
||||
return TCL_ERROR;
|
||||
for (j=0 ; j<i ; j++) {
|
||||
if (superclasses[j] == superclasses[i]) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"class should only be a direct superclass once",
|
||||
-1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "OO", "REPETITIOUS",NULL);
|
||||
goto failedAfterAlloc;
|
||||
}
|
||||
}
|
||||
if (TclOOIsReachable(oPtr->classPtr, superclasses[i])) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"attempt to form circular dependency graph", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "OO", "CIRCULARITY", NULL);
|
||||
failedAfterAlloc:
|
||||
ckfree((char *) superclasses);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,12 +122,6 @@ typedef struct ForwardMethod {
|
||||
Tcl_Obj *prefixObj; /* The list of values to use to replace the
|
||||
* object and method name with. Will be a
|
||||
* non-empty list. */
|
||||
int fullyQualified; /* If 1, the command name is fully qualified
|
||||
* and we should let the default Tcl mechanism
|
||||
* handle the command lookup because it is
|
||||
* more efficient. If 0, we need to do a
|
||||
* specialized lookup based on the current
|
||||
* object's namespace. */
|
||||
} ForwardMethod;
|
||||
|
||||
/*
|
||||
|
||||
+55
-18
@@ -513,8 +513,8 @@ TclOOMakeProcInstanceMethod(
|
||||
cfPtr->data.eval.path = context.data.eval.path;
|
||||
Tcl_IncrRefCount(cfPtr->data.eval.path);
|
||||
|
||||
cfPtr->cmd.str.cmd = NULL;
|
||||
cfPtr->cmd.str.len = 0;
|
||||
cfPtr->cmd = NULL;
|
||||
cfPtr->len = 0;
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr,
|
||||
(char *) procPtr, &isNew);
|
||||
@@ -626,8 +626,8 @@ TclOOMakeProcMethod(
|
||||
cfPtr->data.eval.path = context.data.eval.path;
|
||||
Tcl_IncrRefCount(cfPtr->data.eval.path);
|
||||
|
||||
cfPtr->cmd.str.cmd = NULL;
|
||||
cfPtr->cmd.str.len = 0;
|
||||
cfPtr->cmd = NULL;
|
||||
cfPtr->len = 0;
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr,
|
||||
(char *) procPtr, &isNew);
|
||||
@@ -1290,11 +1290,57 @@ CloneProcedureMethod(
|
||||
ClientData *newClientData)
|
||||
{
|
||||
ProcedureMethod *pmPtr = clientData;
|
||||
ProcedureMethod *pm2Ptr = ckalloc(sizeof(ProcedureMethod));
|
||||
ProcedureMethod *pm2Ptr;
|
||||
Tcl_Obj *bodyObj, *argsObj;
|
||||
CompiledLocal *localPtr;
|
||||
|
||||
/*
|
||||
* Copy the argument list.
|
||||
*/
|
||||
|
||||
argsObj = Tcl_NewObj();
|
||||
for (localPtr=pmPtr->procPtr->firstLocalPtr; localPtr!=NULL;
|
||||
localPtr=localPtr->nextPtr) {
|
||||
if (TclIsVarArgument(localPtr)) {
|
||||
Tcl_Obj *argObj = Tcl_NewObj();
|
||||
|
||||
Tcl_ListObjAppendElement(NULL, argObj,
|
||||
Tcl_NewStringObj(localPtr->name, -1));
|
||||
if (localPtr->defValuePtr != NULL) {
|
||||
Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr);
|
||||
}
|
||||
Tcl_ListObjAppendElement(NULL, argsObj, argObj);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Must strip the internal representation in order to ensure that any
|
||||
* bound references to instance variables are removed. [Bug 3609693]
|
||||
*/
|
||||
|
||||
bodyObj = Tcl_DuplicateObj(pmPtr->procPtr->bodyPtr);
|
||||
TclFreeIntRep(bodyObj);
|
||||
|
||||
/*
|
||||
* Create the actual copy of the method record, manufacturing a new proc
|
||||
* record.
|
||||
*/
|
||||
|
||||
pm2Ptr = ckalloc(sizeof(ProcedureMethod));
|
||||
memcpy(pm2Ptr, pmPtr, sizeof(ProcedureMethod));
|
||||
pm2Ptr->refCount = 1;
|
||||
pm2Ptr->procPtr->refCount++;
|
||||
Tcl_IncrRefCount(argsObj);
|
||||
Tcl_IncrRefCount(bodyObj);
|
||||
if (TclCreateProc(interp, NULL, "", argsObj, bodyObj,
|
||||
&pm2Ptr->procPtr) != TCL_OK) {
|
||||
Tcl_DecrRefCount(argsObj);
|
||||
Tcl_DecrRefCount(bodyObj);
|
||||
ckfree(pm2Ptr);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_DecrRefCount(argsObj);
|
||||
Tcl_DecrRefCount(bodyObj);
|
||||
|
||||
if (pmPtr->cloneClientdataProc) {
|
||||
pm2Ptr->clientData = pmPtr->cloneClientdataProc(pmPtr->clientData);
|
||||
}
|
||||
@@ -1338,7 +1384,6 @@ TclOONewForwardInstanceMethod(
|
||||
fmPtr = ckalloc(sizeof(ForwardMethod));
|
||||
fmPtr->prefixObj = prefixObj;
|
||||
Tcl_ListObjIndex(interp, prefixObj, 0, &cmdObj);
|
||||
fmPtr->fullyQualified = (strncmp(TclGetString(cmdObj), "::", 2) == 0);
|
||||
Tcl_IncrRefCount(prefixObj);
|
||||
return (Method *) Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr,
|
||||
nameObj, flags, &fwdMethodType, fmPtr);
|
||||
@@ -1380,7 +1425,6 @@ TclOONewForwardMethod(
|
||||
fmPtr = ckalloc(sizeof(ForwardMethod));
|
||||
fmPtr->prefixObj = prefixObj;
|
||||
Tcl_ListObjIndex(interp, prefixObj, 0, &cmdObj);
|
||||
fmPtr->fullyQualified = (strncmp(TclGetString(cmdObj), "::", 2) == 0);
|
||||
Tcl_IncrRefCount(prefixObj);
|
||||
return (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, nameObj,
|
||||
flags, &fwdMethodType, fmPtr);
|
||||
@@ -1409,7 +1453,6 @@ InvokeForwardMethod(
|
||||
ForwardMethod *fmPtr = clientData;
|
||||
Tcl_Obj **argObjs, **prefixObjs;
|
||||
int numPrefixes, len, skip = contextPtr->skip;
|
||||
Command *cmdPtr;
|
||||
|
||||
/*
|
||||
* Build the real list of arguments to use. Note that we know that the
|
||||
@@ -1421,15 +1464,10 @@ InvokeForwardMethod(
|
||||
Tcl_ListObjGetElements(NULL, fmPtr->prefixObj, &numPrefixes, &prefixObjs);
|
||||
argObjs = InitEnsembleRewrite(interp, objc, objv, skip,
|
||||
numPrefixes, prefixObjs, &len);
|
||||
|
||||
if (fmPtr->fullyQualified) {
|
||||
cmdPtr = NULL;
|
||||
} else {
|
||||
cmdPtr = (Command *) Tcl_FindCommand(interp, TclGetString(argObjs[0]),
|
||||
contextPtr->oPtr->namespacePtr, 0 /* normal lookup */);
|
||||
}
|
||||
Tcl_NRAddCallback(interp, FinalizeForwardCall, argObjs, NULL, NULL, NULL);
|
||||
return TclNREvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE, cmdPtr);
|
||||
((Interp *)interp)->lookupNsPtr
|
||||
= (Namespace *) contextPtr->oPtr->namespacePtr;
|
||||
return TclNREvalObjv(interp, len, argObjs, TCL_EVAL_NOERR, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1474,7 +1512,6 @@ CloneForwardMethod(
|
||||
ForwardMethod *fm2Ptr = ckalloc(sizeof(ForwardMethod));
|
||||
|
||||
fm2Ptr->prefixObj = fmPtr->prefixObj;
|
||||
fm2Ptr->fullyQualified = fmPtr->fullyQualified;
|
||||
Tcl_IncrRefCount(fm2Ptr->prefixObj);
|
||||
*newClientData = fm2Ptr;
|
||||
return TCL_OK;
|
||||
|
||||
+3
-35
@@ -97,7 +97,6 @@ typedef struct ThreadSpecificData {
|
||||
|
||||
static Tcl_ThreadDataKey dataKey;
|
||||
|
||||
static void ContLineLocFree(char *clientData);
|
||||
static void TclThreadFinalizeContLines(ClientData clientData);
|
||||
static ThreadSpecificData *TclGetContLineTable(void);
|
||||
|
||||
@@ -805,14 +804,7 @@ TclThreadFinalizeContLines(
|
||||
|
||||
for (hPtr = Tcl_FirstHashEntry(tsdPtr->lineCLPtr, &hSearch);
|
||||
hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) {
|
||||
/*
|
||||
* We are not using Tcl_EventuallyFree (as in TclFreeObj()) because
|
||||
* here we can be sure that the compiler will not hold references to
|
||||
* the data in the hashtable, and using TEF might bork the
|
||||
* finalization sequence.
|
||||
*/
|
||||
|
||||
ContLineLocFree(Tcl_GetHashValue(hPtr));
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
}
|
||||
Tcl_DeleteHashTable(tsdPtr->lineCLPtr);
|
||||
@@ -820,30 +812,6 @@ TclThreadFinalizeContLines(
|
||||
tsdPtr->lineCLPtr = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* ContLineLocFree --
|
||||
*
|
||||
* The freProc for continuation line location tables.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Releases memory.
|
||||
*
|
||||
* TIP #280
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
ContLineLocFree(
|
||||
char *clientData)
|
||||
{
|
||||
ckfree(clientData);
|
||||
}
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------
|
||||
*
|
||||
@@ -1405,7 +1373,7 @@ TclFreeObj(
|
||||
if (tsdPtr->lineCLPtr) {
|
||||
hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, objPtr);
|
||||
if (hPtr) {
|
||||
Tcl_EventuallyFree(Tcl_GetHashValue(hPtr), ContLineLocFree);
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
}
|
||||
}
|
||||
@@ -1496,7 +1464,7 @@ TclFreeObj(
|
||||
if (tsdPtr->lineCLPtr) {
|
||||
hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, objPtr);
|
||||
if (hPtr) {
|
||||
Tcl_EventuallyFree(Tcl_GetHashValue(hPtr), ContLineLocFree);
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,428 @@
|
||||
/*
|
||||
* tclOptimize.c --
|
||||
*
|
||||
* This file contains the bytecode optimizer.
|
||||
*
|
||||
* Copyright (c) 2013 by Donal Fellows.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclCompile.h"
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* Forward declarations.
|
||||
*/
|
||||
|
||||
static void AdvanceJumps(CompileEnv *envPtr);
|
||||
static void ConvertZeroEffectToNOP(CompileEnv *envPtr);
|
||||
static void LocateTargetAddresses(CompileEnv *envPtr,
|
||||
Tcl_HashTable *tablePtr);
|
||||
static void TrimUnreachable(CompileEnv *envPtr);
|
||||
|
||||
/*
|
||||
* Helper macros.
|
||||
*/
|
||||
|
||||
#define DefineTargetAddress(tablePtr, address) \
|
||||
((void) Tcl_CreateHashEntry((tablePtr), (void *) (address), &isNew))
|
||||
#define IsTargetAddress(tablePtr, address) \
|
||||
(Tcl_FindHashEntry((tablePtr), (void *) (address)) != NULL)
|
||||
#define AddrLength(address) \
|
||||
(tclInstructionTable[*(unsigned char *)(address)].numBytes)
|
||||
#define InstLength(instruction) \
|
||||
(tclInstructionTable[(unsigned char)(instruction)].numBytes)
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* LocateTargetAddresses --
|
||||
*
|
||||
* Populate a hash table with places that we need to be careful around
|
||||
* because they're the targets of various kinds of jumps and other
|
||||
* non-local behavior.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
LocateTargetAddresses(
|
||||
CompileEnv *envPtr,
|
||||
Tcl_HashTable *tablePtr)
|
||||
{
|
||||
unsigned char *currentInstPtr, *targetInstPtr;
|
||||
int isNew, i;
|
||||
Tcl_HashEntry *hPtr;
|
||||
Tcl_HashSearch hSearch;
|
||||
|
||||
Tcl_InitHashTable(tablePtr, TCL_ONE_WORD_KEYS);
|
||||
|
||||
/*
|
||||
* The starts of commands represent target addresses.
|
||||
*/
|
||||
|
||||
for (i=0 ; i<envPtr->numCommands ; i++) {
|
||||
DefineTargetAddress(tablePtr,
|
||||
envPtr->codeStart + envPtr->cmdMapPtr[i].codeOffset);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find places where we should be careful about replacing instructions
|
||||
* because they are the targets of various types of jumps.
|
||||
*/
|
||||
|
||||
for (currentInstPtr = envPtr->codeStart ;
|
||||
currentInstPtr < envPtr->codeNext ;
|
||||
currentInstPtr += AddrLength(currentInstPtr)) {
|
||||
switch (*currentInstPtr) {
|
||||
case INST_JUMP1:
|
||||
case INST_JUMP_TRUE1:
|
||||
case INST_JUMP_FALSE1:
|
||||
targetInstPtr = currentInstPtr+TclGetInt1AtPtr(currentInstPtr+1);
|
||||
goto storeTarget;
|
||||
case INST_JUMP4:
|
||||
case INST_JUMP_TRUE4:
|
||||
case INST_JUMP_FALSE4:
|
||||
case INST_START_CMD:
|
||||
targetInstPtr = currentInstPtr+TclGetInt4AtPtr(currentInstPtr+1);
|
||||
goto storeTarget;
|
||||
case INST_BEGIN_CATCH4:
|
||||
targetInstPtr = envPtr->codeStart + envPtr->exceptArrayPtr[
|
||||
TclGetUInt4AtPtr(currentInstPtr+1)].codeOffset;
|
||||
storeTarget:
|
||||
DefineTargetAddress(tablePtr, targetInstPtr);
|
||||
break;
|
||||
case INST_JUMP_TABLE:
|
||||
hPtr = Tcl_FirstHashEntry(
|
||||
&JUMPTABLEINFO(envPtr, currentInstPtr+1)->hashTable,
|
||||
&hSearch);
|
||||
for (; hPtr ; hPtr = Tcl_NextHashEntry(&hSearch)) {
|
||||
targetInstPtr = currentInstPtr +
|
||||
PTR2INT(Tcl_GetHashValue(hPtr));
|
||||
DefineTargetAddress(tablePtr, targetInstPtr);
|
||||
}
|
||||
break;
|
||||
case INST_RETURN_CODE_BRANCH:
|
||||
for (i=TCL_ERROR ; i<TCL_CONTINUE+1 ; i++) {
|
||||
DefineTargetAddress(tablePtr, currentInstPtr + 2*i - 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a marker *after* the last bytecode instruction. WARNING: points to
|
||||
* one past the end!
|
||||
*/
|
||||
|
||||
DefineTargetAddress(tablePtr, currentInstPtr);
|
||||
|
||||
/*
|
||||
* Enter in the targets of exception ranges.
|
||||
*/
|
||||
|
||||
for (i=0 ; i<envPtr->exceptArrayNext ; i++) {
|
||||
ExceptionRange *rangePtr = &envPtr->exceptArrayPtr[i];
|
||||
|
||||
if (rangePtr->type == CATCH_EXCEPTION_RANGE) {
|
||||
targetInstPtr = envPtr->codeStart + rangePtr->catchOffset;
|
||||
DefineTargetAddress(tablePtr, targetInstPtr);
|
||||
} else {
|
||||
targetInstPtr = envPtr->codeStart + rangePtr->breakOffset;
|
||||
DefineTargetAddress(tablePtr, targetInstPtr);
|
||||
if (rangePtr->continueOffset >= 0) {
|
||||
targetInstPtr = envPtr->codeStart + rangePtr->continueOffset;
|
||||
DefineTargetAddress(tablePtr, targetInstPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TrimUnreachable --
|
||||
*
|
||||
* Converts code that provably can't be executed into NOPs and reduces
|
||||
* the overall reported length of the bytecode where that is possible.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
TrimUnreachable(
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
unsigned char *currentInstPtr;
|
||||
Tcl_HashTable targets;
|
||||
|
||||
LocateTargetAddresses(envPtr, &targets);
|
||||
|
||||
for (currentInstPtr = envPtr->codeStart ;
|
||||
currentInstPtr < envPtr->codeNext-1 ;
|
||||
currentInstPtr += AddrLength(currentInstPtr)) {
|
||||
int clear = 0;
|
||||
|
||||
if (*currentInstPtr != INST_DONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
while (!IsTargetAddress(&targets, currentInstPtr + 1 + clear)) {
|
||||
clear += AddrLength(currentInstPtr + 1 + clear);
|
||||
}
|
||||
if (currentInstPtr + 1 + clear == envPtr->codeNext) {
|
||||
envPtr->codeNext -= clear;
|
||||
} else {
|
||||
while (clear --> 0) {
|
||||
*(currentInstPtr + 1 + clear) = INST_NOP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Tcl_DeleteHashTable(&targets);
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* ConvertZeroEffectToNOP --
|
||||
*
|
||||
* Replace PUSH/POP sequences (when non-hazardous) with NOPs. Also
|
||||
* replace PUSH empty/CONCAT and TRY_CVT_NUMERIC (when followed by an
|
||||
* operation that guarantees the check for arithmeticity) and eliminate
|
||||
* LNOT when we can invert the following JUMP condition.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
ConvertZeroEffectToNOP(
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
unsigned char *currentInstPtr;
|
||||
int size;
|
||||
Tcl_HashTable targets;
|
||||
|
||||
LocateTargetAddresses(envPtr, &targets);
|
||||
for (currentInstPtr = envPtr->codeStart ;
|
||||
currentInstPtr < envPtr->codeNext ; currentInstPtr += size) {
|
||||
int blank = 0, i, nextInst;
|
||||
|
||||
size = AddrLength(currentInstPtr);
|
||||
while ((currentInstPtr + size < envPtr->codeNext)
|
||||
&& *(currentInstPtr+size) == INST_NOP) {
|
||||
if (IsTargetAddress(&targets, currentInstPtr + size)) {
|
||||
break;
|
||||
}
|
||||
size += InstLength(INST_NOP);
|
||||
}
|
||||
if (IsTargetAddress(&targets, currentInstPtr + size)) {
|
||||
continue;
|
||||
}
|
||||
nextInst = *(currentInstPtr + size);
|
||||
switch (*currentInstPtr) {
|
||||
case INST_PUSH1:
|
||||
if (nextInst == INST_POP) {
|
||||
blank = size + InstLength(nextInst);
|
||||
} else if (nextInst == INST_CONCAT1
|
||||
&& TclGetUInt1AtPtr(currentInstPtr + size + 1) == 2) {
|
||||
Tcl_Obj *litPtr = TclFetchLiteral(envPtr,
|
||||
TclGetUInt1AtPtr(currentInstPtr + 1));
|
||||
int numBytes;
|
||||
|
||||
(void) Tcl_GetStringFromObj(litPtr, &numBytes);
|
||||
if (numBytes == 0) {
|
||||
blank = size + InstLength(nextInst);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INST_PUSH4:
|
||||
if (nextInst == INST_POP) {
|
||||
blank = size + 1;
|
||||
} else if (nextInst == INST_CONCAT1
|
||||
&& TclGetUInt1AtPtr(currentInstPtr + size + 1) == 2) {
|
||||
Tcl_Obj *litPtr = TclFetchLiteral(envPtr,
|
||||
TclGetUInt4AtPtr(currentInstPtr + 1));
|
||||
int numBytes;
|
||||
|
||||
(void) Tcl_GetStringFromObj(litPtr, &numBytes);
|
||||
if (numBytes == 0) {
|
||||
blank = size + InstLength(nextInst);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case INST_LNOT:
|
||||
switch (nextInst) {
|
||||
case INST_JUMP_TRUE1:
|
||||
blank = size;
|
||||
*(currentInstPtr + size) = INST_JUMP_FALSE1;
|
||||
break;
|
||||
case INST_JUMP_FALSE1:
|
||||
blank = size;
|
||||
*(currentInstPtr + size) = INST_JUMP_TRUE1;
|
||||
break;
|
||||
case INST_JUMP_TRUE4:
|
||||
blank = size;
|
||||
*(currentInstPtr + size) = INST_JUMP_FALSE4;
|
||||
break;
|
||||
case INST_JUMP_FALSE4:
|
||||
blank = size;
|
||||
*(currentInstPtr + size) = INST_JUMP_TRUE4;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case INST_TRY_CVT_TO_NUMERIC:
|
||||
switch (nextInst) {
|
||||
case INST_JUMP_TRUE1:
|
||||
case INST_JUMP_TRUE4:
|
||||
case INST_JUMP_FALSE1:
|
||||
case INST_JUMP_FALSE4:
|
||||
case INST_INCR_SCALAR1:
|
||||
case INST_INCR_ARRAY1:
|
||||
case INST_INCR_ARRAY_STK:
|
||||
case INST_INCR_SCALAR_STK:
|
||||
case INST_INCR_STK:
|
||||
case INST_LOR:
|
||||
case INST_LAND:
|
||||
case INST_EQ:
|
||||
case INST_NEQ:
|
||||
case INST_LT:
|
||||
case INST_LE:
|
||||
case INST_GT:
|
||||
case INST_GE:
|
||||
case INST_MOD:
|
||||
case INST_LSHIFT:
|
||||
case INST_RSHIFT:
|
||||
case INST_BITOR:
|
||||
case INST_BITXOR:
|
||||
case INST_BITAND:
|
||||
case INST_EXPON:
|
||||
case INST_ADD:
|
||||
case INST_SUB:
|
||||
case INST_DIV:
|
||||
case INST_MULT:
|
||||
case INST_LNOT:
|
||||
case INST_BITNOT:
|
||||
case INST_UMINUS:
|
||||
case INST_UPLUS:
|
||||
case INST_TRY_CVT_TO_NUMERIC:
|
||||
blank = size;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (blank > 0) {
|
||||
for (i=0 ; i<blank ; i++) {
|
||||
*(currentInstPtr + i) = INST_NOP;
|
||||
}
|
||||
size = blank;
|
||||
}
|
||||
}
|
||||
Tcl_DeleteHashTable(&targets);
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* AdvanceJumps --
|
||||
*
|
||||
* Advance jumps past NOPs and chained JUMPs. After this runs, the only
|
||||
* JUMPs that jump to a NOP or a JUMP will be length-1 ones that run out
|
||||
* of room in their opcode to be targeted to where they really belong.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
AdvanceJumps(
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
unsigned char *currentInstPtr;
|
||||
|
||||
for (currentInstPtr = envPtr->codeStart ;
|
||||
currentInstPtr < envPtr->codeNext-1 ;
|
||||
currentInstPtr += AddrLength(currentInstPtr)) {
|
||||
int offset, delta;
|
||||
|
||||
switch (*currentInstPtr) {
|
||||
case INST_JUMP1:
|
||||
case INST_JUMP_TRUE1:
|
||||
case INST_JUMP_FALSE1:
|
||||
offset = TclGetInt1AtPtr(currentInstPtr + 1);
|
||||
for (delta=0 ; offset+delta != 0 ;) {
|
||||
if (offset + delta < -128 || offset + delta > 127) {
|
||||
break;
|
||||
}
|
||||
offset += delta;
|
||||
switch (*(currentInstPtr + offset)) {
|
||||
case INST_NOP:
|
||||
delta = InstLength(INST_NOP);
|
||||
continue;
|
||||
case INST_JUMP1:
|
||||
delta = TclGetInt1AtPtr(currentInstPtr + offset + 1);
|
||||
continue;
|
||||
case INST_JUMP4:
|
||||
delta = TclGetInt4AtPtr(currentInstPtr + offset + 1);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
TclStoreInt1AtPtr(offset, currentInstPtr + 1);
|
||||
continue;
|
||||
|
||||
case INST_JUMP4:
|
||||
case INST_JUMP_TRUE4:
|
||||
case INST_JUMP_FALSE4:
|
||||
for (offset = TclGetInt4AtPtr(currentInstPtr + 1); offset!=0 ;) {
|
||||
switch (*(currentInstPtr + offset)) {
|
||||
case INST_NOP:
|
||||
offset += InstLength(INST_NOP);
|
||||
continue;
|
||||
case INST_JUMP1:
|
||||
offset += TclGetInt1AtPtr(currentInstPtr + offset + 1);
|
||||
continue;
|
||||
case INST_JUMP4:
|
||||
offset += TclGetInt4AtPtr(currentInstPtr + offset + 1);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
TclStoreInt4AtPtr(offset, currentInstPtr + 1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TclOptimizeBytecode --
|
||||
*
|
||||
* A very simple peephole optimizer for bytecode.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
TclOptimizeBytecode(
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
ConvertZeroEffectToNOP(envPtr);
|
||||
AdvanceJumps(envPtr);
|
||||
TrimUnreachable(envPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 78
|
||||
* tab-width: 8
|
||||
* End:
|
||||
*/
|
||||
@@ -52,6 +52,10 @@ Tcl_SetPanicProc(
|
||||
#if defined(_WIN32)
|
||||
/* tclWinDebugPanic only installs if there is no panicProc yet. */
|
||||
if ((proc != tclWinDebugPanic) || (panicProc == NULL))
|
||||
#elif defined(__CYGWIN__)
|
||||
if (proc == NULL)
|
||||
panicProc = tclWinDebugPanic;
|
||||
else
|
||||
#endif
|
||||
panicProc = proc;
|
||||
}
|
||||
|
||||
+7
-8
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclParse.h"
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* The following table provides parsing information about each possible 8-bit
|
||||
@@ -1567,6 +1568,7 @@ Tcl_ParseVar(
|
||||
|
||||
code = TclSubstTokens(interp, parsePtr->tokenPtr, parsePtr->numTokens,
|
||||
NULL, 1, NULL, NULL);
|
||||
Tcl_FreeParse(parsePtr);
|
||||
TclStackFree(interp, parsePtr);
|
||||
if (code != TCL_OK) {
|
||||
return NULL;
|
||||
@@ -1577,16 +1579,13 @@ Tcl_ParseVar(
|
||||
* At this point we should have an object containing the value of a
|
||||
* variable. Just return the string from that object.
|
||||
*
|
||||
* This should have returned the object for the user to manage, but
|
||||
* instead we have some weak reference to the string value in the object,
|
||||
* which is why we make sure the object exists after resetting the result.
|
||||
* This isn't ideal, but it's the best we can do with the current
|
||||
* documented interface. -- hobbs
|
||||
* Since TclSubstTokens above returned TCL_OK, we know that objPtr
|
||||
* is shared. It is in both the interp result and the value of the
|
||||
* variable. Returning the string relies on that to be true.
|
||||
*/
|
||||
|
||||
if (!Tcl_IsShared(objPtr)) {
|
||||
Tcl_IncrRefCount(objPtr);
|
||||
}
|
||||
assert( Tcl_IsShared(objPtr) );
|
||||
|
||||
Tcl_ResetResult(interp);
|
||||
return TclGetString(objPtr);
|
||||
}
|
||||
|
||||
+4
-4
@@ -271,8 +271,8 @@ Tcl_ProcObjCmd(
|
||||
cfPtr->data.eval.path = contextPtr->data.eval.path;
|
||||
Tcl_IncrRefCount(cfPtr->data.eval.path);
|
||||
|
||||
cfPtr->cmd.str.cmd = NULL;
|
||||
cfPtr->cmd.str.len = 0;
|
||||
cfPtr->cmd = NULL;
|
||||
cfPtr->len = 0;
|
||||
|
||||
hePtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr,
|
||||
procPtr, &isNew);
|
||||
@@ -2595,8 +2595,8 @@ SetLambdaFromAny(
|
||||
cfPtr->data.eval.path = contextPtr->data.eval.path;
|
||||
Tcl_IncrRefCount(cfPtr->data.eval.path);
|
||||
|
||||
cfPtr->cmd.str.cmd = NULL;
|
||||
cfPtr->cmd.str.len = 0;
|
||||
cfPtr->cmd = NULL;
|
||||
cfPtr->len = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1112,6 +1112,7 @@ Tcl_SetObjErrorCode(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#undef Tcl_GetErrorLine
|
||||
int
|
||||
Tcl_GetErrorLine(
|
||||
Tcl_Interp *interp)
|
||||
@@ -1129,6 +1130,7 @@ Tcl_GetErrorLine(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#undef Tcl_SetErrorLine
|
||||
void
|
||||
Tcl_SetErrorLine(
|
||||
Tcl_Interp *interp,
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#undef TclSockMinimumBuffers
|
||||
#define TclBackgroundException Tcl_BackgroundException
|
||||
#undef Tcl_SetIntObj
|
||||
#undef TclpInetNtoa
|
||||
|
||||
/* See bug 510001: TclSockMinimumBuffers needs plat imp */
|
||||
#ifdef _WIN64
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* tclStubLibTbl.c --
|
||||
*
|
||||
* Stub object that will be statically linked into extensions that want
|
||||
* to access Tcl.
|
||||
*
|
||||
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
* Copyright (c) 1998 Paul Duffin.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclInitStubTable --
|
||||
*
|
||||
* Initialize the stub table, using the structure pointed at
|
||||
* by the "version" argument.
|
||||
*
|
||||
* Results:
|
||||
* Outputs the value of the "version" argument.
|
||||
*
|
||||
* Side effects:
|
||||
* Sets the stub table pointers.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
MODULE_SCOPE const char *
|
||||
TclInitStubTable(
|
||||
const char *version) /* points to the version field of a
|
||||
TclStubInfoType structure variable. */
|
||||
{
|
||||
tclStubsPtr = ((const TclStubInfoType *) version)->stubs;
|
||||
|
||||
if (tclStubsPtr->hooks) {
|
||||
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
|
||||
tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
|
||||
tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
|
||||
} else {
|
||||
tclPlatStubsPtr = NULL;
|
||||
tclIntStubsPtr = NULL;
|
||||
tclIntPlatStubsPtr = NULL;
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 78
|
||||
* End:
|
||||
*/
|
||||
+24
-6
@@ -1555,14 +1555,14 @@ DelCallbackProc(
|
||||
*
|
||||
* TestdelCmd --
|
||||
*
|
||||
* This procedure implements the "testdcall" command. It is used
|
||||
* to test Tcl_CallWhenDeleted.
|
||||
* This procedure implements the "testdel" command. It is used
|
||||
* to test calling of command deletion callbacks.
|
||||
*
|
||||
* Results:
|
||||
* A standard Tcl result.
|
||||
*
|
||||
* Side effects:
|
||||
* Creates and deletes interpreters.
|
||||
* Creates a command.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1856,7 +1856,7 @@ TestdstringCmd(
|
||||
if (Tcl_GetInt(interp, argv[2], &count) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_DStringTrunc(&dstring, count);
|
||||
Tcl_DStringSetLength(&dstring, count);
|
||||
} else if (strcmp(argv[1], "start") == 0) {
|
||||
if (argc != 2) {
|
||||
goto wrongNumArgs;
|
||||
@@ -4408,8 +4408,26 @@ TestseterrorcodeCmd(
|
||||
Tcl_SetResult(interp, "too many args", TCL_STATIC);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4],
|
||||
argv[5], NULL);
|
||||
switch (argc) {
|
||||
case 1:
|
||||
Tcl_SetErrorCode(interp, "NONE", NULL);
|
||||
break;
|
||||
case 2:
|
||||
Tcl_SetErrorCode(interp, argv[1], NULL);
|
||||
break;
|
||||
case 3:
|
||||
Tcl_SetErrorCode(interp, argv[1], argv[2], NULL);
|
||||
break;
|
||||
case 4:
|
||||
Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], NULL);
|
||||
break;
|
||||
case 5:
|
||||
Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], NULL);
|
||||
break;
|
||||
case 6:
|
||||
Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4],
|
||||
argv[5], NULL);
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ ThreadObjCmd(
|
||||
*/
|
||||
|
||||
if (objc == 2) {
|
||||
idObj = Tcl_NewLongObj((long)(size_t)Tcl_GetCurrentThread());
|
||||
idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)Tcl_GetCurrentThread());
|
||||
} else if (objc == 3
|
||||
&& strcmp("-main", Tcl_GetString(objv[2])) == 0) {
|
||||
Tcl_MutexLock(&threadMutex);
|
||||
@@ -355,14 +355,14 @@ ThreadObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
case THREAD_JOIN: {
|
||||
long id;
|
||||
Tcl_WideInt id;
|
||||
int result, status;
|
||||
|
||||
if (objc != 3) {
|
||||
Tcl_WrongNumArgs(interp, 2, objv, "id");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (Tcl_GetLongFromObj(interp, objv[2], &id) != TCL_OK) {
|
||||
if (Tcl_GetWideIntFromObj(interp, objv[2], &id) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ ThreadObjCmd(
|
||||
} else {
|
||||
char buf[20];
|
||||
|
||||
TclFormatInt(buf, id);
|
||||
sprintf(buf, "%" TCL_LL_MODIFIER "d", id);
|
||||
Tcl_AppendResult(interp, "cannot join thread ", buf, NULL);
|
||||
}
|
||||
return result;
|
||||
@@ -384,7 +384,7 @@ ThreadObjCmd(
|
||||
}
|
||||
return ThreadList(interp);
|
||||
case THREAD_SEND: {
|
||||
long id;
|
||||
Tcl_WideInt id;
|
||||
const char *script;
|
||||
int wait, arg;
|
||||
|
||||
@@ -403,7 +403,7 @@ ThreadObjCmd(
|
||||
wait = 1;
|
||||
arg = 2;
|
||||
}
|
||||
if (Tcl_GetLongFromObj(interp, objv[arg], &id) != TCL_OK) {
|
||||
if (Tcl_GetWideIntFromObj(interp, objv[arg], &id) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
arg++;
|
||||
@@ -523,7 +523,7 @@ ThreadCreate(
|
||||
Tcl_ConditionWait(&ctrl.condWait, &threadMutex, NULL);
|
||||
Tcl_MutexUnlock(&threadMutex);
|
||||
Tcl_ConditionFinalize(&ctrl.condWait);
|
||||
Tcl_SetObjResult(interp, Tcl_NewLongObj((long)(size_t)id));
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)(size_t)id));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -655,7 +655,7 @@ ThreadErrorProc(
|
||||
char *script;
|
||||
char buf[TCL_DOUBLE_SPACE+1];
|
||||
|
||||
TclFormatInt(buf, (size_t) Tcl_GetCurrentThread());
|
||||
sprintf(buf, "%" TCL_LL_MODIFIER "d", (Tcl_WideInt)(size_t)Tcl_GetCurrentThread());
|
||||
|
||||
errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
|
||||
if (errorProcString == NULL) {
|
||||
@@ -773,7 +773,7 @@ ThreadList(
|
||||
Tcl_MutexLock(&threadMutex);
|
||||
for (tsdPtr = threadList ; tsdPtr ; tsdPtr = tsdPtr->nextPtr) {
|
||||
Tcl_ListObjAppendElement(interp, listPtr,
|
||||
Tcl_NewLongObj((long)(size_t)tsdPtr->threadId));
|
||||
Tcl_NewWideIntObj((Tcl_WideInt)(size_t)tsdPtr->threadId));
|
||||
}
|
||||
Tcl_MutexUnlock(&threadMutex);
|
||||
Tcl_SetObjResult(interp, listPtr);
|
||||
|
||||
+42
-2
@@ -1102,6 +1102,46 @@ Tcl_UtfNcasecmp(
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_UtfNcasecmp --
|
||||
*
|
||||
* Compare UTF chars of string cs to string ct case insensitively.
|
||||
* Replacement for strcasecmp in Tcl core, in places where UTF-8 should
|
||||
* be handled.
|
||||
*
|
||||
* Results:
|
||||
* Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclUtfCasecmp(
|
||||
const char *cs, /* UTF string to compare to ct. */
|
||||
const char *ct) /* UTF string cs is compared to. */
|
||||
{
|
||||
while (*cs && *ct) {
|
||||
Tcl_UniChar ch1, ch2;
|
||||
|
||||
cs += TclUtfToUniChar(cs, &ch1);
|
||||
ct += TclUtfToUniChar(ct, &ch2);
|
||||
if (ch1 != ch2) {
|
||||
ch1 = Tcl_UniCharToLower(ch1);
|
||||
ch2 = Tcl_UniCharToLower(ch2);
|
||||
if (ch1 != ch2) {
|
||||
return ch1 - ch2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return UCHAR(*cs) - UCHAR(*ct);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -1515,10 +1555,10 @@ Tcl_UniCharIsSpace(
|
||||
*/
|
||||
|
||||
if (((Tcl_UniChar) ch) < ((Tcl_UniChar) 0x80)) {
|
||||
return isspace(UCHAR(ch)); /* INTL: ISO space */
|
||||
return TclIsSpaceProc((char) ch);
|
||||
} else if ((Tcl_UniChar) ch == 0x0085 || (Tcl_UniChar) ch == 0x180e
|
||||
|| (Tcl_UniChar) ch == 0x200b || (Tcl_UniChar) ch == 0x2060
|
||||
|| (Tcl_UniChar) ch == 0xfeff) {
|
||||
|| (Tcl_UniChar) ch == 0x202f || (Tcl_UniChar) ch == 0xfeff) {
|
||||
return 1;
|
||||
} else {
|
||||
return ((SPACE_BITS >> GetCategory(ch)) & 1);
|
||||
|
||||
+1
-2
@@ -3580,10 +3580,9 @@ UpdateStringOfEndOffset(
|
||||
register Tcl_Obj *objPtr)
|
||||
{
|
||||
char buffer[TCL_INTEGER_SPACE + 5];
|
||||
register int len;
|
||||
register int len = 3;
|
||||
|
||||
memcpy(buffer, "end", 4);
|
||||
len = sizeof("end") - 1;
|
||||
if (objPtr->internalRep.longValue != 0) {
|
||||
buffer[len++] = '-';
|
||||
len += TclFormatInt(buffer+len, -(objPtr->internalRep.longValue));
|
||||
|
||||
+48
-17
@@ -513,6 +513,32 @@ proc auto_mkindex_parser::fullname {name} {
|
||||
return [string map [list \0 \$] $name]
|
||||
}
|
||||
|
||||
# auto_mkindex_parser::indexEntry --
|
||||
#
|
||||
# Used by commands like "proc" within the auto_mkindex parser to add a
|
||||
# correctly-quoted entry to the index. This is shared code so it is done
|
||||
# *right*, in one place.
|
||||
#
|
||||
# Arguments:
|
||||
# name - Name that is being added to index.
|
||||
|
||||
proc auto_mkindex_parser::indexEntry {name} {
|
||||
variable index
|
||||
variable scriptFile
|
||||
|
||||
# We convert all metacharacters to their backslashed form, and pre-split
|
||||
# the file name that we know about (which will be a proper list, and so
|
||||
# correctly quoted).
|
||||
|
||||
set name [string range [list \}[fullname $name]] 2 end]
|
||||
set filenameParts [file split $scriptFile]
|
||||
|
||||
append index [format \
|
||||
{set auto_index(%s) [list source [file join $dir %s]]%s} \
|
||||
$name $filenameParts \n]
|
||||
return
|
||||
}
|
||||
|
||||
if {[llength $::auto_mkindex_parser::initCommands]} {
|
||||
return
|
||||
}
|
||||
@@ -524,15 +550,7 @@ if {[llength $::auto_mkindex_parser::initCommands]} {
|
||||
# Adds an entry to the auto index list for the given procedure name.
|
||||
|
||||
auto_mkindex_parser::command proc {name args} {
|
||||
variable index
|
||||
variable scriptFile
|
||||
# Do some fancy reformatting on the "source" call to handle platform
|
||||
# differences with respect to pathnames. Use format just so that the
|
||||
# command is a little easier to read (otherwise it'd be full of
|
||||
# backslashed dollar signs, etc.
|
||||
append index [list set auto_index([fullname $name])] \
|
||||
[format { [list source [file join $dir %s]]} \
|
||||
[file split $scriptFile]] "\n"
|
||||
indexEntry $name
|
||||
}
|
||||
|
||||
# Conditionally add support for Tcl byte code files. There are some tricky
|
||||
@@ -559,14 +577,7 @@ auto_mkindex_parser::hook {
|
||||
# procedure name.
|
||||
|
||||
auto_mkindex_parser::commandInit tbcload::bcproc {name args} {
|
||||
variable index
|
||||
variable scriptFile
|
||||
# Do some nice reformatting of the "source" call, to get around
|
||||
# path differences on different platforms. We use the format
|
||||
# command just so that the code is a little easier to read.
|
||||
append index [list set auto_index([fullname $name])] \
|
||||
[format { [list source [file join $dir %s]]} \
|
||||
[file split $scriptFile]] "\n"
|
||||
indexEntry $name
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -610,6 +621,13 @@ auto_mkindex_parser::command namespace {op args} {
|
||||
variable contextStack
|
||||
if {[lindex $args 0] eq "create"} {
|
||||
set name ::[join [lreverse $contextStack] ::]
|
||||
catch {
|
||||
set name [dict get [lrange $args 1 end] -command]
|
||||
if {![string match ::* $name]} {
|
||||
set name ::[join [lreverse $contextStack] ::]$name
|
||||
}
|
||||
regsub -all ::+ $name :: name
|
||||
}
|
||||
# create artifical proc to force an entry in the tclIndex
|
||||
$parser eval [list ::proc $name {} {}]
|
||||
}
|
||||
@@ -617,4 +635,17 @@ auto_mkindex_parser::command namespace {op args} {
|
||||
}
|
||||
}
|
||||
|
||||
# AUTO MKINDEX: oo::class create name ?definition?
|
||||
# Adds an entry to the auto index list for the given class name.
|
||||
auto_mkindex_parser::command oo::class {op name {body ""}} {
|
||||
if {$op eq "create"} {
|
||||
indexEntry $name
|
||||
}
|
||||
}
|
||||
auto_mkindex_parser::command class {op name {body ""}} {
|
||||
if {$op eq "create"} {
|
||||
indexEntry $name
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
+2
-2
@@ -324,7 +324,7 @@ proc ::tcl::clock::Initialize {} {
|
||||
{-10800 0 3600 0 2 0 2 2 0 0 0 0 10 0 3 2 0 0 0} :America/Sao_Paulo
|
||||
{-10800 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Godthab
|
||||
{-10800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :America/Buenos_Aires
|
||||
{-10800 0 3600 0 2 0 5 2 0 0 0 0 11 0 1 2 0 0 0} :America/Brasilia
|
||||
{-10800 0 3600 0 2 0 5 2 0 0 0 0 11 0 1 2 0 0 0} :America/Bahia
|
||||
{-10800 0 3600 0 3 0 2 2 0 0 0 0 10 0 1 2 0 0 0} :America/Montevideo
|
||||
{-7200 0 3600 0 9 0 5 2 0 0 0 0 3 0 5 2 0 0 0} :America/Noronha
|
||||
{-3600 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Atlantic/Azores
|
||||
@@ -3861,7 +3861,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } {
|
||||
|
||||
# Put DST in effect in all years from 1916 to 2099.
|
||||
|
||||
for { set y 1916 } { $y < 2099 } { incr y } {
|
||||
for { set y 1916 } { $y < 2100 } { incr y } {
|
||||
set startTime [DeterminePosixDSTTime $z start $y]
|
||||
incr startTime [expr { - wide($stdOffset) }]
|
||||
set endTime [DeterminePosixDSTTime $z end $y]
|
||||
|
||||
+7
-4
@@ -16,7 +16,7 @@
|
||||
if {[info commands package] == ""} {
|
||||
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
|
||||
}
|
||||
package require -exact Tcl 8.6.0
|
||||
package require -exact Tcl 8.6.1
|
||||
|
||||
# Compute the auto path to use in this interpreter.
|
||||
# The values on the path come from several locations:
|
||||
@@ -250,7 +250,8 @@ proc unknown args {
|
||||
# Make sure we're not trying to load the same proc twice.
|
||||
#
|
||||
if {[info exists UnknownPending($name)]} {
|
||||
return -code error "self-referential recursion\
|
||||
return -code error -errorcode [list TCL LOOKUP COMMAND $name] \
|
||||
"self-referential recursion\
|
||||
in \"unknown\" for command \"$name\""
|
||||
}
|
||||
set UnknownPending($name) pending
|
||||
@@ -399,10 +400,12 @@ proc unknown args {
|
||||
return -options $::tcl::UnknownOptions $::tcl::UnknownResult
|
||||
}
|
||||
if {[llength $cmds]} {
|
||||
return -code error "ambiguous command name \"$name\": [lsort $cmds]"
|
||||
return -code error -errorcode [list TCL LOOKUP COMMAND $name] \
|
||||
"ambiguous command name \"$name\": [lsort $cmds]"
|
||||
}
|
||||
}
|
||||
return -code error "invalid command name \"$name\""
|
||||
return -code error -errorcode [list TCL LOOKUP COMMAND $name] \
|
||||
"invalid command name \"$name\""
|
||||
}
|
||||
|
||||
# auto_load --
|
||||
|
||||
+22
-17
@@ -13,7 +13,7 @@
|
||||
package require Tcl 8.5
|
||||
# When the version number changes, be sure to update the pkgIndex.tcl file,
|
||||
# and the installation directory in the Makefiles.
|
||||
package provide msgcat 1.5.1
|
||||
package provide msgcat 1.5.2
|
||||
|
||||
namespace eval msgcat {
|
||||
namespace export mc mcload mclocale mcmax mcmset mcpreferences mcset \
|
||||
@@ -541,8 +541,11 @@ proc msgcat::Init {} {
|
||||
# settings, or fall back on locale of "C".
|
||||
#
|
||||
|
||||
# First check registry value LocalName present from Windows Vista
|
||||
# which contains the local string as RFC5646, composed of:
|
||||
# On Vista and later:
|
||||
# HCU/Control Panel/Desktop : PreferredUILanguages is for language packs,
|
||||
# HCU/Control Pannel/International : localName is the default locale.
|
||||
#
|
||||
# They contain the local string as RFC5646, composed of:
|
||||
# [a-z]{2,3} : language
|
||||
# -[a-z]{4} : script (optional, translated by table Latn->latin)
|
||||
# -[a-z]{2}|[0-9]{3} : territory (optional, numerical region codes not used)
|
||||
@@ -550,23 +553,25 @@ proc msgcat::Init {} {
|
||||
# Those are translated to local strings.
|
||||
# Examples: de-CH -> de_ch, sr-Latn-CS -> sr_cs@latin, es-419 -> es
|
||||
#
|
||||
set key {HKEY_CURRENT_USER\Control Panel\International}
|
||||
if {![catch {registry get $key LocaleName} localeName]
|
||||
&& [regexp {^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}))?(?:-.+)?$}\
|
||||
[string tolower $localeName] match locale script territory]} {
|
||||
if {"" ne $territory} {
|
||||
append locale _ $territory
|
||||
}
|
||||
set modifierDict [dict create latn latin cyrl cyrillic]
|
||||
if {[dict exists $modifierDict $script]} {
|
||||
append locale @ [dict get $modifierDict $script]
|
||||
}
|
||||
if {![catch {mclocale [ConvertLocale $locale]}]} {
|
||||
return
|
||||
foreach key {{HKEY_CURRENT_USER\Control Panel\Desktop} {HKEY_CURRENT_USER\Control Panel\International}}\
|
||||
value {PreferredUILanguages localeName} {
|
||||
if {![catch {registry get $key $value} localeName]
|
||||
&& [regexp {^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}))?(?:-.+)?$}\
|
||||
[string tolower $localeName] match locale script territory]} {
|
||||
if {"" ne $territory} {
|
||||
append locale _ $territory
|
||||
}
|
||||
set modifierDict [dict create latn latin cyrl cyrillic]
|
||||
if {[dict exists $modifierDict $script]} {
|
||||
append locale @ [dict get $modifierDict $script]
|
||||
}
|
||||
if {![catch {mclocale [ConvertLocale $locale]}]} {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# then check key locale which contains a numerical language ID
|
||||
# then check value locale which contains a numerical language ID
|
||||
if {[catch {
|
||||
set locale [registry get $key "locale"]
|
||||
}]} {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
|
||||
package ifneeded msgcat 1.5.1 [list source [file join $dir msgcat.tcl]]
|
||||
package ifneeded msgcat 1.5.2 [list source [file join $dir msgcat.tcl]]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package ifneeded platform 1.0.11 [list source [file join $dir platform.tcl]]
|
||||
package ifneeded platform 1.0.12 [list source [file join $dir platform.tcl]]
|
||||
package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]]
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
# full path name of this file's directory.
|
||||
|
||||
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
|
||||
package ifneeded tcltest 2.3.5 [list source [file join $dir tcltest.tcl]]
|
||||
package ifneeded tcltest 2.3.6 [list source [file join $dir tcltest.tcl]]
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace eval tcltest {
|
||||
# When the version number changes, be sure to update the pkgIndex.tcl file,
|
||||
# and the install directory in the Makefiles. When the minor version
|
||||
# changes (new feature) be sure to update the man page as well.
|
||||
variable Version 2.3.5
|
||||
variable Version 2.3.6
|
||||
|
||||
# Compatibility support for dumb variables defined in tcltest 1
|
||||
# Do not use these. Call [package provide Tcl] and [info patchlevel]
|
||||
|
||||
@@ -238,6 +238,15 @@ proc ::tcl::tm::UnknownHandler {original name args} {
|
||||
continue
|
||||
}
|
||||
|
||||
if {[package ifneeded $pkgname $pkgversion] ne {}} {
|
||||
# There's already a provide script registered for
|
||||
# this version of this package. Since all units of
|
||||
# code claiming to be the same version of the same
|
||||
# package ought to be identical, just stick with
|
||||
# the one we already have.
|
||||
continue
|
||||
}
|
||||
|
||||
# We have found a candidate, generate a "provide script"
|
||||
# for it, and remember it. Note that we are using ::list
|
||||
# to do this; locally [list] means something else without
|
||||
|
||||
@@ -34,8 +34,8 @@ set TZData(:Africa/Casablanca) {
|
||||
{1345428000 3600 1 WEST}
|
||||
{1348970400 0 0 WET}
|
||||
{1367114400 3600 1 WEST}
|
||||
{1373335200 0 0 WET}
|
||||
{1375927200 3600 1 WEST}
|
||||
{1373162400 0 0 WET}
|
||||
{1376100000 3600 1 WEST}
|
||||
{1380420000 0 0 WET}
|
||||
{1398564000 3600 1 WEST}
|
||||
{1404007200 0 0 WET}
|
||||
|
||||
@@ -83,178 +83,177 @@ set TZData(:America/Asuncion) {
|
||||
{1333854000 -14400 0 PYT}
|
||||
{1349582400 -10800 1 PYST}
|
||||
{1364094000 -14400 0 PYT}
|
||||
{1365912000 -14400 0 PYT}
|
||||
{1381032000 -10800 1 PYST}
|
||||
{1397358000 -14400 0 PYT}
|
||||
{1395543600 -14400 0 PYT}
|
||||
{1412481600 -10800 1 PYST}
|
||||
{1428807600 -14400 0 PYT}
|
||||
{1426993200 -14400 0 PYT}
|
||||
{1443931200 -10800 1 PYST}
|
||||
{1460257200 -14400 0 PYT}
|
||||
{1459047600 -14400 0 PYT}
|
||||
{1475380800 -10800 1 PYST}
|
||||
{1491706800 -14400 0 PYT}
|
||||
{1490497200 -14400 0 PYT}
|
||||
{1506830400 -10800 1 PYST}
|
||||
{1523156400 -14400 0 PYT}
|
||||
{1521946800 -14400 0 PYT}
|
||||
{1538884800 -10800 1 PYST}
|
||||
{1555210800 -14400 0 PYT}
|
||||
{1553396400 -14400 0 PYT}
|
||||
{1570334400 -10800 1 PYST}
|
||||
{1586660400 -14400 0 PYT}
|
||||
{1584846000 -14400 0 PYT}
|
||||
{1601784000 -10800 1 PYST}
|
||||
{1618110000 -14400 0 PYT}
|
||||
{1616900400 -14400 0 PYT}
|
||||
{1633233600 -10800 1 PYST}
|
||||
{1649559600 -14400 0 PYT}
|
||||
{1648350000 -14400 0 PYT}
|
||||
{1664683200 -10800 1 PYST}
|
||||
{1681009200 -14400 0 PYT}
|
||||
{1679799600 -14400 0 PYT}
|
||||
{1696132800 -10800 1 PYST}
|
||||
{1713063600 -14400 0 PYT}
|
||||
{1711249200 -14400 0 PYT}
|
||||
{1728187200 -10800 1 PYST}
|
||||
{1744513200 -14400 0 PYT}
|
||||
{1742698800 -14400 0 PYT}
|
||||
{1759636800 -10800 1 PYST}
|
||||
{1775962800 -14400 0 PYT}
|
||||
{1774148400 -14400 0 PYT}
|
||||
{1791086400 -10800 1 PYST}
|
||||
{1807412400 -14400 0 PYT}
|
||||
{1806202800 -14400 0 PYT}
|
||||
{1822536000 -10800 1 PYST}
|
||||
{1838862000 -14400 0 PYT}
|
||||
{1837652400 -14400 0 PYT}
|
||||
{1853985600 -10800 1 PYST}
|
||||
{1870311600 -14400 0 PYT}
|
||||
{1869102000 -14400 0 PYT}
|
||||
{1886040000 -10800 1 PYST}
|
||||
{1902366000 -14400 0 PYT}
|
||||
{1900551600 -14400 0 PYT}
|
||||
{1917489600 -10800 1 PYST}
|
||||
{1933815600 -14400 0 PYT}
|
||||
{1932001200 -14400 0 PYT}
|
||||
{1948939200 -10800 1 PYST}
|
||||
{1965265200 -14400 0 PYT}
|
||||
{1964055600 -14400 0 PYT}
|
||||
{1980388800 -10800 1 PYST}
|
||||
{1996714800 -14400 0 PYT}
|
||||
{1995505200 -14400 0 PYT}
|
||||
{2011838400 -10800 1 PYST}
|
||||
{2028164400 -14400 0 PYT}
|
||||
{2026954800 -14400 0 PYT}
|
||||
{2043288000 -10800 1 PYST}
|
||||
{2059614000 -14400 0 PYT}
|
||||
{2058404400 -14400 0 PYT}
|
||||
{2075342400 -10800 1 PYST}
|
||||
{2091668400 -14400 0 PYT}
|
||||
{2089854000 -14400 0 PYT}
|
||||
{2106792000 -10800 1 PYST}
|
||||
{2123118000 -14400 0 PYT}
|
||||
{2121303600 -14400 0 PYT}
|
||||
{2138241600 -10800 1 PYST}
|
||||
{2154567600 -14400 0 PYT}
|
||||
{2153358000 -14400 0 PYT}
|
||||
{2169691200 -10800 1 PYST}
|
||||
{2186017200 -14400 0 PYT}
|
||||
{2184807600 -14400 0 PYT}
|
||||
{2201140800 -10800 1 PYST}
|
||||
{2217466800 -14400 0 PYT}
|
||||
{2216257200 -14400 0 PYT}
|
||||
{2233195200 -10800 1 PYST}
|
||||
{2249521200 -14400 0 PYT}
|
||||
{2247706800 -14400 0 PYT}
|
||||
{2264644800 -10800 1 PYST}
|
||||
{2280970800 -14400 0 PYT}
|
||||
{2279156400 -14400 0 PYT}
|
||||
{2296094400 -10800 1 PYST}
|
||||
{2312420400 -14400 0 PYT}
|
||||
{2310606000 -14400 0 PYT}
|
||||
{2327544000 -10800 1 PYST}
|
||||
{2343870000 -14400 0 PYT}
|
||||
{2342660400 -14400 0 PYT}
|
||||
{2358993600 -10800 1 PYST}
|
||||
{2375319600 -14400 0 PYT}
|
||||
{2374110000 -14400 0 PYT}
|
||||
{2390443200 -10800 1 PYST}
|
||||
{2406769200 -14400 0 PYT}
|
||||
{2405559600 -14400 0 PYT}
|
||||
{2422497600 -10800 1 PYST}
|
||||
{2438823600 -14400 0 PYT}
|
||||
{2437009200 -14400 0 PYT}
|
||||
{2453947200 -10800 1 PYST}
|
||||
{2470273200 -14400 0 PYT}
|
||||
{2468458800 -14400 0 PYT}
|
||||
{2485396800 -10800 1 PYST}
|
||||
{2501722800 -14400 0 PYT}
|
||||
{2500513200 -14400 0 PYT}
|
||||
{2516846400 -10800 1 PYST}
|
||||
{2533172400 -14400 0 PYT}
|
||||
{2531962800 -14400 0 PYT}
|
||||
{2548296000 -10800 1 PYST}
|
||||
{2564622000 -14400 0 PYT}
|
||||
{2563412400 -14400 0 PYT}
|
||||
{2579745600 -10800 1 PYST}
|
||||
{2596676400 -14400 0 PYT}
|
||||
{2594862000 -14400 0 PYT}
|
||||
{2611800000 -10800 1 PYST}
|
||||
{2628126000 -14400 0 PYT}
|
||||
{2626311600 -14400 0 PYT}
|
||||
{2643249600 -10800 1 PYST}
|
||||
{2659575600 -14400 0 PYT}
|
||||
{2657761200 -14400 0 PYT}
|
||||
{2674699200 -10800 1 PYST}
|
||||
{2691025200 -14400 0 PYT}
|
||||
{2689815600 -14400 0 PYT}
|
||||
{2706148800 -10800 1 PYST}
|
||||
{2722474800 -14400 0 PYT}
|
||||
{2721265200 -14400 0 PYT}
|
||||
{2737598400 -10800 1 PYST}
|
||||
{2753924400 -14400 0 PYT}
|
||||
{2752714800 -14400 0 PYT}
|
||||
{2769652800 -10800 1 PYST}
|
||||
{2785978800 -14400 0 PYT}
|
||||
{2784164400 -14400 0 PYT}
|
||||
{2801102400 -10800 1 PYST}
|
||||
{2817428400 -14400 0 PYT}
|
||||
{2815614000 -14400 0 PYT}
|
||||
{2832552000 -10800 1 PYST}
|
||||
{2848878000 -14400 0 PYT}
|
||||
{2847668400 -14400 0 PYT}
|
||||
{2864001600 -10800 1 PYST}
|
||||
{2880327600 -14400 0 PYT}
|
||||
{2879118000 -14400 0 PYT}
|
||||
{2895451200 -10800 1 PYST}
|
||||
{2911777200 -14400 0 PYT}
|
||||
{2910567600 -14400 0 PYT}
|
||||
{2926900800 -10800 1 PYST}
|
||||
{2943226800 -14400 0 PYT}
|
||||
{2942017200 -14400 0 PYT}
|
||||
{2958955200 -10800 1 PYST}
|
||||
{2975281200 -14400 0 PYT}
|
||||
{2973466800 -14400 0 PYT}
|
||||
{2990404800 -10800 1 PYST}
|
||||
{3006730800 -14400 0 PYT}
|
||||
{3004916400 -14400 0 PYT}
|
||||
{3021854400 -10800 1 PYST}
|
||||
{3038180400 -14400 0 PYT}
|
||||
{3036970800 -14400 0 PYT}
|
||||
{3053304000 -10800 1 PYST}
|
||||
{3069630000 -14400 0 PYT}
|
||||
{3068420400 -14400 0 PYT}
|
||||
{3084753600 -10800 1 PYST}
|
||||
{3101079600 -14400 0 PYT}
|
||||
{3099870000 -14400 0 PYT}
|
||||
{3116808000 -10800 1 PYST}
|
||||
{3133134000 -14400 0 PYT}
|
||||
{3131319600 -14400 0 PYT}
|
||||
{3148257600 -10800 1 PYST}
|
||||
{3164583600 -14400 0 PYT}
|
||||
{3162769200 -14400 0 PYT}
|
||||
{3179707200 -10800 1 PYST}
|
||||
{3196033200 -14400 0 PYT}
|
||||
{3194218800 -14400 0 PYT}
|
||||
{3211156800 -10800 1 PYST}
|
||||
{3227482800 -14400 0 PYT}
|
||||
{3226273200 -14400 0 PYT}
|
||||
{3242606400 -10800 1 PYST}
|
||||
{3258932400 -14400 0 PYT}
|
||||
{3257722800 -14400 0 PYT}
|
||||
{3274056000 -10800 1 PYST}
|
||||
{3290382000 -14400 0 PYT}
|
||||
{3289172400 -14400 0 PYT}
|
||||
{3306110400 -10800 1 PYST}
|
||||
{3322436400 -14400 0 PYT}
|
||||
{3320622000 -14400 0 PYT}
|
||||
{3337560000 -10800 1 PYST}
|
||||
{3353886000 -14400 0 PYT}
|
||||
{3352071600 -14400 0 PYT}
|
||||
{3369009600 -10800 1 PYST}
|
||||
{3385335600 -14400 0 PYT}
|
||||
{3384126000 -14400 0 PYT}
|
||||
{3400459200 -10800 1 PYST}
|
||||
{3416785200 -14400 0 PYT}
|
||||
{3415575600 -14400 0 PYT}
|
||||
{3431908800 -10800 1 PYST}
|
||||
{3448234800 -14400 0 PYT}
|
||||
{3447025200 -14400 0 PYT}
|
||||
{3463358400 -10800 1 PYST}
|
||||
{3480289200 -14400 0 PYT}
|
||||
{3478474800 -14400 0 PYT}
|
||||
{3495412800 -10800 1 PYST}
|
||||
{3511738800 -14400 0 PYT}
|
||||
{3509924400 -14400 0 PYT}
|
||||
{3526862400 -10800 1 PYST}
|
||||
{3543188400 -14400 0 PYT}
|
||||
{3541374000 -14400 0 PYT}
|
||||
{3558312000 -10800 1 PYST}
|
||||
{3574638000 -14400 0 PYT}
|
||||
{3573428400 -14400 0 PYT}
|
||||
{3589761600 -10800 1 PYST}
|
||||
{3606087600 -14400 0 PYT}
|
||||
{3604878000 -14400 0 PYT}
|
||||
{3621211200 -10800 1 PYST}
|
||||
{3637537200 -14400 0 PYT}
|
||||
{3636327600 -14400 0 PYT}
|
||||
{3653265600 -10800 1 PYST}
|
||||
{3669591600 -14400 0 PYT}
|
||||
{3667777200 -14400 0 PYT}
|
||||
{3684715200 -10800 1 PYST}
|
||||
{3701041200 -14400 0 PYT}
|
||||
{3699226800 -14400 0 PYT}
|
||||
{3716164800 -10800 1 PYST}
|
||||
{3732490800 -14400 0 PYT}
|
||||
{3731281200 -14400 0 PYT}
|
||||
{3747614400 -10800 1 PYST}
|
||||
{3763940400 -14400 0 PYT}
|
||||
{3762730800 -14400 0 PYT}
|
||||
{3779064000 -10800 1 PYST}
|
||||
{3795390000 -14400 0 PYT}
|
||||
{3794180400 -14400 0 PYT}
|
||||
{3810513600 -10800 1 PYST}
|
||||
{3826839600 -14400 0 PYT}
|
||||
{3825630000 -14400 0 PYT}
|
||||
{3842568000 -10800 1 PYST}
|
||||
{3858894000 -14400 0 PYT}
|
||||
{3857079600 -14400 0 PYT}
|
||||
{3874017600 -10800 1 PYST}
|
||||
{3890343600 -14400 0 PYT}
|
||||
{3888529200 -14400 0 PYT}
|
||||
{3905467200 -10800 1 PYST}
|
||||
{3921793200 -14400 0 PYT}
|
||||
{3920583600 -14400 0 PYT}
|
||||
{3936916800 -10800 1 PYST}
|
||||
{3953242800 -14400 0 PYT}
|
||||
{3952033200 -14400 0 PYT}
|
||||
{3968366400 -10800 1 PYST}
|
||||
{3984692400 -14400 0 PYT}
|
||||
{3983482800 -14400 0 PYT}
|
||||
{4000420800 -10800 1 PYST}
|
||||
{4016746800 -14400 0 PYT}
|
||||
{4014932400 -14400 0 PYT}
|
||||
{4031870400 -10800 1 PYST}
|
||||
{4048196400 -14400 0 PYT}
|
||||
{4046382000 -14400 0 PYT}
|
||||
{4063320000 -10800 1 PYST}
|
||||
{4079646000 -14400 0 PYT}
|
||||
{4077831600 -14400 0 PYT}
|
||||
{4094769600 -10800 1 PYST}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
|
||||
set TZData(:Antarctica/Macquarie) {
|
||||
{-9223372036854775808 0 0 zzz}
|
||||
{-1861920000 36000 0 EST}
|
||||
{-2214259200 36000 0 EST}
|
||||
{-1680508800 39600 1 EST}
|
||||
{-1669892400 39600 0 EST}
|
||||
{-1665392400 36000 0 EST}
|
||||
{-883641600 39600 1 EST}
|
||||
{-876128400 36000 0 EST}
|
||||
{-860400000 39600 1 EST}
|
||||
{-844678800 36000 0 EST}
|
||||
{-828345600 39600 1 EST}
|
||||
{-813229200 36000 0 EST}
|
||||
{-1601719200 0 0 zzz}
|
||||
{-94730400 36000 0 EST}
|
||||
{-71136000 39600 1 EST}
|
||||
{-55411200 36000 0 EST}
|
||||
|
||||
+183
-6
@@ -88,14 +88,191 @@ set TZData(:Asia/Gaza) {
|
||||
{1158872400 7200 0 EET}
|
||||
{1175378400 10800 1 EEST}
|
||||
{1189638000 7200 0 EET}
|
||||
{1207000800 10800 1 EEST}
|
||||
{1219957200 7200 0 EET}
|
||||
{1206655200 10800 1 EEST}
|
||||
{1219960800 7200 0 EET}
|
||||
{1220220000 7200 0 EET}
|
||||
{1238104800 10800 1 EEST}
|
||||
{1252018800 7200 0 EET}
|
||||
{1269640860 10800 1 EEST}
|
||||
{1252015200 7200 0 EET}
|
||||
{1262296800 7200 0 EET}
|
||||
{1269640860 10800 0 EEST}
|
||||
{1281474000 7200 0 EET}
|
||||
{1301738460 10800 1 EEST}
|
||||
{1312146000 7200 0 EET}
|
||||
{1301608860 10800 1 EEST}
|
||||
{1312149600 7200 0 EET}
|
||||
{1325368800 7200 0 EET}
|
||||
{1333058400 10800 1 EEST}
|
||||
{1348178400 7200 0 EET}
|
||||
{1364508000 10800 1 EEST}
|
||||
{1380232800 7200 0 EET}
|
||||
{1395957600 10800 1 EEST}
|
||||
{1411682400 7200 0 EET}
|
||||
{1427407200 10800 1 EEST}
|
||||
{1443132000 7200 0 EET}
|
||||
{1459461600 10800 1 EEST}
|
||||
{1474581600 7200 0 EET}
|
||||
{1490911200 10800 1 EEST}
|
||||
{1506031200 7200 0 EET}
|
||||
{1522360800 10800 1 EEST}
|
||||
{1537480800 7200 0 EET}
|
||||
{1553810400 10800 1 EEST}
|
||||
{1569535200 7200 0 EET}
|
||||
{1585260000 10800 1 EEST}
|
||||
{1600984800 7200 0 EET}
|
||||
{1616709600 10800 1 EEST}
|
||||
{1632434400 7200 0 EET}
|
||||
{1648764000 10800 1 EEST}
|
||||
{1663884000 7200 0 EET}
|
||||
{1680213600 10800 1 EEST}
|
||||
{1695333600 7200 0 EET}
|
||||
{1711663200 10800 1 EEST}
|
||||
{1727388000 7200 0 EET}
|
||||
{1743112800 10800 1 EEST}
|
||||
{1758837600 7200 0 EET}
|
||||
{1774562400 10800 1 EEST}
|
||||
{1790287200 7200 0 EET}
|
||||
{1806012000 10800 1 EEST}
|
||||
{1821736800 7200 0 EET}
|
||||
{1838066400 10800 1 EEST}
|
||||
{1853186400 7200 0 EET}
|
||||
{1869516000 10800 1 EEST}
|
||||
{1884636000 7200 0 EET}
|
||||
{1900965600 10800 1 EEST}
|
||||
{1916690400 7200 0 EET}
|
||||
{1932415200 10800 1 EEST}
|
||||
{1948140000 7200 0 EET}
|
||||
{1963864800 10800 1 EEST}
|
||||
{1979589600 7200 0 EET}
|
||||
{1995919200 10800 1 EEST}
|
||||
{2011039200 7200 0 EET}
|
||||
{2027368800 10800 1 EEST}
|
||||
{2042488800 7200 0 EET}
|
||||
{2058818400 10800 1 EEST}
|
||||
{2073938400 7200 0 EET}
|
||||
{2090268000 10800 1 EEST}
|
||||
{2105992800 7200 0 EET}
|
||||
{2121717600 10800 1 EEST}
|
||||
{2137442400 7200 0 EET}
|
||||
{2153167200 10800 1 EEST}
|
||||
{2168892000 7200 0 EET}
|
||||
{2185221600 10800 1 EEST}
|
||||
{2200341600 7200 0 EET}
|
||||
{2216671200 10800 1 EEST}
|
||||
{2231791200 7200 0 EET}
|
||||
{2248120800 10800 1 EEST}
|
||||
{2263845600 7200 0 EET}
|
||||
{2279570400 10800 1 EEST}
|
||||
{2295295200 7200 0 EET}
|
||||
{2311020000 10800 1 EEST}
|
||||
{2326744800 7200 0 EET}
|
||||
{2343074400 10800 1 EEST}
|
||||
{2358194400 7200 0 EET}
|
||||
{2374524000 10800 1 EEST}
|
||||
{2389644000 7200 0 EET}
|
||||
{2405973600 10800 1 EEST}
|
||||
{2421093600 7200 0 EET}
|
||||
{2437423200 10800 1 EEST}
|
||||
{2453148000 7200 0 EET}
|
||||
{2468872800 10800 1 EEST}
|
||||
{2484597600 7200 0 EET}
|
||||
{2500322400 10800 1 EEST}
|
||||
{2516047200 7200 0 EET}
|
||||
{2532376800 10800 1 EEST}
|
||||
{2547496800 7200 0 EET}
|
||||
{2563826400 10800 1 EEST}
|
||||
{2578946400 7200 0 EET}
|
||||
{2595276000 10800 1 EEST}
|
||||
{2611000800 7200 0 EET}
|
||||
{2626725600 10800 1 EEST}
|
||||
{2642450400 7200 0 EET}
|
||||
{2658175200 10800 1 EEST}
|
||||
{2673900000 7200 0 EET}
|
||||
{2689624800 10800 1 EEST}
|
||||
{2705349600 7200 0 EET}
|
||||
{2721679200 10800 1 EEST}
|
||||
{2736799200 7200 0 EET}
|
||||
{2753128800 10800 1 EEST}
|
||||
{2768248800 7200 0 EET}
|
||||
{2784578400 10800 1 EEST}
|
||||
{2800303200 7200 0 EET}
|
||||
{2816028000 10800 1 EEST}
|
||||
{2831752800 7200 0 EET}
|
||||
{2847477600 10800 1 EEST}
|
||||
{2863202400 7200 0 EET}
|
||||
{2879532000 10800 1 EEST}
|
||||
{2894652000 7200 0 EET}
|
||||
{2910981600 10800 1 EEST}
|
||||
{2926101600 7200 0 EET}
|
||||
{2942431200 10800 1 EEST}
|
||||
{2957551200 7200 0 EET}
|
||||
{2973880800 10800 1 EEST}
|
||||
{2989605600 7200 0 EET}
|
||||
{3005330400 10800 1 EEST}
|
||||
{3021055200 7200 0 EET}
|
||||
{3036780000 10800 1 EEST}
|
||||
{3052504800 7200 0 EET}
|
||||
{3068834400 10800 1 EEST}
|
||||
{3083954400 7200 0 EET}
|
||||
{3100284000 10800 1 EEST}
|
||||
{3115404000 7200 0 EET}
|
||||
{3131733600 10800 1 EEST}
|
||||
{3147458400 7200 0 EET}
|
||||
{3163183200 10800 1 EEST}
|
||||
{3178908000 7200 0 EET}
|
||||
{3194632800 10800 1 EEST}
|
||||
{3210357600 7200 0 EET}
|
||||
{3226687200 10800 1 EEST}
|
||||
{3241807200 7200 0 EET}
|
||||
{3258136800 10800 1 EEST}
|
||||
{3273256800 7200 0 EET}
|
||||
{3289586400 10800 1 EEST}
|
||||
{3304706400 7200 0 EET}
|
||||
{3321036000 10800 1 EEST}
|
||||
{3336760800 7200 0 EET}
|
||||
{3352485600 10800 1 EEST}
|
||||
{3368210400 7200 0 EET}
|
||||
{3383935200 10800 1 EEST}
|
||||
{3399660000 7200 0 EET}
|
||||
{3415989600 10800 1 EEST}
|
||||
{3431109600 7200 0 EET}
|
||||
{3447439200 10800 1 EEST}
|
||||
{3462559200 7200 0 EET}
|
||||
{3478888800 10800 1 EEST}
|
||||
{3494613600 7200 0 EET}
|
||||
{3510338400 10800 1 EEST}
|
||||
{3526063200 7200 0 EET}
|
||||
{3541788000 10800 1 EEST}
|
||||
{3557512800 7200 0 EET}
|
||||
{3573237600 10800 1 EEST}
|
||||
{3588962400 7200 0 EET}
|
||||
{3605292000 10800 1 EEST}
|
||||
{3620412000 7200 0 EET}
|
||||
{3636741600 10800 1 EEST}
|
||||
{3651861600 7200 0 EET}
|
||||
{3668191200 10800 1 EEST}
|
||||
{3683916000 7200 0 EET}
|
||||
{3699640800 10800 1 EEST}
|
||||
{3715365600 7200 0 EET}
|
||||
{3731090400 10800 1 EEST}
|
||||
{3746815200 7200 0 EET}
|
||||
{3763144800 10800 1 EEST}
|
||||
{3778264800 7200 0 EET}
|
||||
{3794594400 10800 1 EEST}
|
||||
{3809714400 7200 0 EET}
|
||||
{3826044000 10800 1 EEST}
|
||||
{3841164000 7200 0 EET}
|
||||
{3857493600 10800 1 EEST}
|
||||
{3873218400 7200 0 EET}
|
||||
{3888943200 10800 1 EEST}
|
||||
{3904668000 7200 0 EET}
|
||||
{3920392800 10800 1 EEST}
|
||||
{3936117600 7200 0 EET}
|
||||
{3952447200 10800 1 EEST}
|
||||
{3967567200 7200 0 EET}
|
||||
{3983896800 10800 1 EEST}
|
||||
{3999016800 7200 0 EET}
|
||||
{4015346400 10800 1 EEST}
|
||||
{4031071200 7200 0 EET}
|
||||
{4046796000 10800 1 EEST}
|
||||
{4062520800 7200 0 EET}
|
||||
{4078245600 10800 1 EEST}
|
||||
{4093970400 7200 0 EET}
|
||||
}
|
||||
|
||||
+179
-6
@@ -88,17 +88,190 @@ set TZData(:Asia/Hebron) {
|
||||
{1158872400 7200 0 EET}
|
||||
{1175378400 10800 1 EEST}
|
||||
{1189638000 7200 0 EET}
|
||||
{1207000800 10800 1 EEST}
|
||||
{1217541600 10800 1 EEST}
|
||||
{1206655200 10800 1 EEST}
|
||||
{1220216400 7200 0 EET}
|
||||
{1238104800 10800 1 EEST}
|
||||
{1252018800 7200 0 EET}
|
||||
{1269640860 10800 1 EEST}
|
||||
{1252015200 7200 0 EET}
|
||||
{1269554400 10800 1 EEST}
|
||||
{1281474000 7200 0 EET}
|
||||
{1301652060 10800 1 EEST}
|
||||
{1301608860 10800 1 EEST}
|
||||
{1312146000 7200 0 EET}
|
||||
{1314655200 10800 1 EEST}
|
||||
{1317340800 7200 0 EET}
|
||||
{1317330000 7200 0 EET}
|
||||
{1333058400 10800 1 EEST}
|
||||
{1348178400 7200 0 EET}
|
||||
{1364508000 10800 1 EEST}
|
||||
{1380232800 7200 0 EET}
|
||||
{1395957600 10800 1 EEST}
|
||||
{1411682400 7200 0 EET}
|
||||
{1427407200 10800 1 EEST}
|
||||
{1443132000 7200 0 EET}
|
||||
{1459461600 10800 1 EEST}
|
||||
{1474581600 7200 0 EET}
|
||||
{1490911200 10800 1 EEST}
|
||||
{1506031200 7200 0 EET}
|
||||
{1522360800 10800 1 EEST}
|
||||
{1537480800 7200 0 EET}
|
||||
{1553810400 10800 1 EEST}
|
||||
{1569535200 7200 0 EET}
|
||||
{1585260000 10800 1 EEST}
|
||||
{1600984800 7200 0 EET}
|
||||
{1616709600 10800 1 EEST}
|
||||
{1632434400 7200 0 EET}
|
||||
{1648764000 10800 1 EEST}
|
||||
{1663884000 7200 0 EET}
|
||||
{1680213600 10800 1 EEST}
|
||||
{1695333600 7200 0 EET}
|
||||
{1711663200 10800 1 EEST}
|
||||
{1727388000 7200 0 EET}
|
||||
{1743112800 10800 1 EEST}
|
||||
{1758837600 7200 0 EET}
|
||||
{1774562400 10800 1 EEST}
|
||||
{1790287200 7200 0 EET}
|
||||
{1806012000 10800 1 EEST}
|
||||
{1821736800 7200 0 EET}
|
||||
{1838066400 10800 1 EEST}
|
||||
{1853186400 7200 0 EET}
|
||||
{1869516000 10800 1 EEST}
|
||||
{1884636000 7200 0 EET}
|
||||
{1900965600 10800 1 EEST}
|
||||
{1916690400 7200 0 EET}
|
||||
{1932415200 10800 1 EEST}
|
||||
{1948140000 7200 0 EET}
|
||||
{1963864800 10800 1 EEST}
|
||||
{1979589600 7200 0 EET}
|
||||
{1995919200 10800 1 EEST}
|
||||
{2011039200 7200 0 EET}
|
||||
{2027368800 10800 1 EEST}
|
||||
{2042488800 7200 0 EET}
|
||||
{2058818400 10800 1 EEST}
|
||||
{2073938400 7200 0 EET}
|
||||
{2090268000 10800 1 EEST}
|
||||
{2105992800 7200 0 EET}
|
||||
{2121717600 10800 1 EEST}
|
||||
{2137442400 7200 0 EET}
|
||||
{2153167200 10800 1 EEST}
|
||||
{2168892000 7200 0 EET}
|
||||
{2185221600 10800 1 EEST}
|
||||
{2200341600 7200 0 EET}
|
||||
{2216671200 10800 1 EEST}
|
||||
{2231791200 7200 0 EET}
|
||||
{2248120800 10800 1 EEST}
|
||||
{2263845600 7200 0 EET}
|
||||
{2279570400 10800 1 EEST}
|
||||
{2295295200 7200 0 EET}
|
||||
{2311020000 10800 1 EEST}
|
||||
{2326744800 7200 0 EET}
|
||||
{2343074400 10800 1 EEST}
|
||||
{2358194400 7200 0 EET}
|
||||
{2374524000 10800 1 EEST}
|
||||
{2389644000 7200 0 EET}
|
||||
{2405973600 10800 1 EEST}
|
||||
{2421093600 7200 0 EET}
|
||||
{2437423200 10800 1 EEST}
|
||||
{2453148000 7200 0 EET}
|
||||
{2468872800 10800 1 EEST}
|
||||
{2484597600 7200 0 EET}
|
||||
{2500322400 10800 1 EEST}
|
||||
{2516047200 7200 0 EET}
|
||||
{2532376800 10800 1 EEST}
|
||||
{2547496800 7200 0 EET}
|
||||
{2563826400 10800 1 EEST}
|
||||
{2578946400 7200 0 EET}
|
||||
{2595276000 10800 1 EEST}
|
||||
{2611000800 7200 0 EET}
|
||||
{2626725600 10800 1 EEST}
|
||||
{2642450400 7200 0 EET}
|
||||
{2658175200 10800 1 EEST}
|
||||
{2673900000 7200 0 EET}
|
||||
{2689624800 10800 1 EEST}
|
||||
{2705349600 7200 0 EET}
|
||||
{2721679200 10800 1 EEST}
|
||||
{2736799200 7200 0 EET}
|
||||
{2753128800 10800 1 EEST}
|
||||
{2768248800 7200 0 EET}
|
||||
{2784578400 10800 1 EEST}
|
||||
{2800303200 7200 0 EET}
|
||||
{2816028000 10800 1 EEST}
|
||||
{2831752800 7200 0 EET}
|
||||
{2847477600 10800 1 EEST}
|
||||
{2863202400 7200 0 EET}
|
||||
{2879532000 10800 1 EEST}
|
||||
{2894652000 7200 0 EET}
|
||||
{2910981600 10800 1 EEST}
|
||||
{2926101600 7200 0 EET}
|
||||
{2942431200 10800 1 EEST}
|
||||
{2957551200 7200 0 EET}
|
||||
{2973880800 10800 1 EEST}
|
||||
{2989605600 7200 0 EET}
|
||||
{3005330400 10800 1 EEST}
|
||||
{3021055200 7200 0 EET}
|
||||
{3036780000 10800 1 EEST}
|
||||
{3052504800 7200 0 EET}
|
||||
{3068834400 10800 1 EEST}
|
||||
{3083954400 7200 0 EET}
|
||||
{3100284000 10800 1 EEST}
|
||||
{3115404000 7200 0 EET}
|
||||
{3131733600 10800 1 EEST}
|
||||
{3147458400 7200 0 EET}
|
||||
{3163183200 10800 1 EEST}
|
||||
{3178908000 7200 0 EET}
|
||||
{3194632800 10800 1 EEST}
|
||||
{3210357600 7200 0 EET}
|
||||
{3226687200 10800 1 EEST}
|
||||
{3241807200 7200 0 EET}
|
||||
{3258136800 10800 1 EEST}
|
||||
{3273256800 7200 0 EET}
|
||||
{3289586400 10800 1 EEST}
|
||||
{3304706400 7200 0 EET}
|
||||
{3321036000 10800 1 EEST}
|
||||
{3336760800 7200 0 EET}
|
||||
{3352485600 10800 1 EEST}
|
||||
{3368210400 7200 0 EET}
|
||||
{3383935200 10800 1 EEST}
|
||||
{3399660000 7200 0 EET}
|
||||
{3415989600 10800 1 EEST}
|
||||
{3431109600 7200 0 EET}
|
||||
{3447439200 10800 1 EEST}
|
||||
{3462559200 7200 0 EET}
|
||||
{3478888800 10800 1 EEST}
|
||||
{3494613600 7200 0 EET}
|
||||
{3510338400 10800 1 EEST}
|
||||
{3526063200 7200 0 EET}
|
||||
{3541788000 10800 1 EEST}
|
||||
{3557512800 7200 0 EET}
|
||||
{3573237600 10800 1 EEST}
|
||||
{3588962400 7200 0 EET}
|
||||
{3605292000 10800 1 EEST}
|
||||
{3620412000 7200 0 EET}
|
||||
{3636741600 10800 1 EEST}
|
||||
{3651861600 7200 0 EET}
|
||||
{3668191200 10800 1 EEST}
|
||||
{3683916000 7200 0 EET}
|
||||
{3699640800 10800 1 EEST}
|
||||
{3715365600 7200 0 EET}
|
||||
{3731090400 10800 1 EEST}
|
||||
{3746815200 7200 0 EET}
|
||||
{3763144800 10800 1 EEST}
|
||||
{3778264800 7200 0 EET}
|
||||
{3794594400 10800 1 EEST}
|
||||
{3809714400 7200 0 EET}
|
||||
{3826044000 10800 1 EEST}
|
||||
{3841164000 7200 0 EET}
|
||||
{3857493600 10800 1 EEST}
|
||||
{3873218400 7200 0 EET}
|
||||
{3888943200 10800 1 EEST}
|
||||
{3904668000 7200 0 EET}
|
||||
{3920392800 10800 1 EEST}
|
||||
{3936117600 7200 0 EET}
|
||||
{3952447200 10800 1 EEST}
|
||||
{3967567200 7200 0 EET}
|
||||
{3983896800 10800 1 EEST}
|
||||
{3999016800 7200 0 EET}
|
||||
{4015346400 10800 1 EEST}
|
||||
{4031071200 7200 0 EET}
|
||||
{4046796000 10800 1 EEST}
|
||||
{4062520800 7200 0 EET}
|
||||
{4078245600 10800 1 EEST}
|
||||
{4093970400 7200 0 EET}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Asia/Jerusalem) {
|
||||
{-9223372036854775808 8456 0 LMT}
|
||||
{-2840149256 8440 0 JMT}
|
||||
{-9223372036854775808 8454 0 LMT}
|
||||
{-2840149254 8440 0 JMT}
|
||||
{-1641003640 7200 0 IST}
|
||||
{-933645600 10800 1 IDT}
|
||||
{-857358000 7200 0 IST}
|
||||
@@ -96,177 +96,177 @@ set TZData(:Asia/Jerusalem) {
|
||||
{1333065600 10800 1 IDT}
|
||||
{1348354800 7200 0 IST}
|
||||
{1364515200 10800 1 IDT}
|
||||
{1381014000 7200 0 IST}
|
||||
{1382828400 7200 0 IST}
|
||||
{1395964800 10800 1 IDT}
|
||||
{1412463600 7200 0 IST}
|
||||
{1414278000 7200 0 IST}
|
||||
{1427414400 10800 1 IDT}
|
||||
{1443913200 7200 0 IST}
|
||||
{1445727600 7200 0 IST}
|
||||
{1458864000 10800 1 IDT}
|
||||
{1475362800 7200 0 IST}
|
||||
{1477782000 7200 0 IST}
|
||||
{1490313600 10800 1 IDT}
|
||||
{1507417200 7200 0 IST}
|
||||
{1509231600 7200 0 IST}
|
||||
{1521763200 10800 1 IDT}
|
||||
{1538866800 7200 0 IST}
|
||||
{1540681200 7200 0 IST}
|
||||
{1553817600 10800 1 IDT}
|
||||
{1570316400 7200 0 IST}
|
||||
{1572130800 7200 0 IST}
|
||||
{1585267200 10800 1 IDT}
|
||||
{1601766000 7200 0 IST}
|
||||
{1603580400 7200 0 IST}
|
||||
{1616716800 10800 1 IDT}
|
||||
{1633215600 7200 0 IST}
|
||||
{1635634800 7200 0 IST}
|
||||
{1648166400 10800 1 IDT}
|
||||
{1664665200 7200 0 IST}
|
||||
{1667084400 7200 0 IST}
|
||||
{1679616000 10800 1 IDT}
|
||||
{1696719600 7200 0 IST}
|
||||
{1698534000 7200 0 IST}
|
||||
{1711670400 10800 1 IDT}
|
||||
{1728169200 7200 0 IST}
|
||||
{1729983600 7200 0 IST}
|
||||
{1743120000 10800 1 IDT}
|
||||
{1759618800 7200 0 IST}
|
||||
{1761433200 7200 0 IST}
|
||||
{1774569600 10800 1 IDT}
|
||||
{1791068400 7200 0 IST}
|
||||
{1792882800 7200 0 IST}
|
||||
{1806019200 10800 1 IDT}
|
||||
{1822604400 7200 0 IST}
|
||||
{1824937200 7200 0 IST}
|
||||
{1837468800 10800 1 IDT}
|
||||
{1854572400 7200 0 IST}
|
||||
{1856386800 7200 0 IST}
|
||||
{1868918400 10800 1 IDT}
|
||||
{1886022000 7200 0 IST}
|
||||
{1887836400 7200 0 IST}
|
||||
{1900972800 10800 1 IDT}
|
||||
{1917471600 7200 0 IST}
|
||||
{1919286000 7200 0 IST}
|
||||
{1932422400 10800 1 IDT}
|
||||
{1948921200 7200 0 IST}
|
||||
{1950735600 7200 0 IST}
|
||||
{1963872000 10800 1 IDT}
|
||||
{1980370800 7200 0 IST}
|
||||
{1982790000 7200 0 IST}
|
||||
{1995321600 10800 1 IDT}
|
||||
{2011820400 7200 0 IST}
|
||||
{2014239600 7200 0 IST}
|
||||
{2026771200 10800 1 IDT}
|
||||
{2043874800 7200 0 IST}
|
||||
{2045689200 7200 0 IST}
|
||||
{2058220800 10800 1 IDT}
|
||||
{2075324400 7200 0 IST}
|
||||
{2077138800 7200 0 IST}
|
||||
{2090275200 10800 1 IDT}
|
||||
{2106774000 7200 0 IST}
|
||||
{2108588400 7200 0 IST}
|
||||
{2121724800 10800 1 IDT}
|
||||
{2138223600 7200 0 IST}
|
||||
{2140038000 7200 0 IST}
|
||||
{2153174400 10800 1 IDT}
|
||||
{2169673200 7200 0 IST}
|
||||
{2172092400 7200 0 IST}
|
||||
{2184624000 10800 1 IDT}
|
||||
{2201122800 7200 0 IST}
|
||||
{2203542000 7200 0 IST}
|
||||
{2216073600 10800 1 IDT}
|
||||
{2233177200 7200 0 IST}
|
||||
{2234991600 7200 0 IST}
|
||||
{2248128000 10800 1 IDT}
|
||||
{2264626800 7200 0 IST}
|
||||
{2266441200 7200 0 IST}
|
||||
{2279577600 10800 1 IDT}
|
||||
{2296076400 7200 0 IST}
|
||||
{2297890800 7200 0 IST}
|
||||
{2311027200 10800 1 IDT}
|
||||
{2327526000 7200 0 IST}
|
||||
{2329340400 7200 0 IST}
|
||||
{2342476800 10800 1 IDT}
|
||||
{2358975600 7200 0 IST}
|
||||
{2361394800 7200 0 IST}
|
||||
{2373926400 10800 1 IDT}
|
||||
{2391030000 7200 0 IST}
|
||||
{2392844400 7200 0 IST}
|
||||
{2405376000 10800 1 IDT}
|
||||
{2422479600 7200 0 IST}
|
||||
{2424294000 7200 0 IST}
|
||||
{2437430400 10800 1 IDT}
|
||||
{2453929200 7200 0 IST}
|
||||
{2455743600 7200 0 IST}
|
||||
{2468880000 10800 1 IDT}
|
||||
{2485378800 7200 0 IST}
|
||||
{2487193200 7200 0 IST}
|
||||
{2500329600 10800 1 IDT}
|
||||
{2516828400 7200 0 IST}
|
||||
{2519247600 7200 0 IST}
|
||||
{2531779200 10800 1 IDT}
|
||||
{2548278000 7200 0 IST}
|
||||
{2550697200 7200 0 IST}
|
||||
{2563228800 10800 1 IDT}
|
||||
{2580332400 7200 0 IST}
|
||||
{2582146800 7200 0 IST}
|
||||
{2595283200 10800 1 IDT}
|
||||
{2611782000 7200 0 IST}
|
||||
{2613596400 7200 0 IST}
|
||||
{2626732800 10800 1 IDT}
|
||||
{2643231600 7200 0 IST}
|
||||
{2645046000 7200 0 IST}
|
||||
{2658182400 10800 1 IDT}
|
||||
{2674681200 7200 0 IST}
|
||||
{2676495600 7200 0 IST}
|
||||
{2689632000 10800 1 IDT}
|
||||
{2706130800 7200 0 IST}
|
||||
{2708550000 7200 0 IST}
|
||||
{2721081600 10800 1 IDT}
|
||||
{2738185200 7200 0 IST}
|
||||
{2739999600 7200 0 IST}
|
||||
{2752531200 10800 1 IDT}
|
||||
{2769634800 7200 0 IST}
|
||||
{2771449200 7200 0 IST}
|
||||
{2784585600 10800 1 IDT}
|
||||
{2801084400 7200 0 IST}
|
||||
{2802898800 7200 0 IST}
|
||||
{2816035200 10800 1 IDT}
|
||||
{2832534000 7200 0 IST}
|
||||
{2834348400 7200 0 IST}
|
||||
{2847484800 10800 1 IDT}
|
||||
{2863983600 7200 0 IST}
|
||||
{2866402800 7200 0 IST}
|
||||
{2878934400 10800 1 IDT}
|
||||
{2895433200 7200 0 IST}
|
||||
{2897852400 7200 0 IST}
|
||||
{2910384000 10800 1 IDT}
|
||||
{2927487600 7200 0 IST}
|
||||
{2929302000 7200 0 IST}
|
||||
{2941833600 10800 1 IDT}
|
||||
{2958937200 7200 0 IST}
|
||||
{2960751600 7200 0 IST}
|
||||
{2973888000 10800 1 IDT}
|
||||
{2990386800 7200 0 IST}
|
||||
{2992201200 7200 0 IST}
|
||||
{3005337600 10800 1 IDT}
|
||||
{3021836400 7200 0 IST}
|
||||
{3023650800 7200 0 IST}
|
||||
{3036787200 10800 1 IDT}
|
||||
{3053286000 7200 0 IST}
|
||||
{3055705200 7200 0 IST}
|
||||
{3068236800 10800 1 IDT}
|
||||
{3084735600 7200 0 IST}
|
||||
{3087154800 7200 0 IST}
|
||||
{3099686400 10800 1 IDT}
|
||||
{3116790000 7200 0 IST}
|
||||
{3118604400 7200 0 IST}
|
||||
{3131740800 10800 1 IDT}
|
||||
{3148239600 7200 0 IST}
|
||||
{3150054000 7200 0 IST}
|
||||
{3163190400 10800 1 IDT}
|
||||
{3179689200 7200 0 IST}
|
||||
{3181503600 7200 0 IST}
|
||||
{3194640000 10800 1 IDT}
|
||||
{3211138800 7200 0 IST}
|
||||
{3212953200 7200 0 IST}
|
||||
{3226089600 10800 1 IDT}
|
||||
{3242588400 7200 0 IST}
|
||||
{3245007600 7200 0 IST}
|
||||
{3257539200 10800 1 IDT}
|
||||
{3274642800 7200 0 IST}
|
||||
{3276457200 7200 0 IST}
|
||||
{3288988800 10800 1 IDT}
|
||||
{3306092400 7200 0 IST}
|
||||
{3307906800 7200 0 IST}
|
||||
{3321043200 10800 1 IDT}
|
||||
{3337542000 7200 0 IST}
|
||||
{3339356400 7200 0 IST}
|
||||
{3352492800 10800 1 IDT}
|
||||
{3368991600 7200 0 IST}
|
||||
{3370806000 7200 0 IST}
|
||||
{3383942400 10800 1 IDT}
|
||||
{3400441200 7200 0 IST}
|
||||
{3402860400 7200 0 IST}
|
||||
{3415392000 10800 1 IDT}
|
||||
{3431890800 7200 0 IST}
|
||||
{3434310000 7200 0 IST}
|
||||
{3446841600 10800 1 IDT}
|
||||
{3463945200 7200 0 IST}
|
||||
{3465759600 7200 0 IST}
|
||||
{3478896000 10800 1 IDT}
|
||||
{3495394800 7200 0 IST}
|
||||
{3497209200 7200 0 IST}
|
||||
{3510345600 10800 1 IDT}
|
||||
{3526844400 7200 0 IST}
|
||||
{3528658800 7200 0 IST}
|
||||
{3541795200 10800 1 IDT}
|
||||
{3558294000 7200 0 IST}
|
||||
{3560108400 7200 0 IST}
|
||||
{3573244800 10800 1 IDT}
|
||||
{3589743600 7200 0 IST}
|
||||
{3592162800 7200 0 IST}
|
||||
{3604694400 10800 1 IDT}
|
||||
{3621798000 7200 0 IST}
|
||||
{3623612400 7200 0 IST}
|
||||
{3636144000 10800 1 IDT}
|
||||
{3653247600 7200 0 IST}
|
||||
{3655062000 7200 0 IST}
|
||||
{3668198400 10800 1 IDT}
|
||||
{3684697200 7200 0 IST}
|
||||
{3686511600 7200 0 IST}
|
||||
{3699648000 10800 1 IDT}
|
||||
{3716146800 7200 0 IST}
|
||||
{3717961200 7200 0 IST}
|
||||
{3731097600 10800 1 IDT}
|
||||
{3747596400 7200 0 IST}
|
||||
{3750015600 7200 0 IST}
|
||||
{3762547200 10800 1 IDT}
|
||||
{3779046000 7200 0 IST}
|
||||
{3781465200 7200 0 IST}
|
||||
{3793996800 10800 1 IDT}
|
||||
{3811100400 7200 0 IST}
|
||||
{3812914800 7200 0 IST}
|
||||
{3825446400 10800 1 IDT}
|
||||
{3842550000 7200 0 IST}
|
||||
{3844364400 7200 0 IST}
|
||||
{3857500800 10800 1 IDT}
|
||||
{3873999600 7200 0 IST}
|
||||
{3875814000 7200 0 IST}
|
||||
{3888950400 10800 1 IDT}
|
||||
{3905449200 7200 0 IST}
|
||||
{3907263600 7200 0 IST}
|
||||
{3920400000 10800 1 IDT}
|
||||
{3936898800 7200 0 IST}
|
||||
{3939318000 7200 0 IST}
|
||||
{3951849600 10800 1 IDT}
|
||||
{3968348400 7200 0 IST}
|
||||
{3970767600 7200 0 IST}
|
||||
{3983299200 10800 1 IDT}
|
||||
{4000402800 7200 0 IST}
|
||||
{4002217200 7200 0 IST}
|
||||
{4015353600 10800 1 IDT}
|
||||
{4031852400 7200 0 IST}
|
||||
{4033666800 7200 0 IST}
|
||||
{4046803200 10800 1 IDT}
|
||||
{4063302000 7200 0 IST}
|
||||
{4065116400 7200 0 IST}
|
||||
{4078252800 10800 1 IDT}
|
||||
{4094751600 7200 0 IST}
|
||||
{4096566000 7200 0 IST}
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ before asking on the list, many questions have already been answered).
|
||||
http://wiki.tcl.tk/_/ref?N=3753
|
||||
http://wiki.tcl.tk/_/ref?N=8361
|
||||
|
||||
- Please report bugs with Tcl or Tk on Mac OS X to the sourceforge bug trackers:
|
||||
http://tcl.sourceforge.net/
|
||||
- Please report bugs with Tcl on Mac OS X to the tracker:
|
||||
http://core.tcl.tk/tcl/reportlist
|
||||
|
||||
2. Using Tcl on Mac OS X
|
||||
------------------------
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ needs to conform to the following conventions.
|
||||
distclean: Delete all generated files.
|
||||
|
||||
dist: Produce a copy of the package's source code distribution.
|
||||
Must respect the DIST_ROOT variable determing where to
|
||||
Must respect the DIST_ROOT variable determining where to
|
||||
write the generated directory.
|
||||
|
||||
Packages that are written to make use of the Tcl Extension Architecture (TEA)
|
||||
|
||||
+1
-2
@@ -175,8 +175,7 @@ test assemble-4.1 {syntax error} {
|
||||
-match glob
|
||||
-result {1 {extra characters after close-brace} {extra characters after close-brace
|
||||
while executing
|
||||
"{}extra
|
||||
"
|
||||
"{}e"
|
||||
("assemble" body, line 2)*}}
|
||||
}
|
||||
test assemble-4.2 {null command} {
|
||||
|
||||
+71
-32
@@ -2499,6 +2499,34 @@ test binary-71.9 {binary decode hex} -body {
|
||||
test binary-71.10 {binary decode hex} -body {
|
||||
string length [binary decode hex " "]
|
||||
} -result 0
|
||||
test binary-71.11 {binary decode hex: Bug b98fa55285} -body {
|
||||
apply {{} {
|
||||
set str "137b6f95e7519389e7c4b36599781e2ccf492699649249aae43fbe8c26\n"
|
||||
set decoded [binary decode hex $str]
|
||||
list [string length $decoded] [scan [string index $decoded end] %c]
|
||||
}}
|
||||
} -result {29 38}
|
||||
test binary-71.12 {binary decode hex: Bug b98fa55285 cross check} -body {
|
||||
apply {{} {
|
||||
set str "137b6f95e7519389e7c4b36599781e2ccf492699649249aae43fbe8c2\n"
|
||||
set decoded [binary decode hex $str]
|
||||
list [string length $decoded] [scan [string index $decoded end] %c]
|
||||
}}
|
||||
} -result {28 140}
|
||||
test binary-71.13 {binary decode hex: Bug b98fa55285 cross check} -body {
|
||||
apply {{} {
|
||||
set str "137b6f95e7519389e7c4b36599781e2ccf492699649249aae43fbe8c2\n\n"
|
||||
set decoded [binary decode hex $str]
|
||||
list [string length $decoded] [scan [string index $decoded end] %c]
|
||||
}}
|
||||
} -result {28 140}
|
||||
test binary-71.14 {binary decode hex: Bug b98fa55285 cross check} -body {
|
||||
apply {{} {
|
||||
set str "137b6f95e7519389e7c4b36599781e2ccf492699649249aae43fbe8c2\n\n\n"
|
||||
set decoded [binary decode hex $str]
|
||||
list [string length $decoded] [scan [string index $decoded end] %c]
|
||||
}}
|
||||
} -result {28 140}
|
||||
|
||||
test binary-72.1 {binary encode base64} -body {
|
||||
binary encode base64
|
||||
@@ -2677,105 +2705,116 @@ test binary-74.1 {binary encode uuencode} -body {
|
||||
} -returnCodes error -match glob -result "wrong # args: *"
|
||||
test binary-74.2 {binary encode uuencode} -body {
|
||||
binary encode uuencode abc
|
||||
} -result {86)C}
|
||||
} -result {#86)C
|
||||
}
|
||||
test binary-74.3 {binary encode uuencode} -body {
|
||||
binary encode uuencode {}
|
||||
} -result {}
|
||||
test binary-74.4 {binary encode uuencode} -body {
|
||||
binary encode uuencode [string repeat abc 20]
|
||||
} -result [string repeat 86)C 20]
|
||||
} -result "M[string repeat 86)C 15]\n/[string repeat 86)C 5]\n"
|
||||
test binary-74.5 {binary encode uuencode} -body {
|
||||
binary encode uuencode \0\1\2\3\4\0\1\2\3
|
||||
} -result "``\$\"`P0``0(#"
|
||||
} -result ")``\$\"`P0``0(#\n"
|
||||
test binary-74.6 {binary encode uuencode} -body {
|
||||
binary encode uuencode \0
|
||||
} -result {````}
|
||||
} -result {!``
|
||||
}
|
||||
test binary-74.7 {binary encode uuencode} -body {
|
||||
binary encode uuencode \0\0
|
||||
} -result {````}
|
||||
} -result "\"```
|
||||
"
|
||||
test binary-74.8 {binary encode uuencode} -body {
|
||||
binary encode uuencode \0\0\0
|
||||
} -result {````}
|
||||
} -result {#````
|
||||
}
|
||||
test binary-74.9 {binary encode uuencode} -body {
|
||||
binary encode uuencode \0\0\0\0
|
||||
} -result {````````}
|
||||
test binary-74.10 {binary encode uuencode} -body {
|
||||
binary encode uuencode -maxlen 0 -wrapchar | abcabcabc
|
||||
} -result {86)C86)C86)C}
|
||||
test binary-74.11 {binary encode uuencode} -body {
|
||||
binary encode uuencode -maxlen 1 -wrapchar | abcabcabc
|
||||
} -result {8|6|)|C|8|6|)|C|8|6|)|C}
|
||||
} -result {$``````
|
||||
}
|
||||
test binary-74.10 {binary encode uuencode} -returnCodes error -body {
|
||||
binary encode uuencode -foo 30 abcabcabc
|
||||
} -result {bad option "-foo": must be -maxlen or -wrapchar}
|
||||
test binary-74.11 {binary encode uuencode} -returnCodes error -body {
|
||||
binary encode uuencode -maxlen 1 abcabcabc
|
||||
} -result {line length out of range}
|
||||
test binary-74.12 {binary encode uuencode} -body {
|
||||
binary encode uuencode -maxlen 3 -wrapchar | abcabcabc
|
||||
} -result {!80|!8@|!8P|!80|!8@|!8P|!80|!8@|!8P|}
|
||||
|
||||
test binary-75.1 {binary decode uuencode} -body {
|
||||
binary decode uuencode
|
||||
} -returnCodes error -match glob -result "wrong # args: *"
|
||||
test binary-75.2 {binary decode uuencode} -body {
|
||||
binary decode uuencode 86)C
|
||||
binary decode uuencode "#86)C\n"
|
||||
} -result {abc}
|
||||
test binary-75.3 {binary decode uuencode} -body {
|
||||
binary decode uuencode {}
|
||||
} -result {}
|
||||
test binary-75.3.1 {binary decode uuencode} -body {
|
||||
binary decode uuencode `\n
|
||||
} -result {}
|
||||
test binary-75.4 {binary decode uuencode} -body {
|
||||
binary decode uuencode [string repeat "86)C" 20]
|
||||
binary decode uuencode "M[string repeat 86)C 15]\n/[string repeat 86)C 5]\n"
|
||||
} -result [string repeat abc 20]
|
||||
test binary-75.5 {binary decode uuencode} -body {
|
||||
binary decode uuencode "``\$\"`P0``0(#"
|
||||
binary decode uuencode ")``\$\"`P0``0(#"
|
||||
} -result "\0\1\2\3\4\0\1\2\3"
|
||||
test binary-75.6 {binary decode uuencode} -body {
|
||||
string length [binary decode uuencode {`}]
|
||||
string length [binary decode uuencode "`\n"]
|
||||
} -result 0
|
||||
test binary-75.7 {binary decode uuencode} -body {
|
||||
string length [binary decode uuencode {``}]
|
||||
string length [binary decode uuencode "!`\n"]
|
||||
} -result 1
|
||||
test binary-75.8 {binary decode uuencode} -body {
|
||||
string length [binary decode uuencode {```}]
|
||||
string length [binary decode uuencode "\"``\n"]
|
||||
} -result 2
|
||||
test binary-75.9 {binary decode uuencode} -body {
|
||||
string length [binary decode uuencode {````}]
|
||||
string length [binary decode uuencode "#```\n"]
|
||||
} -result 3
|
||||
test binary-75.10 {binary decode uuencode} -body {
|
||||
set s "[string repeat 86)C 10]\n[string repeat 86)C 10]"
|
||||
set s ">[string repeat 86)C 10]\n>[string repeat 86)C 10]"
|
||||
binary decode uuencode $s
|
||||
} -result [string repeat abc 20]
|
||||
test binary-75.11 {binary decode uuencode} -body {
|
||||
set s "[string repeat 86)C 10]\n [string repeat 86)C 10]"
|
||||
set s ">[string repeat 86)C 10]\n\t>\t[string repeat 86)C 10]\r"
|
||||
binary decode uuencode $s
|
||||
} -result [string repeat abc 20]
|
||||
test binary-75.12 {binary decode uuencode} -body {
|
||||
binary decode uuencode -strict "|86)C"
|
||||
} -returnCodes error -match glob -result {invalid uuencode character "|" at position 0}
|
||||
test binary-75.13 {binary decode uuencode} -body {
|
||||
set s "[string repeat 86)C 10]|[string repeat 86)C 10]"
|
||||
set s ">[string repeat 86)C 10]|[string repeat 86)C 10]"
|
||||
binary decode uuencode -strict $s
|
||||
} -returnCodes error -match glob -result {invalid uuencode character "|" at position 40}
|
||||
} -returnCodes error -match glob -result {invalid uuencode character "|" at position 41}
|
||||
test binary-75.14 {binary decode uuencode} -body {
|
||||
set s "[string repeat 86)C 10]\n [string repeat 86)C 10]"
|
||||
set s ">[string repeat 86)C 10]\na[string repeat 86)C 10]"
|
||||
binary decode uuencode -strict $s
|
||||
} -returnCodes error -match glob -result {invalid uuencode character *}
|
||||
test binary-75.20 {binary decode uuencode} -body {
|
||||
set r [binary decode uuencode 8]
|
||||
set r [binary decode uuencode " 8"]
|
||||
list [string length $r] $r
|
||||
} -result {0 {}}
|
||||
test binary-75.21 {binary decode uuencode} -body {
|
||||
set r [binary decode uuencode 86]
|
||||
set r [binary decode uuencode "!86"]
|
||||
list [string length $r] $r
|
||||
} -result {1 a}
|
||||
test binary-75.22 {binary decode uuencode} -body {
|
||||
set r [binary decode uuencode 86)]
|
||||
set r [binary decode uuencode "\"86)"]
|
||||
list [string length $r] $r
|
||||
} -result {2 ab}
|
||||
test binary-75.23 {binary decode uuencode} -body {
|
||||
set r [binary decode uuencode 86)C]
|
||||
set r [binary decode uuencode "#86)C"]
|
||||
list [string length $r] $r
|
||||
} -result {3 abc}
|
||||
test binary-75.24 {binary decode uuencode} -body {
|
||||
set s "04)\# "
|
||||
set s "#04)\# "
|
||||
binary decode uuencode $s
|
||||
} -result ABC
|
||||
test binary-75.25 {binary decode uuencode} -body {
|
||||
set s "04)\#z"
|
||||
set s "#04)\#z"
|
||||
binary decode uuencode $s
|
||||
} -returnCodes error -match glob -result {invalid uuencode character "z" at position 4}
|
||||
} -returnCodes error -match glob -result {invalid uuencode character "z" at position 5}
|
||||
test binary-75.26 {binary decode uuencode} -body {
|
||||
string length [binary decode uuencode " "]
|
||||
} -result 0
|
||||
|
||||
@@ -417,6 +417,15 @@ test cmdIL-4.34 {SortCompare procedure, -ascii option with -nocase option} {
|
||||
test cmdIL-4.35 {SortCompare procedure, -ascii option with -nocase option} {
|
||||
lsort -ascii -nocase {d E c B a D35 d300 100 20}
|
||||
} {100 20 a B c d d300 D35 E}
|
||||
test cmdIL-4.36 {SortCompare procedure, UTF-8 with -nocase option} {
|
||||
scan [lsort -ascii -nocase [list \u101 \u100]] %c%c%c
|
||||
} {257 32 256}
|
||||
test cmdIL-4.37 {SortCompare procedure, UTF-8 with -nocase option} {
|
||||
scan [lsort -ascii -nocase [list a\u0000a a]] %c%c%c%c%c
|
||||
} {97 32 97 0 97}
|
||||
test cmdIL-4.38 {SortCompare procedure, UTF-8 with -nocase option} {
|
||||
scan [lsort -ascii -nocase [list a a\u0000a]] %c%c%c%c%c
|
||||
} {97 32 97 0 97}
|
||||
|
||||
test cmdIL-5.1 {lsort with list style index} {
|
||||
lsort -ascii -decreasing -index {0 1} {
|
||||
|
||||
@@ -707,6 +707,12 @@ test compile-18.19 {disassembler - basics} -setup {
|
||||
} -cleanup {
|
||||
foo destroy
|
||||
} -match glob -result *
|
||||
|
||||
test compile-19.0 {Bug 3614102: reset stack housekeeping} -body {
|
||||
# This will panic in a --enable-symbols=compile build, unless bug is fixed.
|
||||
apply {{} {list [if 1]}}
|
||||
} -returnCodes error -match glob -result *
|
||||
|
||||
# TODO sometime - check that bytecode from tbcload is *not* disassembled.
|
||||
|
||||
# cleanup
|
||||
|
||||
@@ -609,6 +609,39 @@ test coroutine-7.3 {yielding between coroutines} -body {
|
||||
} -cleanup {
|
||||
catch {rename juggler ""}
|
||||
} -result {{{a b c d e} ::j1 {a b c d} ::j2 {a b c} ::j3 {a b} ::j1 a ::j2} {} {} {}}
|
||||
|
||||
test coroutine-7.4 {Bug 8ff0cb9fe1} -setup {
|
||||
proc foo {a b} {catch yield; return 1}
|
||||
} -cleanup {
|
||||
rename foo {}
|
||||
} -body {
|
||||
coroutine demo lsort -command foo {a b}
|
||||
} -result {b a}
|
||||
|
||||
test coroutine-7.5 {return codes} {
|
||||
set result {}
|
||||
foreach code {0 1 2 3 4 5} {
|
||||
lappend result [catch {coroutine demo return -level 0 -code $code}]
|
||||
}
|
||||
set result
|
||||
} {0 1 2 3 4 5}
|
||||
|
||||
test coroutine-7.6 {Early yield crashes} {
|
||||
proc foo args {}
|
||||
trace add execution foo enter {catch yield}
|
||||
coroutine demo foo
|
||||
rename foo {}
|
||||
} {}
|
||||
|
||||
test coroutine-7.7 {Bug 2486550} -setup {
|
||||
interp hide {} yield
|
||||
} -body {
|
||||
coroutine demo interp invokehidden {} yield ok
|
||||
} -cleanup {
|
||||
demo
|
||||
interp expose {} yield
|
||||
} -result ok
|
||||
|
||||
|
||||
# cleanup
|
||||
unset lambda
|
||||
|
||||
+91
-2
@@ -668,6 +668,24 @@ test dict-14.20 {dict for stack space compilation: bug 1903325} {
|
||||
concat "c=$y,$args"
|
||||
}} {} 1 2 3
|
||||
} {c=1,2 3}
|
||||
test dict-14.21 {compiled dict for and break} {
|
||||
apply {{} {
|
||||
dict for {a b} {c d e f} {
|
||||
lappend result $a,$b
|
||||
break
|
||||
}
|
||||
return $result
|
||||
}}
|
||||
} c,d
|
||||
test dict-14.22 {dict for and exception range depths: Bug 3614382} {
|
||||
apply {{} {
|
||||
dict for {a b} {c d} {
|
||||
dict for {e f} {g h} {
|
||||
return 5
|
||||
}
|
||||
}
|
||||
}}
|
||||
} 5
|
||||
# There's probably a lot more tests to add here. Really ought to use a
|
||||
# coverage tool for this job...
|
||||
|
||||
@@ -1586,7 +1604,7 @@ test dict-23.1 {dict compilation crash: Bug 3487626} {
|
||||
}
|
||||
}} [linenumber]}}
|
||||
} 5
|
||||
test dict-23.2 {dict compilation crash: Bug 3487626} knownBug {
|
||||
test dict-23.2 {dict compilation crash: Bug 3487626} {
|
||||
# Something isn't quite right in line number and continuation line
|
||||
# tracking; at time of writing, this test produces 7, not 5, which
|
||||
# indicates that the extra newlines in the non-script argument are
|
||||
@@ -1820,7 +1838,7 @@ test dict-24.20.1 {dict compilation crash: 'dict for' bug 3487626} {
|
||||
}
|
||||
}} [linenumber]}}
|
||||
} 5
|
||||
test dict-24.21 {dict compilation crash: 'dict for' bug 3487626} knownBug {
|
||||
test dict-24.21 {dict compilation crash: 'dict for' bug 3487626} {
|
||||
apply {{} {apply {n {
|
||||
set e {}
|
||||
set k {}
|
||||
@@ -1847,6 +1865,77 @@ j
|
||||
}
|
||||
}} [linenumber]}}
|
||||
} 5
|
||||
test dict-23.3 {CompileWord OBOE} {
|
||||
# segfault when buggy
|
||||
apply {{} {tcl::dict::lappend foo bar \
|
||||
[format baz]}}
|
||||
} {bar baz}
|
||||
test dict-23.4 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict set foo {*}{
|
||||
} [return [incr n -[linenumber]]] val
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.5 {CompileWord OBOE} {
|
||||
# segfault when buggy
|
||||
apply {{} {tcl::dict::incr foo \
|
||||
[format bar]}}
|
||||
} {bar 1}
|
||||
test dict-23.6 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict get {a b} {*}{
|
||||
} [return [incr n -[linenumber]]]
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.7 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict for {a b} [return [incr n -[linenumber]]] {*}{
|
||||
} {}
|
||||
}} [linenumber]
|
||||
} 2
|
||||
test dict-23.8 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict update foo {*}{
|
||||
} [return [incr n -[linenumber]]] x {}
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.9 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict exists {} {*}{
|
||||
} [return [incr n -[linenumber]]]
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.10 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict with foo {*}{
|
||||
} [return [incr n -[linenumber]]] {}
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.11 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict with ::foo {*}{
|
||||
} [return [incr n -[linenumber]]] {}
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.12 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict with {*}{
|
||||
} [return [incr n -[linenumber]]] {}
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.13 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict with {*}{
|
||||
} [return [incr n -[linenumber]]] {bar}
|
||||
}} [linenumber]
|
||||
} 1
|
||||
test dict-23.14 {CompileWord OBOE} {
|
||||
apply {n {
|
||||
dict with foo {*}{
|
||||
} [return [incr n -[linenumber]]] {bar}
|
||||
}} [linenumber]
|
||||
} 1
|
||||
|
||||
rename linenumber {}
|
||||
test dict-24.22 {dict map results (non-compiled)} {
|
||||
dict map {k v} [dict map {k v} {a 1 b 2 c 3 d 4} { list $v $k }] {
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ set printenvScript [makeFile {
|
||||
SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
|
||||
DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
|
||||
__CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
|
||||
CommonProgramFiles ProgramFiles
|
||||
CommonProgramFiles ProgramFiles CommonProgramW6432 ProgramW6432
|
||||
} {
|
||||
lrem names $name
|
||||
}
|
||||
@@ -121,7 +121,7 @@ foreach name [array names env] {
|
||||
SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
|
||||
DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
|
||||
SECURITYSESSIONID LANG WINDIR TERM
|
||||
CommonProgramFiles ProgramFiles
|
||||
CONNOMPROGRAMFILES PROGRAMFILES COMMONPROGRAMW6432 PROGRAMW6432
|
||||
}} {
|
||||
unset env($name)
|
||||
}
|
||||
|
||||
+153
-9
@@ -17,6 +17,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
|
||||
}
|
||||
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
customMatch pairwise {apply {{a b} {
|
||||
string equal [lindex $b 0] [lindex $b 1]
|
||||
}}}
|
||||
namespace eval ::tcl::test::error {
|
||||
if {[testConstraint memory]} {
|
||||
proc getbytes {} {
|
||||
@@ -179,6 +182,16 @@ test error-4.7 {errorstack via options dict } -body {
|
||||
catch {f 12} m d
|
||||
dict get $d -errorstack
|
||||
} -match glob -result {INNER * CALL {g 1212} CALL {f 12} UP 1}
|
||||
test error-4.8 {errorstack from exec traces} -body {
|
||||
proc foo args {}
|
||||
proc goo {} foo
|
||||
trace add execution foo enter {error bar;#}
|
||||
catch goo m d
|
||||
dict get $d -errorstack
|
||||
} -cleanup {
|
||||
rename goo {}; rename foo {}
|
||||
unset -nocomplain m d
|
||||
} -result {INNER {error bar} CALL goo UP 1}
|
||||
|
||||
# Errors in error command itself
|
||||
|
||||
@@ -314,6 +327,12 @@ test error-8.8 {throw syntax checks} -returnCodes error -body {
|
||||
test error-8.9 {throw syntax checks} -returnCodes error -body {
|
||||
throw {} foo
|
||||
} -result {type must be non-empty list}
|
||||
test error-8.10 {Bug 33b7abb8a2: throw stack usage} -returnCodes error -body {
|
||||
apply {code {throw $code foo}} {}
|
||||
} -result {type must be non-empty list}
|
||||
test error-8.11 {Bug 7174354ecb: throw error message} -returnCodes error -body {
|
||||
throw {not {}a list} x[]y
|
||||
} -result {list element in braces followed by "a" instead of space}
|
||||
|
||||
# simple try tests: body completes with code ok
|
||||
|
||||
@@ -601,21 +620,21 @@ test error-16.7 {try with variable assignment and propagation #2} {
|
||||
}
|
||||
list $em [dict get $opts -errorcode]
|
||||
} {bar FOO}
|
||||
test error-16.8 {exception chaining (try=ok, handler=error)} {
|
||||
test error-16.8 {exception chaining (try=ok, handler=error)} -body {
|
||||
#FIXME is the intent of this test correct?
|
||||
catch {
|
||||
try { list a b c } on ok {em opts} { throw BAR baz }
|
||||
} tryem tryopts
|
||||
string equal $opts [dict get $tryopts -during]
|
||||
} {1}
|
||||
test error-16.9 {exception chaining (try=error, handler=error)} {
|
||||
list $opts [dict get $tryopts -during]
|
||||
} -match pairwise -result equal
|
||||
test error-16.9 {exception chaining (try=error, handler=error)} -body {
|
||||
# The exception off the handler should chain to the exception off the
|
||||
# try-body (using the -during option)
|
||||
catch {
|
||||
try { throw FOO bar } trap {} {em opts} { throw BAR baz }
|
||||
} tryem tryopts
|
||||
string equal $opts [dict get $tryopts -during]
|
||||
} {1}
|
||||
list $opts [dict get $tryopts -during]
|
||||
} -match pairwise -result equal
|
||||
test error-16.10 {no exception chaining when handler is successful} {
|
||||
catch {
|
||||
try { throw FOO bar } trap {} {em opts} { list d e f }
|
||||
@@ -628,6 +647,131 @@ test error-16.11 {no exception chaining when handler is a non-error exception} {
|
||||
} tryem tryopts
|
||||
dict exists $tryopts -during
|
||||
} {0}
|
||||
test error-16.12 {compiled try with successfully executed handler} {
|
||||
apply {{} {
|
||||
try { throw FOO bar } trap FOO {} { list a b c }
|
||||
}}
|
||||
} {a b c}
|
||||
test error-16.13 {compiled try with exception (error) in handler} -body {
|
||||
apply {{} {
|
||||
try { throw FOO bar } trap FOO {} { throw BAR foo }
|
||||
}}
|
||||
} -returnCodes error -result {foo}
|
||||
test error-16.14 {compiled try with exception (return) in handler} -body {
|
||||
apply {{} {
|
||||
list [catch {
|
||||
try { throw FOO bar } trap FOO {} { return BAR }
|
||||
} msg] $msg
|
||||
}}
|
||||
} -result {2 BAR}
|
||||
test error-16.15 {compiled try with exception (break) in handler} {
|
||||
apply {{} {
|
||||
for { set i 5 } { $i < 10 } { incr i } {
|
||||
try { throw FOO bar } trap FOO {} { break }
|
||||
}
|
||||
return $i
|
||||
}}
|
||||
} {5}
|
||||
test error-16.16 {compiled try with exception (continue) in handler} {
|
||||
apply {{} {
|
||||
for { set i 5 } { $i < 10 } { incr i } {
|
||||
try { throw FOO bar } trap FOO {} { continue }
|
||||
incr i 20
|
||||
}
|
||||
return $i
|
||||
}}
|
||||
} {10}
|
||||
test error-16.17 {compiled try with variable assignment and propagation #1} {
|
||||
# Ensure that the handler variables preserve the exception off the
|
||||
# try-body, and are not modified by the exception off the handler
|
||||
apply {{} {
|
||||
catch {
|
||||
try { throw FOO bar } trap FOO {em} { throw BAR baz }
|
||||
}
|
||||
return $em
|
||||
}}
|
||||
} {bar}
|
||||
test error-16.18 {compiled try with variable assignment and propagation #2} {
|
||||
apply {{} {
|
||||
catch {
|
||||
try { throw FOO bar } trap FOO {em opts} { throw BAR baz }
|
||||
}
|
||||
list $em [dict get $opts -errorcode]
|
||||
}}
|
||||
} {bar FOO}
|
||||
test error-16.19 {compiled try exception chaining (try=ok, handler=error)} -body {
|
||||
#FIXME is the intent of this test correct?
|
||||
apply {{} {
|
||||
catch {
|
||||
try { list a b c } on ok {em opts} { throw BAR baz }
|
||||
} tryem tryopts
|
||||
list $opts [dict get $tryopts -during]
|
||||
}}
|
||||
} -match pairwise -result equal
|
||||
test error-16.20 {compiled try exception chaining (try=error, handler=error)} -body {
|
||||
# The exception off the handler should chain to the exception off the
|
||||
# try-body (using the -during option)
|
||||
apply {{} {
|
||||
catch {
|
||||
try { throw FOO bar } trap {} {em opts} { throw BAR baz }
|
||||
} tryem tryopts
|
||||
list $opts [dict get $tryopts -during]
|
||||
}}
|
||||
} -match pairwise -result equal
|
||||
test error-16.21 {compiled try exception chaining (try=error, finally=error)} {
|
||||
# The exception off the handler should chain to the exception off the
|
||||
# try-body (using the -during option)
|
||||
apply {{} {
|
||||
catch {
|
||||
try { throw FOO bar } finally { throw BAR baz }
|
||||
} tryem tryopts
|
||||
dict get $tryopts -during -errorcode
|
||||
}}
|
||||
} FOO
|
||||
test error-16.22 {compiled try: no exception chaining when handler is successful} {
|
||||
apply {{} {
|
||||
catch {
|
||||
try { throw FOO bar } trap {} {em opts} { list d e f }
|
||||
} tryem tryopts
|
||||
dict exists $tryopts -during
|
||||
}}
|
||||
} {0}
|
||||
test error-16.23 {compiled try: no exception chaining when handler is a non-error exception} {
|
||||
apply {{} {
|
||||
catch {
|
||||
try { throw FOO bar } trap {} {em opts} { break }
|
||||
} tryem tryopts
|
||||
dict exists $tryopts -during
|
||||
}}
|
||||
} {0}
|
||||
test error-16.24 {compiled try exception chaining (try=ok, handler=error, finally=error)} -body {
|
||||
apply {{} {
|
||||
catch {
|
||||
try {
|
||||
list a b c
|
||||
} on ok {em opts} {
|
||||
throw BAR baz
|
||||
} finally {
|
||||
throw DING dong
|
||||
}
|
||||
} tryem tryopts
|
||||
list $opts [dict get $tryopts -during -during]
|
||||
}}
|
||||
} -match pairwise -result equal
|
||||
test error-16.25 {compiled try exception chaining (all errors)} -body {
|
||||
apply {{} {
|
||||
catch {
|
||||
try {
|
||||
throw FOO bar
|
||||
} on error {em opts} {
|
||||
throw BAR baz
|
||||
} finally {
|
||||
throw DING dong
|
||||
}
|
||||
} tryem tryopts
|
||||
list $opts [dict get $tryopts -during -during]
|
||||
}}
|
||||
} -match pairwise -result equal
|
||||
|
||||
# try tests - finally
|
||||
|
||||
@@ -709,15 +853,15 @@ test error-18.5 {exception in finally doesn't affect variable assignment} {
|
||||
}
|
||||
list $em [dict get $opts -errorcode]
|
||||
} {bar FOO}
|
||||
test error-18.6 {exception chaining in finally (try=ok)} {
|
||||
test error-18.6 {exception chaining in finally (try=ok)} -body {
|
||||
catch {
|
||||
list a b c
|
||||
} em expopts
|
||||
catch {
|
||||
try { list a b c } finally { throw BAR foo }
|
||||
} em opts
|
||||
string equal $expopts [dict get $opts -during]
|
||||
} {1}
|
||||
list $expopts [dict get $opts -during]
|
||||
} -match pairwise -result equal
|
||||
test error-18.7 {exception chaining in finally (try=error)} {
|
||||
catch {
|
||||
try { throw FOO bar } finally { throw BAR baz }
|
||||
|
||||
+128
-6
@@ -14,6 +14,12 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
|
||||
namespace import -force ::tcltest::*
|
||||
}
|
||||
|
||||
# Used for constraining memory leak tests
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
if {[testConstraint memory]} {
|
||||
proc meminfo {} {lindex [split [memory info] "\n"] 3 3}
|
||||
}
|
||||
|
||||
# Basic "for" operation.
|
||||
|
||||
test for-1.1 {TclCompileForCmd: missing initial command} {
|
||||
@@ -345,7 +351,6 @@ proc formatMail {} {
|
||||
64 { UNIX (Solaris 2.* and SunOS, other systems soon to follow). Easy to install} \
|
||||
65 { binary packages are now for sale at the Sun Labs Tcl/Tk Shop. Check it out!} \
|
||||
}
|
||||
|
||||
set result ""
|
||||
set NL "
|
||||
"
|
||||
@@ -365,7 +370,6 @@ proc formatMail {} {
|
||||
} else {
|
||||
set break 1
|
||||
}
|
||||
|
||||
set xmailer 0
|
||||
set inheaders 1
|
||||
set last [array size lines]
|
||||
@@ -386,9 +390,7 @@ proc formatMail {} {
|
||||
set limit 55
|
||||
} else {
|
||||
set limit 55
|
||||
|
||||
# Decide whether or not to break the body line
|
||||
|
||||
if {$plen > 0} {
|
||||
if {[string first {> } $line] == 0} {
|
||||
# This is quoted text from previous message, don't reformat
|
||||
@@ -431,7 +433,7 @@ proc formatMail {} {
|
||||
set climit [expr $limit-1]
|
||||
set cutoff 50
|
||||
set continuation 0
|
||||
|
||||
|
||||
while {[string length $line] > $limit} {
|
||||
for {set c [expr $limit-1]} {$c >= $cutoff} {incr c -1} {
|
||||
set char [string index $line $c]
|
||||
@@ -824,7 +826,127 @@ test for-6.18 {Tcl_ForObjCmd: for command result} {
|
||||
1 {invoked "continue" outside of a loop} \
|
||||
]
|
||||
|
||||
|
||||
test for-7.1 {Bug 3614226: ensure that break cleans up the stack} memory {
|
||||
apply {{} {
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
for {set x 0} {$x < 5} {incr x} {
|
||||
list a b c [break] d e f
|
||||
}
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.2 {Bug 3614226: ensure that continue cleans up the stack} memory {
|
||||
apply {{} {
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
for {set x 0} {$x < 5} {incr x} {
|
||||
list a b c [continue] d e f
|
||||
}
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.3 {Bug 3614226: ensure that break cleans up the expansion stack} memory {
|
||||
apply {{} {
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
for {set x 0} {[incr x]<50} {} {
|
||||
puts {*}[puts a b c {*}[break] d e f]
|
||||
}
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.4 {Bug 3614226: ensure that continue cleans up the expansion stack} memory {
|
||||
apply {{} {
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
for {set x 0} {[incr x]<50} {} {
|
||||
puts {*}[puts a b c {*}[continue] d e f]
|
||||
}
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.5 {Bug 3614226: ensure that break cleans up the combination of main and expansion stack} memory {
|
||||
apply {{} {
|
||||
set l [lrepeat 50 p q r]
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
for {set x 0} {[incr x]<50} {} {
|
||||
puts [puts {*}$l {*}[puts a b c {*}$l {*}[break] d e f]]
|
||||
}
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.6 {Bug 3614226: ensure that continue cleans up the combination of main and expansion stack} memory {
|
||||
apply {{} {
|
||||
set l [lrepeat 50 p q r]
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
for {set x 0} {[incr x]<50} {} {
|
||||
puts [puts {*}$l {*}[puts a b c {*}$l {*}[continue] d e f]]
|
||||
}
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.7 {Bug 3614226: ensure that break only cleans up the right amount} memory {
|
||||
apply {{} {
|
||||
set l [lrepeat 50 p q r]
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
unset -nocomplain {*}[for {set x 0} {[incr x]<50} {} {
|
||||
puts [puts {*}$l {*}[puts a b c {*}$l {*}[break] d e f]]
|
||||
}]
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
test for-7.8 {Bug 3614226: ensure that continue only cleans up the right amount} memory {
|
||||
apply {{} {
|
||||
set l [lrepeat 50 p q r]
|
||||
# Can't use [memtest]; must be careful when we change stack frames
|
||||
set end [meminfo]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
unset -nocomplain {*}[for {set x 0} {[incr x]<50} {} {
|
||||
puts [puts {*}$l {*}[puts a b c {*}$l {*}[continue] d e f]]
|
||||
}]
|
||||
set tmp $end
|
||||
set end [meminfo]
|
||||
}
|
||||
expr {$end - $tmp}
|
||||
}}
|
||||
} 0
|
||||
|
||||
# cleanup
|
||||
::tcltest::cleanupTests
|
||||
return
|
||||
|
||||
# Local Variables:
|
||||
# mode: tcl
|
||||
# End:
|
||||
|
||||
@@ -254,6 +254,17 @@ test foreach-9.1 {compiled empty var list} {
|
||||
list [catch { foo } msg] $msg
|
||||
} {1 {foreach varlist is empty}}
|
||||
|
||||
test foreach-9.2 {line numbers} -setup {
|
||||
proc linenumber {} {dict get [info frame -1] line}
|
||||
} -body {
|
||||
apply {n {
|
||||
foreach x y {*}{
|
||||
} {return [incr n -[linenumber]]}
|
||||
}} [linenumber]
|
||||
} -cleanup {
|
||||
rename linenumber {}
|
||||
} -result 1
|
||||
|
||||
test foreach-10.1 {foreach: [Bug 1671087]} -setup {
|
||||
proc demo {} {
|
||||
set vals {1 2 3 4}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ proc httpdAccept {newsock ipaddr port} {
|
||||
fconfigure $newsock -blocking 0 -translation {auto crlf}
|
||||
httpd_log $newsock Connect $ipaddr $port
|
||||
set data(ipaddr) $ipaddr
|
||||
fileevent $newsock readable [list httpdRead $newsock]
|
||||
after 50 [list fileevent $newsock readable [list httpdRead $newsock]]
|
||||
}
|
||||
|
||||
# read data from a client request
|
||||
|
||||
+434
@@ -1961,6 +1961,440 @@ test info-9.13 {info level option, value in global context} -body {
|
||||
uplevel #0 {info level 2}
|
||||
} -returnCodes error -result {bad level "2"}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
catch {*}{
|
||||
{info frame 0}
|
||||
res
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.4 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 1968 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
dict for {a b} {c d} {*}{
|
||||
{set res [info frame 0]}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.5 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 1983 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
set d {a b}
|
||||
dict update d x y {*}{
|
||||
{set res [info frame 0]}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.6 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 1998 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
set d {}
|
||||
dict with d {*}{
|
||||
{set res [info frame 0]}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.7 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2013 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
for {*}{
|
||||
{set res [info frame 0]}
|
||||
{1} {} {break}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.8 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2027 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
for {*}{
|
||||
{} {1} {}
|
||||
{set res [info frame 0]; break}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.9 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2043 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
for {*}{
|
||||
{} {1}
|
||||
{return [info frame 0]}
|
||||
{}
|
||||
}
|
||||
}
|
||||
test info-33.10 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2058 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
for {*}{
|
||||
{}
|
||||
{[return [info frame 0]]}
|
||||
{} {}
|
||||
}
|
||||
}
|
||||
test info-33.11 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2073 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
foreach {*}{
|
||||
x
|
||||
} [return [info frame 0]] {}
|
||||
}
|
||||
test info-33.12 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2088 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
foreach {*}{
|
||||
x y
|
||||
{set res [info frame 0]}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.13 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2101 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
if {*}{
|
||||
{[return [info frame 0]]}
|
||||
{}
|
||||
}
|
||||
}
|
||||
test info-33.14 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2115 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
if 0 {*}{
|
||||
{} else
|
||||
{return [info frame 0]}
|
||||
}
|
||||
}
|
||||
test info-33.15 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2130 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
incr {*}{
|
||||
x
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.16 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2144 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
info level {*}{
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.17 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2156 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
string match {*}{
|
||||
} [return [info frame 0]] {}
|
||||
}
|
||||
test info-33.18 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2168 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
string match {*}{
|
||||
{}
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.19 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2181 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
string length {*}{
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.20 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2193 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
while {*}{
|
||||
{[return [info frame 0]]}
|
||||
} {}
|
||||
}
|
||||
test info-33.21 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2205 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
switch -- {*}{
|
||||
} [return [info frame 0]] {*}{
|
||||
} x y
|
||||
}
|
||||
test info-33.22 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2218 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {*}{
|
||||
{set res [info frame 0]}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
test info-33.23 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2231 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {*}{
|
||||
{set res [info frame 0]}
|
||||
} finally {}
|
||||
return $res
|
||||
}
|
||||
test info-33.24 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2245 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {*}{
|
||||
{set res [info frame 0]}
|
||||
} on ok {} {}
|
||||
return $res
|
||||
}
|
||||
test info-33.25 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2259 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {*}{
|
||||
{set res [info frame 0]}
|
||||
} on ok {} {} finally {}
|
||||
return $res
|
||||
}
|
||||
test info-33.26 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2273 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
while 1 {*}{
|
||||
{return [info frame 0]}
|
||||
}
|
||||
}
|
||||
test info-33.27 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2287 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {} finally {*}{
|
||||
{return [info frame 0]}
|
||||
}
|
||||
}
|
||||
test info-33.28 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2300 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {} on ok {} {} finally {*}{
|
||||
{return [info frame 0]}
|
||||
}
|
||||
}
|
||||
test info-33.29 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2313 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {} on ok {} {*}{
|
||||
{return [info frame 0]}
|
||||
}
|
||||
}
|
||||
test info-33.30 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2326 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
try {} on ok {} {*}{
|
||||
{return [info frame 0]}
|
||||
} finally {}
|
||||
}
|
||||
test info-33.31 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2339 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
binary format {*}{
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.32 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2352 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
set format format
|
||||
binary $format {*}{
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.33 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2365 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
append x {*}{
|
||||
} [return [info frame 0]]
|
||||
}
|
||||
test info-33.34 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2377 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
namespace eval foo {}
|
||||
proc foo::bar {} {
|
||||
append {*}{
|
||||
} x([return [info frame 0]]) {*}{
|
||||
} a
|
||||
}
|
||||
test info-33.35 {{*}, literal, simple, bytecompiled} -body {
|
||||
reduce [foo::bar]
|
||||
} -cleanup {
|
||||
namespace delete foo
|
||||
} -result {type source line 2389 file info.test cmd {info frame 0} proc ::foo::bar level 0}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
unset -nocomplain res
|
||||
|
||||
|
||||
@@ -1599,6 +1599,20 @@ test interp-20.50 {Bug 2486550} -setup {
|
||||
} -cleanup {
|
||||
interp delete slave
|
||||
} -returnCodes error -match glob -result *
|
||||
test interp-20.50.1 {Bug 2486550} -setup {
|
||||
interp create slave
|
||||
} -body {
|
||||
slave hide coroutine
|
||||
catch {slave invokehidden coroutine} m o
|
||||
dict get $o -errorinfo
|
||||
} -cleanup {
|
||||
unset -nocomplain m 0
|
||||
interp delete slave
|
||||
} -returnCodes ok -result {wrong # args: should be "coroutine name cmd ?arg ...?"
|
||||
while executing
|
||||
"coroutine"
|
||||
invoked from within
|
||||
"slave invokehidden coroutine"}
|
||||
|
||||
test interp-21.1 {interp hidden} {
|
||||
interp hidden {}
|
||||
|
||||
+1
-6
@@ -59,12 +59,7 @@ test misc-1.2 {error in variable ref. in command in array reference} {
|
||||
missing close-brace for variable name
|
||||
missing close-brace for variable name
|
||||
while executing
|
||||
"set tst $a([winfo name $\{zz)
|
||||
# this is a bogus comment
|
||||
# this is a bogus comment
|
||||
# this is a bogus comment
|
||||
# this is a bogus comment
|
||||
# this is a ..."
|
||||
"set tst $a([winfo name $\{"
|
||||
(procedure "tstProc" line 4)
|
||||
invoked from within
|
||||
"tstProc"}]
|
||||
|
||||
+131
-2
@@ -2,12 +2,12 @@
|
||||
# Sourcing this file into Tcl runs the tests and generates output for errors.
|
||||
# No output means no errors were found.
|
||||
#
|
||||
# Copyright (c) 2006-2012 Donal K. Fellows
|
||||
# Copyright (c) 2006-2013 Donal K. Fellows
|
||||
#
|
||||
# See the file "license.terms" for information on usage and redistribution of
|
||||
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require TclOO 1.0
|
||||
package require TclOO 1.0.1
|
||||
package require tcltest 2
|
||||
if {"::tcltest" in [namespace children]} {
|
||||
namespace import -force ::tcltest::*
|
||||
@@ -936,6 +936,69 @@ test oo-6.18 {Bug 3408830: more forwarding cases} -setup {
|
||||
} -returnCodes error -cleanup {
|
||||
fooClass destroy
|
||||
} -result {wrong # args: should be "::foo len string"}
|
||||
test oo-6.19 {Bug 3610404: forwarding resolution + traces} -setup {
|
||||
oo::object create foo
|
||||
unset -nocomplain ::result
|
||||
set ::result {}
|
||||
} -body {
|
||||
proc ::my {method} {lappend ::result global}
|
||||
oo::objdefine foo {
|
||||
method target {} {lappend ::result instance}
|
||||
forward bar my target
|
||||
method bump {} {
|
||||
set ns [info object namespace ::foo]
|
||||
rename ${ns}::my ${ns}::
|
||||
rename ${ns}:: ${ns}::my
|
||||
}
|
||||
}
|
||||
proc harness {} {
|
||||
foo target
|
||||
foo bar
|
||||
foo target
|
||||
}
|
||||
trace add execution harness enterstep {apply {{cmd args} {foo bump}}}
|
||||
foo target
|
||||
foo bar
|
||||
foo bump
|
||||
foo bar
|
||||
harness
|
||||
} -cleanup {
|
||||
catch {rename harness {}}
|
||||
catch {rename ::my {}}
|
||||
foo destroy
|
||||
} -result {instance instance instance instance instance instance}
|
||||
test oo-6.20 {Bug 3610404: forwarding resolution + traces} -setup {
|
||||
oo::class create fooClass
|
||||
fooClass create foo
|
||||
unset -nocomplain ::result
|
||||
set ::result {}
|
||||
} -body {
|
||||
proc ::my {method} {lappend ::result global}
|
||||
oo::define fooClass {
|
||||
method target {} {lappend ::result class}
|
||||
forward bar my target
|
||||
method bump {} {
|
||||
set ns [info object namespace [self]]
|
||||
rename ${ns}::my ${ns}::
|
||||
rename ${ns}:: ${ns}::my
|
||||
}
|
||||
}
|
||||
proc harness {} {
|
||||
foo target
|
||||
foo bar
|
||||
foo target
|
||||
}
|
||||
trace add execution harness enterstep {apply {{cmd args} {foo bump}}}
|
||||
foo target
|
||||
foo bar
|
||||
foo bump
|
||||
foo bar
|
||||
harness
|
||||
} -cleanup {
|
||||
catch {rename harness {}}
|
||||
catch {rename ::my {}}
|
||||
fooClass destroy
|
||||
} -result {class class class class class class}
|
||||
|
||||
test oo-7.1 {OO: inheritance 101} -setup {
|
||||
oo::class create superClass
|
||||
@@ -1776,6 +1839,36 @@ test oo-15.9 {ensemble rewriting must not bleed through oo::copy} -setup {
|
||||
} -returnCodes error -cleanup {
|
||||
Foo destroy
|
||||
} -result {wrong # args: should be "::bar <cloned> a b"}
|
||||
test oo-15.10 {variable binding must not bleed through oo::copy} -setup {
|
||||
oo::class create FooClass
|
||||
set result {}
|
||||
} -body {
|
||||
set obj1 [FooClass new]
|
||||
oo::objdefine $obj1 {
|
||||
variable var
|
||||
method m {} {
|
||||
set var foo
|
||||
}
|
||||
method get {} {
|
||||
return $var
|
||||
}
|
||||
export eval
|
||||
}
|
||||
|
||||
$obj1 m
|
||||
lappend result [$obj1 get]
|
||||
set obj2 [oo::copy $obj1]
|
||||
$obj2 eval {
|
||||
set var bar
|
||||
}
|
||||
lappend result [$obj2 get]
|
||||
$obj1 eval {
|
||||
set var grill
|
||||
}
|
||||
lappend result [$obj1 get] [$obj2 get]
|
||||
} -cleanup {
|
||||
FooClass destroy
|
||||
} -result {foo bar grill bar}
|
||||
|
||||
test oo-16.1 {OO: object introspection} -body {
|
||||
info object
|
||||
@@ -3374,6 +3467,42 @@ test oo-34.8 {TIP 380: slots - presence} {
|
||||
test oo-34.9 {TIP 380: slots - presence} {
|
||||
getMethods oo::objdefine::variable
|
||||
} {{-append -clear -set} {Get Set}}
|
||||
|
||||
test oo-35.1 {Bug 9d61624b3d: Empty superclass must not cause crash} -setup {
|
||||
oo::class create fruit {
|
||||
method eat {} {}
|
||||
}
|
||||
set result {}
|
||||
} -body {
|
||||
lappend result [fruit create ::apple] [info class superclasses fruit]
|
||||
oo::define fruit superclass
|
||||
lappend result [info class superclasses fruit] \
|
||||
[info object class apple oo::object] \
|
||||
[info class call fruit destroy] \
|
||||
[catch { apple }]
|
||||
} -cleanup {
|
||||
unset -nocomplain result
|
||||
fruit destroy
|
||||
} -result {::apple ::oo::object ::oo::object 1 {{method destroy ::oo::object {core method: "destroy"}}} 1}
|
||||
test oo-35.2 {Bug 9d61624b3d: Empty superclass must not cause crash} -setup {
|
||||
oo::class create fruitMetaclass {
|
||||
superclass oo::class
|
||||
method eat {} {}
|
||||
}
|
||||
set result {}
|
||||
} -body {
|
||||
lappend result [fruitMetaclass create ::appleClass] \
|
||||
[appleClass create orange] \
|
||||
[info class superclasses fruitMetaclass]
|
||||
oo::define fruitMetaclass superclass
|
||||
lappend result [info class superclasses fruitMetaclass] \
|
||||
[info object class appleClass oo::class] \
|
||||
[catch { orange }] [info object class orange] \
|
||||
[appleClass create pear]
|
||||
} -cleanup {
|
||||
unset -nocomplain result
|
||||
fruitMetaclass destroy
|
||||
} -result {::appleClass ::orange ::oo::class ::oo::class 1 1 ::appleClass ::pear}
|
||||
|
||||
cleanupTests
|
||||
return
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution of
|
||||
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require TclOO 1.0
|
||||
package require TclOO 1.0.1
|
||||
package require tcltest 2
|
||||
if {"::tcltest" in [namespace children]} {
|
||||
namespace import -force ::tcltest::*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user