Compare commits

...
298 Commits
Author SHA1 Message Date
dgp 1ddabb17f9 Support TCL_ENCODING_CHAR_LIMIT in TableToUtfProc and EscapeToUtfProc drivers. 2014-12-23 17:53:21 +00:00
dgp a3babfe12a Support TCL_ENCODING_CHAR_LIMIT in the Iso88591ToUtfProc driver. 2014-12-23 17:48:36 +00:00
dgp b6fecacc22 Support TCL_ENCODING_CHAR_LIMIT in the UnicodeToUtfProc driver. 2014-12-23 17:46:05 +00:00
dgp 360b5c41ee Support TCL_ENCODING_CHAR_LIMIT in the UtfToUtfProc driver. 2014-12-23 17:26:07 +00:00
dgp 5a6443d00e Support TCL_ENCODING_CHAR_LIMIT in the BinaryProc driver. 2014-12-23 17:13:13 +00:00
dgp 7134cd9399 Use the new TCL_ENCODING_CHAR_LIMIT flag to have the encoding system manage
the max chars to read constraint.
2014-12-23 16:57:02 +00:00
dgp 1a92fb378c merge trunk 2014-12-23 03:11:01 +00:00
dgp ef6f1ba2c3 Use more suitable variable name pushers. 2014-12-23 02:41:54 +00:00
dgp b0078c8129 Eliminate TclIsLocalScalar(). No callers left. 2014-12-23 02:12:59 +00:00
dgp 49e7d0262b Revise CompileEachloopCmd() to use LocalScalar() in place of TclIsLocalScalar(). 2014-12-23 01:28:30 +00:00
dgp 2cbec4bf44 Convert the LocalScalar*() macros to rest on TclPushVarName rather than on
TclIsLocalScalar().
2014-12-22 20:27:14 +00:00
dgp 7ac39417f1 Use (interp == NULL) argument to TclPushVarName() to signal that no compiling
is desired.  Only a lookup of an index into the compiled variable table.
2014-12-22 20:13:29 +00:00
dgp 3faf4cc3b8 More complete use of the TCL_NO_ELEMENT flag to suppress useless actions. 2014-12-22 19:57:36 +00:00
dgp 9f699d22a2 merge mark 2014-12-22 17:12:50 +00:00
dgp 13667e8096 One more (interp==NULL) shortcut. 2014-12-22 15:35:47 +00:00
dgp 51f7688e96 merge-mark. The compiler machinery has changed too much for any hope for
a successful merge.  TclIsLocalScalar() elimination will need to be done
on trunk as an independent effort.
2014-12-19 17:57:04 +00:00
dgp f6d6b394eb Revise name and interface of new utility routines to match work already
in place on the trunk.
2014-12-19 17:09:32 +00:00
dgp 7e44dabec3 [e711ffb458] Eliminate TclIsLocalScalar() and revise all callers to use
more appropriate facilities.
2014-12-19 16:09:20 +00:00
dgp cfefe7127b New utility routine GetLocalScalarIndex() reduces common caller boilerplate
(and fixes a bug!)
2014-12-19 15:55:21 +00:00
dgp 2613112a13 Use interp==NULL argument to PushVarName to signal that only an index into
the CLT is sought, and no time should be wasted compiling other cases which
the caller is just going to discard.
2014-12-19 15:13:11 +00:00
dgp 18131f9c09 With no callers left, TclIsLocalScalar() is removed. 2014-12-19 14:21:42 +00:00
dgp baf649278a Replace TclIsLocalScalar() with PushVarNameWord() in [dict for] compiler. 2014-12-19 14:17:03 +00:00
dgp 88ec3c9772 Narrow scope of numVars. 2014-12-19 03:31:09 +00:00
dgp ad19550909 A bit more tidying... 2014-12-18 22:25:27 +00:00
dgp aed72bee30 No need for a loopIndex. 2014-12-18 22:13:11 +00:00
dgp f65cb994d8 No need for varvList any more. 2014-12-18 22:00:08 +00:00
dgp 893c9c7302 Fix up the token array passed to PushVarNameWord. Remove string list parse. 2014-12-18 21:29:07 +00:00
dgp 24817641b1 Replace use of TclIsLocalScalar() and late setting of varIndexes with an
earlier setting of varIndexes using PushVarNameWord().
2014-12-18 21:08:53 +00:00
dgp 89e6a65411 Simplify creation and storage of temporaries 2014-12-18 20:38:53 +00:00
dgp f664d633e6 With that shift, varcList is no longer needed. 2014-12-18 20:34:12 +00:00
dgp d56e61b246 Shift the allocation of AuxData earlier in the [foreach] compiler. 2014-12-18 19:21:31 +00:00
dgp 8dd58baa04 merge 8.5 2014-12-18 18:16:10 +00:00
dgp 559113cc4c [7c187a3773] Fix error in managing inStatePtr->inQueueTail value in the
byte-moving optimized path of [chan copy].  Thanks to Benno.
2014-12-18 18:06:51 +00:00
dgp 5dafefe112 [af08e89777] Rework finalization to stop encoding-24.2 segfault. 2014-12-18 14:38:26 +00:00
dgp 955507f635 Rework the *FinalizeThread*() routines so that the quick exit preference
is respected without need to run afoul of encoding finalizations.
tests pass now.  All changes are fully internal.
2014-12-17 20:47:58 +00:00
dgp e942227f6e Revise encoding finalization so that it does a more complete job of restoring
the pre-initialized state.  This makes finalization errors more repeatable
and cross-platform.
2014-12-17 19:57:40 +00:00
oehhar 68b5780dde changes for TIP427 2014-12-17 11:21:16 +00:00
oehhar 3b7664e77f Include option -connecting in test iocmd-8.15.1 2014-12-17 08:42:24 +00:00
oehhar b47b88af9b TIP-427: make "fconfigure $h -connecting" official (client sockets only) 2014-12-17 08:24:33 +00:00
oehhar d7a9d63520 Documented "fconfigure $h -connecting" on socket man page 2014-12-17 08:22:23 +00:00
oehhar f716d8815b Merge trunk 2014-12-17 07:53:41 +00:00
jan.nijtmans 4e0313afe2 85 -> 86 2014-12-15 10:20:39 +00:00
jan.nijtmans d9b30b94b8 merge-mark 2014-12-14 12:13:30 +00:00
Kevin Walzer 2f8ea1be7c Add header install flag to OS X GNUMakefile; thanks to Stephan Houben for patch 2014-12-13 02:50:07 +00:00
Kevin Walzer 59cb45cc16 Add header install flag to OS X GNUMakefile; thanks to Stephan Houben for patch 2014-12-13 02:47:25 +00:00
dgp ee5c231ff5 Similar conversion of the [dict append] compiler. 2014-12-11 16:00:19 +00:00
dgp 604faa265f Similar conversion for [dict update] compiler. 2014-12-11 15:45:16 +00:00
dgp 8e80c62f6f Similar revisions to [dict incr] compiler. 2014-12-11 15:19:38 +00:00
dgp a417c667a5 Get the word number right, even though it has no effect. 2014-12-11 14:41:09 +00:00
dgp 26326004c6 [e711ffb458] Same conversion for [catch] compiler. 2014-12-11 14:40:02 +00:00
venkat 0318c256ed merge tzdata2014j from ietf.org 2014-12-10 00:37:24 +00:00
venkat 704532c57a tzdata2014j from ietf.org 2014-12-10 00:35:37 +00:00
dgp 2d415cbf59 [e711ffb458] Replace TclIsLocalScalar() with PushVarNameWord() in the
compiler for [dict set].
2014-12-09 20:45:30 +00:00
dgp 916f1716f3 [e711ffb458] Replace TclIsLocalScalar() (which does the wrong thing).... with
PushVarNameWord() (which doesn't) in the compiler for [dict lappend].
2014-12-09 20:29:09 +00:00
jan.nijtmans d297273a13 Fix some gcc compiler warnings (probably cygwin-only) 2014-12-08 16:10:00 +00:00
jan.nijtmans b27238fbbb Fix some gcc compiler warnings (probably cygwin-only) 2014-12-08 16:05:19 +00:00
oehhar 7466351c90 test for bug [c6ed4acfd8]: running async socket connect with other connect established will block tcl as it goes in an infinite loop in vwait 2014-12-07 12:17:24 +00:00
ashok 58bde2cb77 Potential fix for [c6ed4acfd8].
Simple typo in original fix for [336441ed59]. Was looping on
statePtr->next instead of statePtr2->next. Would result in
an infinite loop. Definitely a bug but whether it completely
fixes the above in all cases needs to be tested.
2014-12-06 11:19:32 +00:00
dgp 40420634aa Ever since (Tcl)PushVarName() stopped making a recursive call to Tcl_ParseCommand() (in the pre-8.4.0 timeframe), there's been no need for special protections for brace-quoted varname words. A simple word is a simple word is a simple word. 2014-12-05 21:28:00 +00:00
dgp b52476a5cd Ever since (Tcl)PushVarName() stopped making a recursive call to
Tcl_ParseCommand() (in the pre-8.4.0 timeframe), there's been no need
for special protections for brace-quoted varname words.  A simple word
is a simple word is a simple word.
2014-12-05 21:05:17 +00:00
dgp bc8ffb3922 [d2ffcca163] Limit parsing results that are documented to accept only ASCII chars to actually follow that constraint. This requires not trusting isalnum(.) and isalpha(.) to deliver portable identical results. 2014-12-05 12:28:01 +00:00
dgp bfb321eb38 [d2ffcca163] Limit parsing results that are documented to accept only
ASCII chars to actually follow that constraint.  This requires not trusting
isalnum(.) and isalpha(.) to deliver portable identical results.
2014-12-04 22:10:57 +00:00
dgp 5c1b9fefdf Limit isalpha(.) calls in the expr parser to only apply to known ASCII
arguments to make the results portable.
2014-12-04 21:29:18 +00:00
dgp 6d936db4a3 The isalpha(.) calls remaining in the expr parser still bring nonportability.
Commit a test that demonstrates that.
2014-12-04 20:45:11 +00:00
dgp dd4c175c81 Stop using isalnum(.). Its results are not portable. Replace with our
own private routine TclIsBareword() that does exactly what we want.
2014-12-04 18:26:31 +00:00
dgp 29b10229de merge 8.5 2014-12-04 13:02:43 +00:00
dgp bff00baca2 And then another merge mark to finish. 2014-12-03 23:55:39 +00:00
dgp 7dfd9c5a96 Now make the patch by hand that fossil could not merge. 2014-12-03 23:54:16 +00:00
dgp 05971adca4 Just a merge mark since fossil cannot do it right. 2014-12-03 23:51:36 +00:00
dgp 2f3edeea43 [0c043a175] backport fix from trunk. 2014-12-03 23:46:51 +00:00
Miguel Sofer 0c0be35710 missing unset in new test 2014-12-03 23:34:36 +00:00
Miguel Sofer 137e142be2 fix var($) problem, bug [0c043a175] (thx dgp) 2014-12-03 23:27:45 +00:00
Miguel Sofer 8694763c10 test and fix (thx dgp) 2014-12-03 23:17:16 +00:00
dkf 58cd08bb7d [0dca3bfa8f] Strengthen validity checks on fast-path string comparison. 2014-12-03 23:05:15 +00:00
Miguel Sofer 730a9a132c adding a test for the bug 2014-12-03 13:22:53 +00:00
andreask d7cf041bab Fix missing export of the "NewForeachInfoType" AuxData structure for tbcload/tclcompiler packages. 2014-12-01 20:17:04 +00:00
dgp 03f0d60f88 Same issue in expr parser also tested and fixed. 2014-11-26 17:00:55 +00:00
dgp 92402afe21 I like this patch better. Retain the byte orientation of the parser. 2014-11-26 16:22:40 +00:00
dgp d9465a5be2 One way to fix the parser of $-substitution accepting non-ASCII varnames. 2014-11-25 21:24:06 +00:00
dgp 52bcb866e5 merge trunk 2014-11-24 03:11:23 +00:00
dgp 7f5ddf43ee [e087812465] Trim back operatorStrings array to just the entries that are needed. Trims away the part of the array that was out of sync with the opcodes. 2014-11-24 03:08:50 +00:00
dgp 484de8b987 [e087812465] Trim back operatorStrings array to just the entries that are
needed.  Trims away the part of the array that was out of sync with the opcodes.
2014-11-24 03:00:03 +00:00
jan.nijtmans 2b3e403550 Fix [743338466549f09e3956d8a86e6f9a8030f227cb|7433384665]: socket error encoding bug. 2014-11-21 13:05:31 +00:00
dgp fa8d5668aa merge trunk 2014-11-17 13:00:42 +00:00
dgp 24d57ad4ff Add to Tcl_ExternalToUtf() a capability to impose a limit on the number
of chars produce in the encoding result.  When the flag
TCL_ENCODING_CHAR_LIMIT is set and dstCharsPtr is not NULL, then the
initial value of *dstCharsPtr is taken as the max number of chars to produce.
The limit is imposed in a way that does not require the assistance of the
encoding's driver procs, but the flag is passed on to them in case they
can do better when they know they should.  No callers updated yet.
No drivers updated yet.

One difficulty is that this necessarily imposes a pre-translation limit,
and the I/O system has a history of wanting to impose only a post-translation
limit.
2014-11-15 21:46:19 +00:00
dgp 3185389da2 With no padding needed for a terminating NUL, there no need for a distinction
between the dstNeeded and dstLimit values.
2014-11-15 21:13:52 +00:00
dgp 164250cf86 Tcl_ExternalToUtf appends a terminating NUL to its encoded results.
Perhaps this is a welcome convenience for some callers, but not for Tcl's
I/O system, which has no need for that.  Added a new flag value
TCL_ENCODING_NO_TERMINATE that callers can use to suppress this behavior.
This means buffers don't require so much padding, and a tiny bit of processing
is saved.  Update I/O callers to use the feature.
2014-11-15 21:08:57 +00:00
jan.nijtmans 9c2149012b Remove a number of eol-spaces. No change in functionality. 2014-11-14 09:44:34 +00:00
jan.nijtmans 6e056b1e14 Simplify NativeIsComPort() implementation: native paths never end in ':', and never use forward slashes (any more), so no need to check for that. 2014-11-13 16:08:47 +00:00
jan.nijtmans 99ee3e86d7 Improve documentation on the use of com ports (remove references to Windows 95, deprecate the use of postfix ':').
Allow lpt[5-9] just as com[5-9], and make sure that path normalization works as expected for ports > 4.
2014-11-13 12:52:29 +00:00
jan.nijtmans 3bbc2317b3 Improve documentation on the use of com ports (remove references to Windows 95, deprecate the use of postfix ':').
Allow lpt[5-9] just as com[5-9], and make sure that path normalization works as expected for ports > 4.
2014-11-13 12:29:04 +00:00
dgp 7d10d699c7 merge release 2014-11-12 04:35:37 +00:00
dgp 620cf6fa02 Likely fix for channel mem leaks. 2014-11-11 22:23:57 +00:00
dkf 98e4ac55d2 [214cc0eb22] Add tests to make sure that this bug stays fixed. 2014-11-08 07:06:52 +00:00
dgp eb64ed3cf0 Correct -singleproc 1 testing flaws. 2014-11-07 17:48:31 +00:00
dgp 5e0d1d6bc5 update changes; more test suite polishing. 2014-11-07 14:10:23 +00:00
dgp 7565b9ff1e Make sure all uses of the [testbytestring] command are constrained. 2014-11-07 13:59:27 +00:00
andreask 10dc783c93 Merged latest trunk work (especially changes to eof handling) into the RC. 2014-11-06 18:38:36 +00:00
dgp 0c027bb706 cleanup global namespace litter 2014-11-06 17:34:40 +00:00
dgp c658976cc3 [5adc350683] Stop Tcl forcing EOF condition on channels to be permanent. It may be fleeting, and all parts of Tcl channel ecosystem have to deal with that. New assertions and tests to keep us on track. 2014-11-06 16:34:03 +00:00
dgp 1db5ff8c2c [5adc350683] Stop Tcl forcing EOF condition on channels to be permanent.
It may be fleeting, and all parts of Tcl channel ecosystem have to deal
with that.  New assertions and tests to keep us on track.
2014-11-06 16:24:02 +00:00
dgp fbba7d0b1e merge iogt fixes. 2014-11-06 16:20:44 +00:00
dgp 559b8ab9de Also test transfroms that delay. 2014-11-06 16:12:26 +00:00
dgp 60ef43cb8c fix failing test 2014-11-06 15:49:30 +00:00
dgp 5c6717b7d5 New test iogt-7.0 demos bug in [testchannel transform]. 2014-11-06 15:06:52 +00:00
dgp 2f8dae1cec Another test checking that handling when transform returns nothing is right. 2014-11-06 14:52:36 +00:00
dgp dac552ac0b New tests iortrans-4.11* demonstrate what was wrong with the "leaky EOF flag"
approach in 8.6.1 and earlier.  If each level of the channel stack is to have
control over its EOF independently, we have to provide for that, even though
the Filesystem read APIs make it a big pain.  Also test robustness against
varing buffer sizes.
2014-11-06 13:38:01 +00:00
dgp 53ae611583 Reflected Transform channel fix. Be sure each EOF on the base channel gets
passed up to become an eof of the transform before continuing on to additional
ReadRaw() from the base channel.  This way we don't miss fleeting EOFs.
2014-11-05 20:34:03 +00:00
dgp 57de194b09 New test iortrans-4.10 to demo failure of channel transformation to handle
fleeting EOF in the base channel.  Falls into infinite block.  Regression
compared with Tcl 8.6.1.
2014-11-05 16:47:00 +00:00
dgp 5204910c12 merge trunk 2014-11-05 16:39:16 +00:00
dgp 71d27bd9c6 [214cc0eb22] Restore [lappend $var] return value to the 8.6.1- behavior.
If this is going to change, lets not do it by accident.
2014-11-05 06:36:07 +00:00
dgp 3fa4ffc77a Make sure reflected channels do not make a double call to Tcl_ReadRaw(),
with the unwarranted assumption that EOF is a permanent condition.
2014-11-03 21:37:37 +00:00
dgp d2b69b306e Same patch re-enabling read after EOF, but here applied to 8.6.
Likely additional changes needed in the other channel transforms new in 8.6.
2014-11-03 21:04:24 +00:00
dgp db9946ccc3 merge 8.5 2014-11-03 20:54:12 +00:00
dgp cb0895755d [5adc350683] Reworked the management of the EOF states to re-enable the
ability to read beyond EOF.  Plenty of assert()s to keep thing from going
off track again.
2014-11-03 20:39:25 +00:00
jan.nijtmans b14c2f49d2 Add test-case for previous commit, which shows that when trying to open a filename with invalid characters gives the right error-message. (same bug existed on UNIX too, which is now fixed) 2014-11-03 12:54:25 +00:00
jan.nijtmans 48ab03f3cd Add test-case for previous commit, which shows that when trying to open a filename with invalid characters gives the right error-message. (same bug existed on UNIX too, which is now fixed) 2014-11-03 12:44:55 +00:00
jan.nijtmans de82a1a99e Better errormessage when file path contains invalid characters. 2014-11-03 10:23:06 +00:00
jan.nijtmans 7ec17e20d3 Better errormessage when file path contains invalid characters. See: [03414f517b7a74]. 2014-11-03 10:14:48 +00:00
dgp d95273cf0e Disable assertion until tls bug it detects is fixed. 2014-11-01 14:52:55 +00:00
jan.nijtmans f87735c127 Extend WinIsReserved() to recognize COM[5-9]: as valid com ports as well. Prevent possible buffer-overflow if COM name ends with ':'. 2014-10-31 11:14:24 +00:00
jan.nijtmans 1e769e4b57 Extend WinIsReserved() to recognize COM[5-9]: as valid com ports as well. 2014-10-31 10:57:25 +00:00
jan.nijtmans a8dc863399 When translating a reserved devicename to native pathname, strip ':' postfix. Possible fix for [dcc03414f5], but anyway a good idea. 2014-10-31 10:20:03 +00:00
jan.nijtmans 476a68cbe5 When translating a reserved devicename to native pathname, strip ':' postfix. Possible fix for [dcc03414f5], but anyway a good idea. 2014-10-31 09:59:36 +00:00
dgp 54d2883694 Base test for [5adc350683]. 2014-10-29 14:54:11 +00:00
dgp 5a9b116846 merge 8.5 2014-10-29 13:49:46 +00:00
dgp df4391e23f Work in progress restoring ability to [read] after [eof] and get non-empty
strings back in those cases where the channel has them to offer.  Also
working through all the implications of this possibility on Tcl's more
exotic channel features, like stacking.
2014-10-28 20:10:32 +00:00
dgp 717a98747d merge trunk 2014-10-28 13:06:56 +00:00
jan.nijtmans 915359ddce Support for Windows 10 2014-10-26 07:53:23 +00:00
jan.nijtmans 999c88ea06 Support for Windows 10 2014-10-26 07:51:22 +00:00
dgp 790fed46bb merge mark 2014-10-24 20:10:39 +00:00
dgp da01ebeabe merge release 2014-10-24 20:07:52 +00:00
dgp 91d5ac9d0b by request 2014-10-22 14:46:33 +00:00
dgp adff5bc1c6 merge trunk 2014-10-18 22:43:06 +00:00
dgp eee56ee95a update changes 2014-10-18 20:11:36 +00:00
dgp 9cf7e2a336 merge 8.5 2014-10-18 20:06:02 +00:00
dgp 93082a74a2 [10dc6daa37] New fix for [gets] on non-blocking channel. This time properly accounts for the effects of ENCODING_LINESIZE. 2014-10-18 20:03:08 +00:00
dgp 9f2c3815f7 [10dc6daa37] New fix for [gets] on non-blocking channel. This time
properly accounts for the effects of ENCODING_LINESIZE.
2014-10-18 19:50:19 +00:00
dgp 592ab670f3 [10dc6daa37] [gets] on a non-blocking channel must take care so that
1) At least one call to the channel driver input proc gets made.
       Failure to do this locks up the channel - catastrophic FAIL. 
    2) After any driver call reports BLOCKED, don't call again.
       This is less serious, but FAILs to respect the non-blocking setting.
Code corrections and tests included, to restore 8.5.15 compat.
2014-10-17 15:20:34 +00:00
oehhar c0e8db49d5 fconfigure -peername and -sockname return empty string while async connect running. 2014-10-17 12:52:15 +00:00
oehhar d7604e5728 New tests: 14.16: -peername empty while async connect running, 14.17: -sockname 2014-10-17 12:28:55 +00:00
oehhar 8e5b3b87a5 Merge trunk 2014-10-17 10:00:39 +00:00
dgp d31d858702 Bump to Tcl 8.6.3, TclOO 1.0.3, and update changes file. 2014-10-14 18:12:36 +00:00
dgp 1234267c92 missed a bump 2014-10-13 17:34:12 +00:00
dgp 59491ce8ca update changes file 2014-10-13 17:15:55 +00:00
dgp ef89704696 Resolve test conflicts over global vars 2014-10-10 20:37:58 +00:00
dgp 1ce240e90f Bump to 8.5.17 2014-10-10 20:17:12 +00:00
dgp c132978e4b merge mark 2014-10-10 20:02:40 +00:00
dgp 59f2031ac5 backport those tests that can be 2014-10-10 20:02:00 +00:00
dgp f85490f4e1 [bf7135428c] Restore the Tcl_Write() return value logic. 2014-10-10 19:56:06 +00:00
dgp c2be2a28e0 [bf7135428c] Restore the Tcl_Write() return value logic. 2014-10-10 19:54:19 +00:00
dgp 4977df535f [ed29c4da21] Completed fix for [chan copy] handling [chan blocked]. 2014-10-10 19:44:54 +00:00
ferrieux 182bace1e3 Add Colin's test for coro floor above street level [Bug #3008307] 2014-10-10 19:36:17 +00:00
dgp 1f33c7ae12 Another test so both DoRead and MBRead are covered. 2014-10-10 19:02:37 +00:00
dgp 78c2c1cedf [ed29c4da21] Merge patch from 8.5, still not a complete fix. 2014-10-10 18:28:31 +00:00
dgp 186ecf8003 [ed29c4da21] Don't let BLOCKED state get converted into a channel error. 2014-10-10 18:24:32 +00:00
dgp 56c0b11912 New test io-53.15 for [ed29c4da21]. 2014-10-10 16:13:53 +00:00
dgp 1df1505d69 New test io-53.15 for [ed29c4da21]. 2014-10-10 15:38:15 +00:00
dgp 1a08ae6fb4 [2039178] Remove false claims about TCL_INTERP_DESTROYED flag bit in command traces. 2014-10-09 14:56:27 +00:00
dgp 891a0ade43 [2039178] Remove false claims about TCL_INTERP_DESTROYED flag bit in command traces. 2014-10-09 14:52:48 +00:00
jan.nijtmans 29d06499aa Fix [59a2e78e54d3361c33b8cd6eef55d384d8abecd7|59a2e78e54] : tclWinTime.c does not compile with MSVC14.
Eliminate use of __MINGW32__ macro everywhere, as it is deprecated.
2014-10-08 07:11:53 +00:00
jan.nijtmans ea97de415f Fix [59a2e78e54d3361c33b8cd6eef55d384d8abecd7|59a2e78e54] : tclWinTime.c does not compile with MSVC14.
Eliminate use of __MINGW32__ macro everywhare, as it is deprecated.
2014-10-08 07:02:34 +00:00
dgp b327c90dcc fix [bc1a96407a] 2014-10-03 20:20:12 +00:00
dgp cd1372b52d test cases 2014-10-03 15:47:38 +00:00
dgp 3b4cf982e3 Possible fix for testing. 2014-10-02 21:40:13 +00:00
dgp 7c4da917a7 [bc1a96407a] Partial solution should avoid crash, but may lead to wrong behavior. 2014-10-02 17:43:16 +00:00
dgp e36d384130 [bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. 2014-10-02 14:46:54 +00:00
dgp 5e53c4c296 [bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. 2014-10-02 14:43:10 +00:00
Miguel Sofer 78fcaa3580 Backing out commit [cddbfc3081], fix for bug [82521bfb6734f891dd]
The "optimisation" in that commit assumes that the last byte in the
generated bytecodes is an INST_TRY_CONVERT if it equals 64. This is an
invalid assumption, it could be 64 and not be an instruction.
2014-09-27 21:36:06 +00:00
ferrieux 11db57d058 Applied patch by Andreas Leitgeb so that [string cat]'s compiled bytecode optimally groups args by 255 for INSTR_STR_CONCAT1. 2014-09-27 20:28:47 +00:00
oehhar 822a2b50f7 Implemented tip-427: socket fconfigure option -connecting plus no -peername,-sockname when still connecting. 2014-09-26 12:05:30 +00:00
dgp fc21aee814 comment fix 2014-09-25 18:47:32 +00:00
dkf d06897f3ea Added a script-readable bytecode disassembler in tcl::unsupported. 2014-09-20 12:37:19 +00:00
dkf 1598658a83 Tidy things up a bit more. 2014-09-20 11:40:35 +00:00
jan.nijtmans 192fa71096 merge-mark 2014-09-17 10:47:21 +00:00
stwo 76db7c5c04 Better pic flag for OpenBSD. 2014-09-16 15:52:44 +00:00
stwo 85f3786d9c Better pic flag for OpenBSD. 2014-09-16 15:48:48 +00:00
dkf 5e0835667d whitespace tweak 2014-09-14 17:11:33 +00:00
dkf 26fe5fff38 merge trunk 2014-09-14 16:51:49 +00:00
dgp d75135cca1 [cee90e4e88] Correct error in stack depth checking. 2014-09-10 22:17:21 +00:00
dkf a5dd225e78 [2486824] Improve error message; not all that upvars is an upvar. 2014-09-10 08:24:59 +00:00
dkf 5f9519213f [2486824] Improve error message; not all that upvars is an upvar. 2014-09-10 08:20:46 +00:00
dkf 7bce68fe3b [84af1192f5]: [regsub] compiler no longer confused by quantification handling. 2014-09-09 19:49:08 +00:00
ferrieux 600ace1c4b Refine TclFinalizeThreadData so that the quick-exit optimization really only affects exit. 2014-09-08 22:50:11 +00:00
dgp 62004c9fb4 Exceptional handling of oo::class has to be consistent throughout. 2014-09-08 21:22:05 +00:00
stwo 976c48a7f1 Change one '#ifdef' to '#if defined()' for improved consistency within the file,
as in checkin [211aa43013].
2014-09-08 00:37:22 +00:00
dgp a3b501f125 Remove unused macros. 2014-09-05 19:04:43 +00:00
dgp 13d8cae724 Make corrections to long-false comments. 2014-09-05 18:30:57 +00:00
dkf 303cced03d [ccc2c2cc98]: lreplace edge case 2014-09-05 10:05:05 +00:00
dgp 3f8809d6ec Remove ChannelHandlerEvent struct, which has never been used in all of
recorded Tcl history.
Still need to purge comments of mentions of ChannelHandlerEventProc()
which is similarly pre-historic.
2014-09-04 22:05:21 +00:00
ferrieux b47df5123e Distinguish hanging from crashing in exit tests. 2014-09-03 19:44:29 +00:00
ashok 996c102b1f [132fad6fde]. Fixed GetCache to use TclpSysAlloc+memset instead
of calloc. Now consistent with tclWinThrd.c which no longer
uses malloc in its TclpSysAlloc implementation.
2014-09-03 15:48:56 +00:00
ferrieux a024a52335 Refrain from calling TclFinalizeThreadData() in quick-exit case as it is useless (just memory freeing). Superficially fixes [Bug 132fad6f]; that bug is still exerciseable thanks to recent additions to the test suite that exercise full finalization. 2014-09-02 22:00:03 +00:00
ferrieux 2e4f40528b Add test cases in very first position for hang-on-exit, both in (normal) quick-exit and TCL_FINALIZE_ON_EXIT=1 modes. 2014-09-02 21:57:20 +00:00
jan.nijtmans 8964b0101f Combine TCL_SHLIB_LD_EXTRAS+TK_SHLIB_LD_EXTRAS (for Cygwin and FreeBSD) to a single SHLIB_LD_LIBS usable for both Tcl and Tk 2014-09-01 08:17:49 +00:00
jan.nijtmans 6d02d4e9dc Combine TCL_SHLIB_LD_EXTRAS+TK_SHLIB_LD_EXTRAS (for Cygwin and FreeBSD) to a single SHLIB_LD_LIBS usable for both Tcl and Tk. 2014-09-01 08:11:52 +00:00
dkf 2e512ffbe8 merge trunk 2014-08-30 08:30:00 +00:00
dgp 6e00c594ea Use TclpSys* macros, not direct system calls. 2014-08-29 17:33:06 +00:00
dkf 77e18bafa5 [b9e1a3032e] Implement the documented method search order for TclOO.
This corrects the relative positions of object-defined methods and class mixins.
2014-08-28 07:53:24 +00:00
dgp bcdc8e8a6d merge release 2014-08-27 20:34:04 +00:00
dgp 7cd4eb1657 merge trunk; update changes 2014-08-25 21:43:21 +00:00
dgp a562752936 TIP 429 implementation. New command [string cat]. 2014-08-25 21:37:58 +00:00
dgp 46346effdc merge-mark 2014-08-25 15:40:01 +00:00
dgp 6c10f6324b merge release 2014-08-25 15:36:16 +00:00
dgp ae0f801eaf Do not let fossil README droppings leak into distribuion 2014-08-25 13:51:31 +00:00
dgp a9c6d78680 make dist allowed README-* fossil droppings to leak into the distribution. 2014-08-25 13:31:10 +00:00
dgp dbacb46d52 Bump to zlib 2.0.1. 2014-08-22 22:11:13 +00:00
dgp 7ab1ebdc32 Bump to TclOO 1.0.2 2014-08-22 21:52:37 +00:00
dgp 3ca10397cf merge trunk; stamp release date. 2014-08-22 17:28:46 +00:00
dgp 13e336e4cd merge 8.5; fix notifier mask bug and Tcl_Read performance regression 2014-08-22 13:48:50 +00:00
dgp 80604a93c1 merge 8.5; stamp release date 2014-08-22 13:44:23 +00:00
dgp aa8f4d27ac Correct performance regression in a series of short binary reads from a
socket.  Many thanks to Eric Boudaillier for the report and testing support.
2014-08-22 13:23:04 +00:00
dgp b08dc28c80 Same results; simpler logic. 2014-08-22 13:20:21 +00:00
dgp 92f9aca55f Test fix for likely cause of reported I/O slowdown.
In a DoRead() revision, it came to favor making every effort to fill
buffers, in preference to a more sensible goal of favoring avoiding calls
out to the driver if there's already enough data in the buffers to satisfy
the read operation.  Result is many more calls out to recv() than are
a good idea.  Ought to show up most glaringly when many Tcl_Read() calls
asking for small numbers of bytes (compared to buffer size) each, and that
matches the reported case.
2014-08-21 23:07:34 +00:00
andreask ce04ed5ad3 Fix reviewed and accepted. 2014-08-20 18:59:31 +00:00
dgp eda831ff7e Make test io-36.1.1 more portable. 2014-08-20 18:40:07 +00:00
dgp bc9dca8ca6 Docs for Tcl_CreateChannelHandler() state that the registered handler proc
will be called back with a mask value. "Mask is an integer mask indicating
which of the requested conditions actually exists for the channel; it will
contain ***a subset of the bits from the mask argument*** to
Tcl_CreateChannelHandler when the handler was created." (emhpasis added).

Tcl_NotifyChannel is not honoring this.  It passes a mask value that may
contain bits not in common with the mask argument to T_CCH().

This commit is a one-liner patch adding in the masking step to make things
behave as documented.  Thanks to apn for digging this out.  (In combination
with other questionable code, this led to a hang in test http-4.6 on Windows)

Tcl_NotifyChannel() has had this error in all of recorded Tcl history.
It's hard to imagine any code dependent on it though.  If any exists, it
can be revised to pass the mask value it truly needs to T_CCH() and end up
with code suitable both before and after this change.

If you concur, please merge to core-8-5-branch, and I'll take it from there.
2014-08-20 17:50:41 +00:00
dgp f8a968fdb8 Additions to changes. 2014-08-20 14:28:36 +00:00
jan.nijtmans 72fee4f1c7 [74e073599e5e7c5eb535e2f60f1b06feb468eaae|74e073599e]: tclsh is using old style dialogs when Tk is loaded on Windows 2014-08-20 11:23:09 +00:00
jan.nijtmans 71f6f450b2 [74e073599e5e7c5eb535e2f60f1b06feb468eaae|74e073599e]: tclsh is using old style dialogs when Tk is loaded on Windows 2014-08-20 11:13:29 +00:00
ferrieux f2225b9dc1 merge trunk 2014-08-19 20:35:16 +00:00
dgp 344b547cd4 Update changes file. 2014-08-19 18:34:09 +00:00
dgp 60125626dc merge trunk 2014-08-19 13:39:19 +00:00
dgp 36c74f5033 Improved credit 2014-08-18 13:28:58 +00:00
dkf 02b159d09e [7d52e1101b] oo::object should know that oo::class is a subclass. 2014-08-17 15:23:49 +00:00
dgp d5113635d3 Reconcile changes file with 8.6.1. 2014-08-14 16:48:08 +00:00
dgp 7cfbfdffd3 merge 8.5 2014-08-14 16:36:44 +00:00
jan.nijtmans a0e133cb07 Put back SystemV timezone files, which were removed in previous commit. Don't know if that was by accident, but seems unwise in a Tcl patch release. 2014-08-13 09:06:09 +00:00
jan.nijtmans e4a9f37030 Put back SystemV timezone files, which were removed in previous commit. Don't know if that was by accident, but seems unwise in a Tcl patch release. 2014-08-13 09:04:55 +00:00
dgp 459724f70a merge 8.5, update changes 2014-08-13 02:54:31 +00:00
Kevin B Kenny 7f8321b616 merge tzdata2014f from ietf.org 2014-08-13 01:45:39 +00:00
Kevin B Kenny ac5fa7c959 tzdata2014f from ietf.org 2014-08-13 01:42:17 +00:00
dgp 8c3d28816c Update changes file 2014-08-12 21:41:29 +00:00
dgp 13828f74ee merge 8.5 2014-08-12 15:51:06 +00:00
dgp 822b0d469e merge trunk 2014-08-12 15:47:20 +00:00
dgp 8755613114 merge-mark. Do not accommodate udp bugs in Tcl 8.6.2. 2014-08-12 15:46:20 +00:00
dgp c93483448e Accommodate the "udp" package, and any other Tcl package that expects a
[read] on a channel @ EOF to attempt another pass through the channel drivers
instead of immediately returning an empty string.  Correcting this misbehavior
appears too disruptive in a patch release to a long stable branch.
2014-08-12 15:28:09 +00:00
andreask 582c164dc3 Fixed type conversion warnings which break a Win32 debug build (MSVC). 2014-08-06 18:20:56 +00:00
ferrieux 91b9c5690e Fix comment inaccuracy. 2014-08-05 22:10:58 +00:00
ferrieux d544f36344 More aggressive constant folding in [string cat]. Thanks AndreasK for kicking. 2014-08-05 18:20:48 +00:00
ferrieux 796e087b9c Better organize [string cat] by chunks of 255 args. 2014-08-05 11:29:16 +00:00
ferrieux 76e87312ed Add constant folding to [string cat]. Mixed-quote idiom is now compiled to a single push. 2014-08-05 10:34:10 +00:00
ferrieux 5863c1e1b9 More optimized non-BC [string cat] using Tcl_AppendObjToObj() - thx Donal 2014-08-05 09:55:54 +00:00
ferrieux 50f00c62f2 Hum. Really merge trunk. 2014-08-04 14:06:13 +00:00
ferrieux 2918630e90 merge trunk 2014-08-04 14:02:53 +00:00
dgp 00ee522067 merge trunk 2014-08-04 13:37:22 +00:00
dgp 87724ab09f Add tclsh.exe.manifest.in to the distribution 2014-08-04 13:36:57 +00:00
dgp 43aaaf34e5 merge 8.5 2014-08-04 13:35:47 +00:00
dgp 67fcf44a82 Add tclsh.exe.manifest.in to the distribution. 2014-08-04 13:35:06 +00:00
dkf 239374cbb8 Tidy up the docs 2014-08-03 22:43:42 +00:00
Kevin B Kenny aa2667b729 merge trunk 2014-08-02 19:20:06 +00:00
ferrieux 25860d9071 Don't use [pid] in tests, stick to constant literals. 2014-08-02 15:26:46 +00:00
ferrieux 1cecac9cad TIP 429 Implementation: [string cat] 2014-08-02 13:04:16 +00:00
dgp 23b2b428b6 merge trunk 2014-08-02 04:38:36 +00:00
dgp 9c45b517dc Another Preserve/Release on channels is needed during IO finalization. 2014-08-02 04:36:39 +00:00
dgp f70b625cf3 merge 8.5 2014-08-02 04:29:41 +00:00
dgp 592bd0b065 Another Preserve/Release on channels is needed during IO finalization. 2014-08-02 04:25:27 +00:00
dgp f4f511dbae merge 8.5 2014-08-02 00:06:21 +00:00
andreask a3cfa0d708 Addition of a cast in tclWinFile.c to match types in a comparison, and
fix of a TRACE string literal in tclExecute.c with a bogus escape. Both
would otherwise bug a Windows debug build (where warnings are errors).
2014-08-01 20:07:40 +00:00
andreask 6563197fa8 Updated package "platform" to version 1.0.13. Separated the
identifiers "macosx*-i386-x86_64" and "macosx-universal" as
incompatible with each other.
2014-08-01 19:50:11 +00:00
dgp 08c2327777 merge-mark 2014-08-01 19:29:20 +00:00
andreask 0b7630c23f Updated package "platform" to version 1.0.13. Separated the
identifiers "macosx*-i386-x86_64" and "macosx-universal" as
incompatible with each other.

Plus addition of a cast in tclIO.c to match types in a comparison
which otherwise bugs a Windows debug build (warnings are errors).
2014-08-01 18:36:50 +00:00
dgp b425d2c241 merge trunk 2014-08-01 17:18:21 +00:00
dgp bd2e4fe97f merge 8.5 2014-08-01 17:17:24 +00:00
dgp bed95cfaf7 Backport the cheaper Preserve/Release on channels. 2014-08-01 17:16:35 +00:00
dgp a745e85067 [e75fabac06] Teardown line information after failed ensemble subcommand
compile attempts.  Copy/paste from CompileCmdCompileProc().  May be
refactor opportunity here.
2014-08-01 16:01:30 +00:00
dgp 232336fbee Correction and commentary in the details of ensemble compiling. 2014-08-01 14:36:30 +00:00
jan.nijtmans c62d8b25aa Fix part of [d19aef1487] (broken --disable-load on MacOSX), broken by [4d417791c9] 2014-07-31 21:23:45 +00:00
dgp 179c36fd48 merge trunk 2014-07-31 20:00:40 +00:00
dgp 5191ece516 [a84a720966] Protect against double free in TclOO classChainCache teardown. 2014-07-31 19:58:53 +00:00
dgp f1e1a92d13 merge trunk 2014-07-31 15:49:44 +00:00
dgp cfb0ea03ec Bump to 8.6.2 for release. 2014-07-28 14:50:06 +00:00
dgp 5ec61dacf7 merge 8.5 2014-07-28 12:53:19 +00:00
dgp 0bc839ec64 Revert the EOLFIX changes of checkin [a803608ed5] (2013-10-28).
They do not work on the one machine where they must -- the release managers!
Appears that the NATIVE_TCLSH support isn't found on the 8.5 branch, so we
shouldn't expect to use it.
2014-07-23 13:10:34 +00:00
dgp 72c15c0c4e Bump to 8.5.16 for release. 2014-07-23 12:26:21 +00:00
Kevin B Kenny 0bab3624a9 merge trunk 2014-06-29 02:20:31 +00:00
dkf c0726f8f4f merge trunk 2014-02-08 07:54:21 +00:00
dkf 39ddd8c91b improve the testing of the disassembly commands 2014-02-08 07:54:04 +00:00
dkf d69c1d382b merge trunk 2014-02-08 07:41:17 +00:00
dkf 14b32b82e1 merge trunk 2014-02-04 09:09:06 +00:00
dkf 3f60452ac2 merge trunk 2014-02-03 22:29:31 +00:00
dkf 75b361386e merge trunk 2014-01-09 21:20:23 +00:00
dkf f3dba34e63 merge trunk 2013-09-26 16:32:21 +00:00
dkf 36a7db47de merge trunk 2013-09-20 13:02:29 +00:00
dkf 97323cd8a0 merge trunk 2013-08-22 07:09:21 +00:00
dkf 8fa124afba merge trunk 2013-07-07 11:57:55 +00:00
dkf df623b6abe Properly encode more operand types to reduce the number of special cases in the disassembler. 2013-06-20 11:05:20 +00:00
dkf 3ef97fba38 merge trunk 2013-06-19 22:46:10 +00:00
dkf a261f7d413 Remove extra scribblings not normally needed. Thanks to jdc for suggestion. 2013-06-17 14:04:28 +00:00
dkf 50cc521ee3 Improved rendering of some opcode arguments and auxdata. 2013-06-13 21:21:22 +00:00
dkf 48205fa50d merge trunk 2013-06-13 08:31:24 +00:00
dkf 9fb06ec1c9 Extract more of the info from the bytecode. 2013-06-12 08:55:15 +00:00
dkf f9e188bad3 merge trunk 2013-06-11 21:40:51 +00:00
dkf 6b65756937 Code-readable disassembler: tcl::unsupported::getbytecode 2013-06-11 21:33:33 +00:00
dkf a74538b064 merge trunk 2013-06-11 08:34:09 +00:00
dkf 55787f4f08 Move the disassembler to its own file. 2013-06-11 08:19:56 +00:00
dkf 0d59c187fe merge trunk 2013-06-09 17:38:20 +00:00
dkf 4d2add8f0f merge trunk 2013-06-08 13:42:46 +00:00
225 changed files with 7744 additions and 5069 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
README: Tcl
This is the Tcl 8.6.1 source distribution.
This is the Tcl 8.6.3 source distribution.
http://sourceforge.net/projects/tcl/files/Tcl/
You can get any source release of Tcl from the URL above.
+191 -2
View File
@@ -8274,7 +8274,7 @@ Dropped support for OS X versions less than 10.4 (Tiger) (fellows)
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-02 (bug fix)[9d6162] superclass slot empty crash (vdgoot,fellows)
2013-08-03 (enhancement)[3611643] [auto_mkindex] support TclOO (fellows)
@@ -8303,4 +8303,193 @@ reported usage of large expressions (porter)
Many optmizations, improvements, and tightened stack management in bytecode.
--- Released 8.6.1, Septemer 20, 2013 --- http://core.tcl.tk/tcl/ for details
--- Released 8.6.1, September 20, 2013 --- http://core.tcl.tk/tcl/ for details
2013-09-27 (enhancement) improved ::env synchronization (fellows)
2013-10-20 (bug fix)[2835313] segfault from
[apply {{} {while 1 {a {*}[return -level 0 -code continue]}}}] (fellows)
2013-10-22 (bug fix)[3556215] [scan %E%G%X] support (fellows)
2013-10-25 (bug fix)[3eb2ec1] upper case scheme names in url. (nijtmans)
=> http 2.8.8
2013-10-29 (bug fix)[414d103] HP-UX: restore [exec] in threaded Tcl (nijtmans)
2013-11-04 (bug fix) C++ friendly stubs struct declarations (nijtmans)
2013-11-05 (bug fix)[426679e] OpenBSD man page rendering (nijtmans)
2013-11-12 (bug fix)[5425f2c] [fconfigure -error] breaks [socket -async]
2013-11-20 (bug fix) Improved environment variable management (nijtmans)
=> tcltest 2.3.7
2013-11-21 (platforms) Support for Windows 8.1 (nijtmans)
2013-12-06 (RFE) improved [foreach] bytecode (fellows)
2013-12-10 (RFE) improved [lmap] bytecode (sofer)
2013-12-11 (RFE) improved [catch] bytecode (sofer)
2013-12-18 (bug fix)[0b874c3] SEGV [coroutine X coroutine Y info frame] (porter)
2013-12-20 (RFE) reduced numeric conversion in bytecode (sofer)
2014-01-07 (RFE) compilers for [concat], [linsert], [namespace origin],
[next], [string replace], [string tolower], [string totitle], [string toupper],
[string trim], [string trimleft], [string trimright] (fellows)
2014-01-22 (RFE) compilers for [nextto], [yieldto] (fellows)
2014-02-02 (RFE) compiler for [string is] (fellows)
2014-02-06 (bug fix)[a4494e2] panic in test namespace-13.2 (porter)
2014-03-20 (bug fix)[2f7cbd0] FreeBSD 10.0 build failure (nijtmans)
2014-03-26 (RFE)[b42b208] Cygwin: [file attr -readonly -archive -hidden -system]
(nijtmans)
2014-03-27 (bug fix) segfault iocmd-23.11 (porter)
2014-04-02 (bug fix)[581937a] Win: readable event on async connect failure
2014-04-04 (bug fix)[581937a,97069ea] async socket connect fail (oehlmann)
2014-04-10 (bug fix)[792641f] Win: no \ in normalized path (nijtmans)
2014-04-11 (bug fix)[3118489] protect NUL in filenames (nijtmans)
2014-04-15 (bug fix)[88aef05] segfault iocmd-21.20 (porter)
2014-04-16 (update) Win: use Winsock 2.2 (nijtmans)
2014-04-16 (bug fix)[d19a30d] segfault clock-67.[23] (sebres)
2014-04-21 (bug fix) segfault iocmd-21.2[12] (porter)
2014-04-22 (bug fix) segfault iogt-2.4 (porter)
2014-04-23 (bug fix)[3493120] memleak in thread exit
2014-05-08 refactoring of core I/O functions (porter)
2014-05-09 (bug fix)[3389978] Win: extended paths support (nijtmans)
2014-05-09 (bug fix) segfault iocmd-32.1 (porter)
2014-05-11 (bug fix)[6d2f249] nested ensemble compile failure (fellows)
2014-05-17 (RFE)[47d6625] wideint support in [lsearch -integer] [lsort -integer] (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2014-05-20 (bug fix) Stop eof and blocked state leaking thru stacks (porter)
*** POTENTIAL INCOMPATIBILITY ***
2014-05-20 (bug fix)[13d3af3] Win: socket -async tried only first IP address
2014-05-28 (platforms) work around systems that fail when a shared library
is deleted after it is [load]ed (kupries)
2014-05-31 (bug fix) chan events on pipes must be on proper ends (porter)
2014-06-04 (bug fix) socket-2.12 (porter)
2014-06-05 (bug fix) io-12.6 (kupries,porter)
2014-06-15 (RFE)[1b0266d] [dict replace|remove] return canonical dict (fellows)
*** POTENTIAL INCOMPATIBILITY ***
2014-06-16 (bug fix) socket-2.13 workaround broken select() (porter)
2014-06-20 (bug fix)[b47b176] iortrans.tf-11.0 (porter)
2014-06-22 (RFE)[2f9df4c] -cleanup scripts before -out compare (nijtmans)
2014-07-04 (update) Update Unicode data to 7.0 (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2014-07-08 (bug) [chan push] converts blocked writes to error (aspect,porter)
2014-07-10 (bug fix)[7368d2] memleak Tcl_SetVar2(..,TCL_APPEND_VALUE) (porter)
*** POTENTIAL INCOMPATIBILITY ***
2014-07-11 (bug) leaks in SetFsPathFromAny, [info frame] (porter)
2014-07-15 (bug) compress dict leak in zlib xform channel close (porter)
2014-07-17 (bug fix)[9969cf8] leak trace data in coroutine deletion (porter)
2014-07-18 (RFE)[b43f2b4] fix [lappend] multi performance collapse (fellows)
2014-07-19 (bug fix)[75b8433] memleak managing oo instance lists (porter)
2014-07-21 (bug fix)[e6477e1] memleak in AtForkChild() (porter)
2014-07-22 (bug fix)[12b0997] memleak in iocmd.tf-32.0 (porter)
2014-07-28 (RFE) Optimized binary [chan copy] by moving buffers (porter)
2014-07-30 (enhancement) use refcounts, not Tcl_Preserve to manage lifetime
of Tcl_Channel (porter)
*** POTENTIAL INCOMPATIBILITY ***
2014-07-31 (bug fix)[a84a720] double free in oo chain deletion (porter)
2014-08-01 (bug fix)[e75faba] SEGV [apply {{} {namespace upvar a b [x]}}] (porter)
2014-08-01 (update) "macosx*-i386-x86_64" "macosx-universal" no longer compatible (kupries)
=> platform 1.0.13
2014-08-12 tzdata updated to Olson's tzdata2014f (kenny)
2014-08-17 (bug fix)[7d52e11] [info class subclasses oo::object] should
include ::oo::class (fellows)
2014-08-25 (TIP 429) New command [string cat] (leitgeb,ferrieux)
--- Released 8.6.2, August 27, 2014 --- http://core.tcl.tk/tcl/ for details
2014-08-28 (bug)[b9e1a3] Correct Method Search Order (nadkarni,fellows)
=> TclOO 1.0.3
2014-09-05 (bug)[ccc2c2] Regression [lreplace {} 1 1] (bron,fellows)
2014-09-08 (bug)<oo-1.18.2> Crash regression in [oo::class destroy] (porter)
2014-09-09 (bug)[84af11] Regress [regsub -all {\(.*} a(b) {}] (fellows)
2014-09-10 (bug)[cee90e] [try {} on ok {} - on return {} {}] panic (porter)
2014-09-20 (feature) [tcl::unsupported::getbytecode] disassember (fellows)
2014-09-27 (enhancement) [string cat] bytecode optimization (leitgeb,ferrieux)
2014-09-27 (bug)[82521b] segfault in mangled bytecode (ogilvie,sofer)
2014-10-02 (bug)[bc5b79] Hang in some [read]s of limited size (rogers,porter)
2014-10-03 (bug)[bc1a96] segfault in [array set] of traced array (tab,porter)
2014-10-08 (bug)[59a2e7] MSVC14 compile support (dower,nijtmans)
2014-10-10 (bug)[ed29c4] [fcopy] treats [blocked] as error (rowen,porter)
2014-10-10 (bug)[bf7135] regression in Tcl_Write() interface (porter)
2014-10-18 (bug)[10dc6d] fix [gets] on non-blocking channels (fassel,porter)
2014-10-26 Support for Windows 10 (nijtmans)
2014-10-31 (bug)[dcc034] restore [open comX: r+] (lll,nijtmans)
2014-11-05 (bug)[214cc0] Restore [lappend v] return value (sayers,porter)
2014-11-06 (bug)[5adc35] Stop forcing EOF to be permanent (porter)
--- Released 8.6.3, November 12, 2014 --- http://core.tcl.tk/tcl/ for details
2014-12-17 (TIP 427) [fconfigure $h -connecting, -peername, -sockname] (oehlmann,rmax)
+10 -23
View File
@@ -86,11 +86,14 @@ operation is being performed on the command. The bit
\fBTCL_TRACE_DESTROYED\fR will be set in \fIflags\fR if the trace is about
to be destroyed; this information may be useful to \fIproc\fR so that
it can clean up its own internal data structures (see the section
\fBTCL_TRACE_DESTROYED\fR below for more details). Lastly, the bit
\fBTCL_INTERP_DESTROYED\fR will be set if the entire interpreter is being
destroyed. When this bit is set, \fIproc\fR must be especially
careful in the things it does (see the section \fBTCL_INTERP_DESTROYED\fR
below).
\fBTCL_TRACE_DESTROYED\fR below for more details). Because the
deletion of commands can take place as part of the deletion of the interp
that contains them, \fIproc\fR must be careful about checking what
the passed in \fIinterp\fR value can be called upon to do.
The routine \fBTcl_InterpDeleted\fR is an important tool for this.
When \fBTcl_InterpDeleted\fR returns 1, \fIproc\fR will not be able
to invoke any scripts in \fIinterp\fR. The function of \fIproc\fR
in that circumstance is limited to the cleanup of its own data structures.
.PP
\fBTcl_UntraceCommand\fR may be used to remove a trace. If the
command specified by \fIinterp\fR, \fIcmdName\fR, and \fIflags\fR has
@@ -123,7 +126,8 @@ traces for a given command that have the same \fIproc\fR.
.PP
During rename traces, the command being renamed is visible with both
names simultaneously, and the command still exists during delete
traces (if \fBTCL_INTERP_DESTROYED\fR is not set). However, there is no
traces, unless the interp that contains it is being deleted.
However, there is no
mechanism for signaling that an error occurred in a trace procedure,
so great care should be taken that errors do not get silently lost.
.SH "MULTIPLE TRACES"
@@ -142,22 +146,5 @@ rename the command, the last renaming takes precedence.
In a delete callback to \fIproc\fR, the \fBTCL_TRACE_DESTROYED\fR bit
is set in \fIflags\fR.
.\" Perhaps need some more comments here? - DKF
.SH "TCL_INTERP_DESTROYED"
.PP
When an interpreter is destroyed, unset traces are called for
all of its commands.
The \fBTCL_INTERP_DESTROYED\fR bit will be set in the \fIflags\fR
argument passed to the trace procedures.
Trace procedures must be extremely careful in what they do if
the \fBTCL_INTERP_DESTROYED\fR bit is set.
It is not safe for the procedures to invoke any Tcl procedures
on the interpreter, since its state is partially deleted.
All that trace procedures should do under these circumstances is
to clean up and free their own internal data structures.
.SH BUGS
.PP
Tcl does not do any error checking to prevent trace procedures
from misusing the interpreter during traces with \fBTCL_INTERP_DESTROYED\fR
set.
.SH KEYWORDS
clientData, trace, command
+13 -48
View File
@@ -361,18 +361,17 @@ may cause this error.
A BREAK condition has been detected by your UART (see above).
.SH "PORTABILITY ISSUES"
.TP
\fBWindows \fR(all versions)
\fBWindows \fR
.
Valid values for \fIfileName\fR to open a serial port are of the form
\fBcom\fIX\fB:\fR, where \fIX\fR is a number, generally from 1 to 4.
This notation only works for serial ports from 1 to 9, if the system
happens to have more than four. An attempt to open a serial port that
\fBcom\fIX\fB\fR, where \fIX\fR is a number, generally from 1 to 9.
A legacy form accepted as well is \fBcom\fIX\fB:\fR. This notation only
works for serial ports from 1 to 9. An attempt to open a serial port that
does not exist or has a number greater than 9 will fail. An alternate
form of opening serial ports is to use the filename \fB\e\e.\ecomX\fR,
where X is any number that corresponds to a serial port; please note
that this method is considerably slower on Windows 95 and Windows 98.
.TP
\fBWindows NT\fR
form of opening serial ports is to use the filename \fB//./comX\fR,
where X is any number that corresponds to a serial port.
.RS
.PP
.
When running Tcl interactively, there may be some strange interactions
between the real console, if one is present, and a command pipeline that uses
@@ -380,45 +379,11 @@ standard input or output. If a command pipeline is opened for reading, some
of the lines entered at the console will be sent to the command pipeline and
some will be sent to the Tcl evaluator. If a command pipeline is opened for
writing, keystrokes entered into the console are not visible until the
pipe is closed. This behavior occurs whether the command pipeline is
executing 16-bit or 32-bit applications. These problems only occur because
both Tcl and the child application are competing for the console at
the same time. If the command pipeline is started from a script, so that Tcl
is not accessing the console, or if the command pipeline does not use
standard input or output, but is redirected from or to a file, then the
above problems do not occur.
.TP
\fBWindows 95\fR
.
A command pipeline that executes a 16-bit DOS application cannot be opened
for both reading and writing, since 16-bit DOS applications that receive
standard input from a pipe and send standard output to a pipe run
synchronously. Command pipelines that do not execute 16-bit DOS
applications run asynchronously and can be opened for both reading and
writing.
.RS
.PP
When running Tcl interactively, there may be some strange interactions
between the real console, if one is present, and a command pipeline that uses
standard input or output. If a command pipeline is opened for reading from
a 32-bit application, some of the keystrokes entered at the console will be
sent to the command pipeline and some will be sent to the Tcl evaluator. If
a command pipeline is opened for writing to a 32-bit application, no output
is visible on the console until the pipe is closed. These problems only
occur because both Tcl and the child application are competing for the
console at the same time. If the command pipeline is started from a script,
so that Tcl is not accessing the console, or if the command pipeline does
not use standard input or output, but is redirected from or to a file, then
the above problems do not occur.
.PP
Whether or not Tcl is running interactively, if a command pipeline is opened
for reading from a 16-bit DOS application, the call to \fBopen\fR will not
return until end-of-file has been received from the command pipeline's
standard output. If a command pipeline is opened for writing to a 16-bit DOS
application, no data will be sent to the command pipeline's standard output
until the pipe is actually closed. This problem occurs because 16-bit DOS
applications are run synchronously, as described above.
.RE
pipe is closed. These problems only occur because both Tcl and the child
application are competing for the console at the same time. If the command
pipeline is started from a script, so that Tcl is not accessing the console,
or if the command pipeline does not use standard input or output, but is
redirected from or to a file, then the above problems do not occur.
.TP
\fBUnix\fR\0\0\0\0\0\0\0
.
+9
View File
@@ -97,6 +97,10 @@ writable channel event on the socket to get notified when the
asynchronous connection has succeeded or failed. See the \fBvwait\fR
and the \fBchan\fR commands for more details on the event loop and
channel events.
.PP
The \fBchan configure\fR option \fB-connecting\fR may be used to check if the connect is still running. To verify a successful connect, the option \fB-error\fR may be checked when \fB-connecting\fR returned 0.
.PP
Operation without the event queue requires at the moment calls to \fBchan configure\fR to advance the internal state machine.
.RE
.SH "SERVER SOCKETS"
.PP
@@ -186,6 +190,11 @@ sockets, this option returns a list of three elements; these are the
address, the host name and the port to which the peer socket is connected
or bound. If the host name cannot be computed, the second element of the
list is identical to the address, its first element.
.RE
.TP
\fB\-connecting\fR
.
This option is not supported by server sockets. For client sockets, this option returns 1 if an asyncroneous connect is still in progress, 0 otherwise.
.PP
.SH "EXAMPLES"
.PP
+15
View File
@@ -19,6 +19,21 @@ string \- Manipulate strings
Performs one of several string operations, depending on \fIoption\fR.
The legal \fIoption\fRs (which may be abbreviated) are:
.TP
\fBstring cat\fR ?\fIstring1\fR? ?\fIstring2...\fR?
.VS 8.6.2
Concatenate the given \fIstring\fRs just like placing them directly
next to each other and return the resulting compound string. If no
\fIstring\fRs are present, the result is an empty string.
.RS
.PP
This primitive is occasionally handier than juxtaposition of strings
when mixed quoting is wanted, or when the aim is to return the result
of a concatenation without resorting to \fBreturn\fR \fB\-level 0\fR,
and is more efficient than building a list of arguments and using
\fBjoin\fR with an empty join string.
.RE
.VE
.TP
\fBstring compare\fR ?\fB\-nocase\fR? ?\fB\-length\fI length\fR? \fIstring1 string2\fR
.
Perform a character-by-character comparison of strings \fIstring1\fR
+19 -2
View File
@@ -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 1
#define TCL_RELEASE_SERIAL 3
#define TCL_VERSION "8.6"
#define TCL_PATCH_LEVEL "8.6.1"
#define TCL_PATCH_LEVEL "8.6.3"
/*
*----------------------------------------------------------------------------
@@ -2144,11 +2144,28 @@ typedef struct Tcl_EncodingType {
* substituting one or more "close" characters in
* the destination buffer and then continue to
* convert the source.
* TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf will not append a
* terminating NUL byte. Knowing that it will
* not need space to do so, it will fill all
* dstLen bytes with encoded UTF-8 content, as
* other circumstances permit. If clear, the
* default behavior is to reserve a byte in
* the dst space for NUL termination, and to
* append the NUL byte.
* TCL_ENCODING_CHAR_LIMIT - If set and dstCharsPtr is not NULL, then
* Tcl_ExternalToUtf takes the initial value
* of *dstCharsPtr is taken as a limit of the
* maximum number of chars to produce in the
* encoded UTF-8 content. Otherwise, the
* number of chars produced is controlled only
* by other limiting factors.
*/
#define TCL_ENCODING_START 0x01
#define TCL_ENCODING_END 0x02
#define TCL_ENCODING_STOPONERROR 0x04
#define TCL_ENCODING_NO_TERMINATE 0x08
#define TCL_ENCODING_CHAR_LIMIT 0x10
/*
* The following definitions are the error codes returned by the conversion
+1 -1
View File
@@ -31,7 +31,7 @@
* until Tcl uses config.h properly.
*/
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__BORLANDC__)
#if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__)
typedef unsigned long caddr_t;
#endif
+3 -1
View File
@@ -840,7 +840,9 @@ Tcl_CreateInterp(void)
*/
Tcl_CreateObjCommand(interp, "::tcl::unsupported::disassemble",
Tcl_DisassembleObjCmd, NULL, NULL);
Tcl_DisassembleObjCmd, INT2PTR(0), NULL);
Tcl_CreateObjCommand(interp, "::tcl::unsupported::getbytecode",
Tcl_DisassembleObjCmd, INT2PTR(1), NULL);
Tcl_CreateObjCommand(interp, "::tcl::unsupported::representation",
Tcl_RepresentationCmd, NULL, NULL);
+54
View File
@@ -2835,6 +2835,59 @@ StringCmpCmd(
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* StringCatCmd --
*
* This procedure is invoked to process the "string cat" Tcl command.
* See the user documentation for details on what it does.
*
* Results:
* A standard Tcl result.
*
* Side effects:
* See the user documentation.
*
*----------------------------------------------------------------------
*/
static int
StringCatCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int i;
Tcl_Obj *objResultPtr;
if (objc < 2) {
/*
* If there are no args, the result is an empty object.
* Just leave the preset empty interp result.
*/
return TCL_OK;
}
if (objc == 2) {
/*
* Other trivial case, single arg, just return it.
*/
Tcl_SetObjResult(interp, objv[1]);
return TCL_OK;
}
objResultPtr = objv[1];
if (Tcl_IsShared(objResultPtr)) {
objResultPtr = Tcl_DuplicateObj(objResultPtr);
}
for(i = 2;i < objc;i++) {
Tcl_AppendObjToObj(objResultPtr, objv[i]);
}
Tcl_SetObjResult(interp, objResultPtr);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
@@ -3330,6 +3383,7 @@ TclInitStringCmd(
{
static const EnsembleImplMap stringImplMap[] = {
{"bytelength", StringBytesCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0},
{"cat", StringCatCmd, TclCompileStringCatCmd, NULL, NULL, 0},
{"compare", StringCmpCmd, TclCompileStringCmpCmd, NULL, NULL, 0},
{"equal", StringEqualCmd, TclCompileStringEqualCmd, NULL, NULL, 0},
{"first", StringFirstCmd, TclCompileStringFirstCmd, NULL, NULL, 0},
+228 -109
View File
@@ -26,14 +26,23 @@ static void FreeDictUpdateInfo(ClientData clientData);
static void PrintDictUpdateInfo(ClientData clientData,
Tcl_Obj *appendObj, ByteCode *codePtr,
unsigned int pcOffset);
static void DisassembleDictUpdateInfo(ClientData clientData,
Tcl_Obj *dictObj, ByteCode *codePtr,
unsigned int pcOffset);
static ClientData DupForeachInfo(ClientData clientData);
static void FreeForeachInfo(ClientData clientData);
static void PrintForeachInfo(ClientData clientData,
Tcl_Obj *appendObj, ByteCode *codePtr,
unsigned int pcOffset);
static void DisassembleForeachInfo(ClientData clientData,
Tcl_Obj *dictObj, ByteCode *codePtr,
unsigned int pcOffset);
static void PrintNewForeachInfo(ClientData clientData,
Tcl_Obj *appendObj, ByteCode *codePtr,
unsigned int pcOffset);
static void DisassembleNewForeachInfo(ClientData clientData,
Tcl_Obj *dictObj, ByteCode *codePtr,
unsigned int pcOffset);
static int CompileEachloopCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
CompileEnv *envPtr, int collect);
@@ -49,21 +58,24 @@ const AuxDataType tclForeachInfoType = {
"ForeachInfo", /* name */
DupForeachInfo, /* dupProc */
FreeForeachInfo, /* freeProc */
PrintForeachInfo /* printProc */
PrintForeachInfo, /* printProc */
DisassembleForeachInfo /* disassembleProc */
};
const AuxDataType tclNewForeachInfoType = {
"NewForeachInfo", /* name */
DupForeachInfo, /* dupProc */
FreeForeachInfo, /* freeProc */
PrintNewForeachInfo /* printProc */
PrintNewForeachInfo, /* printProc */
DisassembleNewForeachInfo /* disassembleProc */
};
const AuxDataType tclDictUpdateInfoType = {
"DictUpdateInfo", /* name */
DupDictUpdateInfo, /* dupProc */
FreeDictUpdateInfo, /* freeProc */
PrintDictUpdateInfo /* printProc */
PrintDictUpdateInfo, /* printProc */
DisassembleDictUpdateInfo /* disassembleProc */
};
/*
@@ -165,9 +177,9 @@ TclCompileAppendCmd(
*/
varTokenPtr = TokenAfter(parsePtr->tokenPtr);
PushVarNameWord(interp, varTokenPtr, envPtr, TCL_NO_ELEMENT,
&localIndex, &isScalar, 1);
if (!isScalar || localIndex < 0) {
localIndex = LocalScalarFromToken(varTokenPtr, envPtr);
if (localIndex < 0) {
return TCL_ERROR;
}
@@ -289,7 +301,8 @@ TclCompileArraySetCmd(
* a proc, we cannot do a better compile than generic.
*/
if (envPtr->procPtr == NULL && !(isDataEven && len == 0)) {
if ((varTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) ||
(envPtr->procPtr == NULL && !(isDataEven && len == 0))) {
code = TclCompileBasic2ArgCmd(interp, parsePtr, cmdPtr, envPtr);
goto done;
}
@@ -330,8 +343,9 @@ TclCompileArraySetCmd(
* a non-local variable: upvar from a local one! This consumes the
* variable name that was left at stacktop.
*/
localIndex = AnonymousLocal(envPtr);
localIndex = TclFindCompiledLocal(varTokenPtr->start,
varTokenPtr->size, 1, envPtr);
PushStringLiteral(envPtr, "0");
TclEmitInstInt4(INST_REVERSE, 2, envPtr);
TclEmitInstInt4(INST_UPVAR, localIndex, envPtr);
@@ -2084,11 +2098,13 @@ TclCompileDictWithCmd(
* DupDictUpdateInfo: a copy of the auxiliary data
* FreeDictUpdateInfo: none
* PrintDictUpdateInfo: none
* DisassembleDictUpdateInfo: none
*
* Side effects:
* DupDictUpdateInfo: allocates memory
* FreeDictUpdateInfo: releases memory
* PrintDictUpdateInfo: none
* DisassembleDictUpdateInfo: none
*
*----------------------------------------------------------------------
*/
@@ -2131,6 +2147,25 @@ PrintDictUpdateInfo(
Tcl_AppendPrintfToObj(appendObj, "%%v%u", duiPtr->varIndices[i]);
}
}
static void
DisassembleDictUpdateInfo(
ClientData clientData,
Tcl_Obj *dictObj,
ByteCode *codePtr,
unsigned int pcOffset)
{
DictUpdateInfo *duiPtr = clientData;
int i;
Tcl_Obj *variables = Tcl_NewObj();
for (i=0 ; i<duiPtr->length ; i++) {
Tcl_ListObjAppendElement(NULL, variables,
Tcl_NewIntObj(duiPtr->varIndices[i]));
}
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("variables", -1),
variables);
}
/*
*----------------------------------------------------------------------
@@ -2368,7 +2403,6 @@ TclCompileForCmd(
SetLineInformation(2);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
TclClearNumConversion(envPtr);
jumpDist = CurrentOffset(envPtr) - bodyCodeOffset;
if (jumpDist > 127) {
@@ -2493,24 +2527,16 @@ CompileEachloopCmd(
* (TCL_EACH_*) */
{
Proc *procPtr = envPtr->procPtr;
ForeachInfo *infoPtr; /* Points to the structure describing this
ForeachInfo *infoPtr=NULL; /* Points to the structure describing this
* foreach command. Stored in a AuxData
* record in the ByteCode. */
Tcl_Token *tokenPtr, *bodyTokenPtr;
int jumpBackOffset, infoIndex, range;
int numWords, numLists, numVars, loopIndex, i, j, code;
int numWords, numLists, i, j, code = TCL_OK;
Tcl_Obj *varListObj = NULL;
DefineLineInformation; /* TIP #280 */
/*
* We parse the variable list argument words and create two arrays:
* varcList[i] is number of variables in i-th var list.
* varvList[i] points to array of var names in i-th var list.
*/
int *varcList;
const char ***varvList;
/*
* If the foreach command isn't in a procedure, don't compile it inline:
* the payoff is too small.
@@ -2539,105 +2565,73 @@ CompileEachloopCmd(
}
/*
* Allocate storage for the varcList and varvList arrays if necessary.
* Create and initialize the ForeachInfo and ForeachVarList data
* structures describing this command. Then create a AuxData record
* pointing to the ForeachInfo structure.
*/
numLists = (numWords - 2)/2;
varcList = TclStackAlloc(interp, numLists * sizeof(int));
memset(varcList, 0, numLists * sizeof(int));
varvList = (const char ***) TclStackAlloc(interp,
numLists * sizeof(const char **));
memset((char*) varvList, 0, numLists * sizeof(const char **));
infoPtr = ckalloc(sizeof(ForeachInfo)
+ (numLists - 1) * sizeof(ForeachVarList *));
infoPtr->numLists = 0; /* Count this up as we go */
/*
* Break up each var list and set the varcList and varvList arrays. Don't
* Parse each var list into sequence of var names. Don't
* compile the foreach inline if any var name needs substitutions or isn't
* a scalar, or if any var list needs substitutions.
*/
loopIndex = 0;
varListObj = Tcl_NewObj();
for (i = 0, tokenPtr = parsePtr->tokenPtr;
i < numWords-1;
i++, tokenPtr = TokenAfter(tokenPtr)) {
Tcl_DString varList;
ForeachVarList *varListPtr;
int numVars;
if (i%2 != 1) {
continue;
}
if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) {
code = TCL_ERROR;
goto done;
}
/*
* Lots of copying going on here. Need a ListObj wizard to show a
* better way.
*/
Tcl_DStringInit(&varList);
TclDStringAppendToken(&varList, &tokenPtr[1]);
code = Tcl_SplitList(NULL, Tcl_DStringValue(&varList),
&varcList[loopIndex], &varvList[loopIndex]);
Tcl_DStringFree(&varList);
if (code != TCL_OK) {
code = TCL_ERROR;
goto done;
}
numVars = varcList[loopIndex];
/*
* If the variable list is empty, we can enter an infinite loop when
* the interpreted version would not. Take care to ensure this does
* not happen. [Bug 1671138]
* the interpreted version would not. Take care to ensure this does
* not happen. [Bug 1671138]
*/
if (numVars == 0) {
if (!TclWordKnownAtCompileTime(tokenPtr, varListObj) ||
TCL_OK != Tcl_ListObjLength(NULL, varListObj, &numVars) ||
numVars == 0) {
code = TCL_ERROR;
goto done;
}
for (j = 0; j < numVars; j++) {
const char *varName = varvList[loopIndex][j];
varListPtr = ckalloc(sizeof(ForeachVarList)
+ (numVars - 1) * sizeof(int));
varListPtr->numVars = numVars;
infoPtr->varLists[i/2] = varListPtr;
infoPtr->numLists++;
if (!TclIsLocalScalar(varName, (int) strlen(varName))) {
for (j = 0; j < numVars; j++) {
Tcl_Obj *varNameObj;
const char *bytes;
int numBytes, varIndex;
Tcl_ListObjIndex(NULL, varListObj, j, &varNameObj);
bytes = Tcl_GetStringFromObj(varNameObj, &numBytes);
varIndex = LocalScalar(bytes, numBytes, envPtr);
if (varIndex < 0) {
code = TCL_ERROR;
goto done;
}
varListPtr->varIndexes[j] = varIndex;
}
loopIndex++;
Tcl_SetObjLength(varListObj, 0);
}
/*
* We will compile the foreach command.
*/
code = TCL_OK;
/*
* Create and initialize the ForeachInfo and ForeachVarList data
* structures describing this command. Then create a AuxData record
* pointing to the ForeachInfo structure.
*/
infoPtr = ckalloc(sizeof(ForeachInfo)
+ (numLists - 1) * sizeof(ForeachVarList *));
infoPtr->numLists = numLists;
for (loopIndex = 0; loopIndex < numLists; loopIndex++) {
ForeachVarList *varListPtr;
numVars = varcList[loopIndex];
varListPtr = ckalloc(sizeof(ForeachVarList)
+ (numVars - 1) * sizeof(int));
varListPtr->numVars = numVars;
for (j = 0; j < numVars; j++) {
const char *varName = varvList[loopIndex][j];
int nameChars = strlen(varName);
varListPtr->varIndexes[j] = TclFindCompiledLocal(varName,
nameChars, /*create*/ 1, envPtr);
}
infoPtr->varLists[loopIndex] = varListPtr;
}
infoIndex = TclCreateAuxData(infoPtr, &tclNewForeachInfoType, envPtr);
/*
@@ -2709,13 +2703,14 @@ CompileEachloopCmd(
}
done:
for (loopIndex = 0; loopIndex < numLists; loopIndex++) {
if (varvList[loopIndex] != NULL) {
ckfree(varvList[loopIndex]);
if (code == TCL_ERROR) {
if (infoPtr) {
FreeForeachInfo(infoPtr);
}
}
TclStackFree(interp, (void *)varvList);
TclStackFree(interp, varcList);
if (varListObj) {
Tcl_DecrRefCount(varListObj);
}
return code;
}
@@ -2809,10 +2804,10 @@ FreeForeachInfo(
/*
*----------------------------------------------------------------------
*
* PrintForeachInfo --
* PrintForeachInfo, DisassembleForeachInfo --
*
* Function to write a human-readable representation of a ForeachInfo
* structure to stdout for debugging.
* Functions to write a human-readable or script-readablerepresentation
* of a ForeachInfo structure to a Tcl_Obj for debugging.
*
* Results:
* None.
@@ -2892,6 +2887,89 @@ PrintNewForeachInfo(
Tcl_AppendToObj(appendObj, "]", -1);
}
}
static void
DisassembleForeachInfo(
ClientData clientData,
Tcl_Obj *dictObj,
ByteCode *codePtr,
unsigned int pcOffset)
{
register ForeachInfo *infoPtr = clientData;
register ForeachVarList *varsPtr;
int i, j;
Tcl_Obj *objPtr, *innerPtr;
/*
* Data stores.
*/
objPtr = Tcl_NewObj();
for (i=0 ; i<infoPtr->numLists ; i++) {
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewIntObj(infoPtr->firstValueTemp + i));
}
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("data", -1), objPtr);
/*
* Loop counter.
*/
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("loop", -1),
Tcl_NewIntObj(infoPtr->loopCtTemp));
/*
* Assignment targets.
*/
objPtr = Tcl_NewObj();
for (i=0 ; i<infoPtr->numLists ; i++) {
innerPtr = Tcl_NewObj();
varsPtr = infoPtr->varLists[i];
for (j=0 ; j<varsPtr->numVars ; j++) {
Tcl_ListObjAppendElement(NULL, innerPtr,
Tcl_NewIntObj(varsPtr->varIndexes[j]));
}
Tcl_ListObjAppendElement(NULL, objPtr, innerPtr);
}
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("assign", -1), objPtr);
}
static void
DisassembleNewForeachInfo(
ClientData clientData,
Tcl_Obj *dictObj,
ByteCode *codePtr,
unsigned int pcOffset)
{
register ForeachInfo *infoPtr = clientData;
register ForeachVarList *varsPtr;
int i, j;
Tcl_Obj *objPtr, *innerPtr;
/*
* Jump offset.
*/
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("jumpOffset", -1),
Tcl_NewIntObj(infoPtr->loopCtTemp));
/*
* Assignment targets.
*/
objPtr = Tcl_NewObj();
for (i=0 ; i<infoPtr->numLists ; i++) {
innerPtr = Tcl_NewObj();
varsPtr = infoPtr->varLists[i];
for (j=0 ; j<varsPtr->numVars ; j++) {
Tcl_ListObjAppendElement(NULL, innerPtr,
Tcl_NewIntObj(varsPtr->varIndexes[j]));
}
Tcl_ListObjAppendElement(NULL, objPtr, innerPtr);
}
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("assign", -1), objPtr);
}
/*
*----------------------------------------------------------------------
@@ -3114,6 +3192,54 @@ TclCompileFormatCmd(
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* TclLocalScalarFromToken --
*
* Get the index into the table of compiled locals that corresponds
* to a local scalar variable name.
*
* Results:
* Returns the non-negative integer index value into the table of
* compiled locals corresponding to a local scalar variable name.
* If the arguments passed in do not identify a local scalar variable
* then return -1.
*
* Side effects:
* May add an entery into the table of compiled locals.
*
*----------------------------------------------------------------------
*/
int
TclLocalScalarFromToken(
Tcl_Token *tokenPtr,
CompileEnv *envPtr)
{
int isScalar, index;
TclPushVarName(NULL, tokenPtr, envPtr, TCL_NO_ELEMENT, &index, &isScalar);
if (!isScalar) {
index = -1;
}
return index;
}
int
TclLocalScalar(
const char *bytes,
int numBytes,
CompileEnv *envPtr)
{
Tcl_Token token[2] = {{TCL_TOKEN_SIMPLE_WORD, NULL, 0, 1},
{TCL_TOKEN_TEXT, NULL, 0, 0}};
token[1].start = bytes;
token[1].size = numBytes;
return TclLocalScalarFromToken(token, envPtr);
}
/*
*----------------------------------------------------------------------
*
@@ -3172,16 +3298,7 @@ TclPushVarName(
nameChars = elNameChars = 0;
localIndex = -1;
/*
* Check not only that the type is TCL_TOKEN_SIMPLE_WORD, but whether
* curly braces surround the variable name. This really matters for array
* elements to handle things like
* set {x($foo)} 5
* which raises an undefined var error if we are not careful here.
*/
if ((varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) &&
(varTokenPtr->start[0] != '{')) {
if (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
/*
* A simple variable name. Divide it up into "name" and "elName"
* strings. If it is not a local variable, look it up at runtime.
@@ -3205,7 +3322,7 @@ TclPushVarName(
}
}
if ((elName != NULL) && elNameChars) {
if (!(flags & TCL_NO_ELEMENT) && (elName != NULL) && elNameChars) {
/*
* An array element, the element name is a simple string:
* assemble the corresponding token.
@@ -3220,7 +3337,7 @@ TclPushVarName(
elemTokenCount = 1;
}
}
} else if (((n = varTokenPtr->numComponents) > 1)
} else if (interp && ((n = varTokenPtr->numComponents) > 1)
&& (varTokenPtr[1].type == TCL_TOKEN_TEXT)
&& (varTokenPtr[n].type == TCL_TOKEN_TEXT)
&& (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) {
@@ -3256,9 +3373,10 @@ TclPushVarName(
nameChars = p - varTokenPtr[1].start;
elName = p + 1;
remainingChars = (varTokenPtr[2].start - p) - 1;
elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 2;
elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 1;
if (remainingChars) {
if (!(flags & TCL_NO_ELEMENT)) {
if (remainingChars) {
/*
* Make a first token with the extra characters in the first
* token.
@@ -3278,13 +3396,14 @@ TclPushVarName(
memcpy(elemTokenPtr+1, varTokenPtr+2,
(n-1) * sizeof(Tcl_Token));
} else {
} else {
/*
* Use the already available tokens.
*/
elemTokenPtr = &varTokenPtr[2];
elemTokenCount = n - 1;
}
}
}
}
@@ -3319,7 +3438,7 @@ TclPushVarName(
localIndex = -1;
}
}
if (localIndex < 0) {
if (interp && localIndex < 0) {
PushLiteral(envPtr, name, nameChars);
}
@@ -3336,7 +3455,7 @@ TclPushVarName(
PushStringLiteral(envPtr, "");
}
}
} else {
} else if (interp) {
/*
* The var name isn't simple: compile and push it.
*/
+24 -17
View File
@@ -281,7 +281,6 @@ TclCompileIfCmd(
SetLineInformation(wordIdx);
Tcl_ResetResult(interp);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
TclClearNumConversion(envPtr);
if (jumpFalseFixupArray.next >= jumpFalseFixupArray.end) {
TclExpandJumpFixupArray(&jumpFalseFixupArray);
}
@@ -531,7 +530,6 @@ TclCompileIncrCmd(
} else {
SetLineInformation(2);
CompileTokens(envPtr, incrTokenPtr, interp);
TclClearNumConversion(envPtr);
}
} else { /* No incr amount given so use 1. */
haveImmValue = 1;
@@ -873,7 +871,7 @@ TclCompileLappendCmd(
/* TODO: Consider support for compiling expanded args. */
numWords = parsePtr->numWords;
if (numWords == 1) {
if (numWords < 3) {
return TCL_ERROR;
}
@@ -1480,7 +1478,7 @@ TclCompileLreplaceCmd(
Tcl_Token *tokenPtr, *listTokenPtr;
DefineLineInformation; /* TIP #280 */
Tcl_Obj *tmpObj;
int idx1, idx2, i, offset;
int idx1, idx2, i, offset, offset2;
if (parsePtr->numWords < 4) {
return TCL_ERROR;
@@ -1586,12 +1584,18 @@ TclCompileLreplaceCmd(
TclEmitOpcode( INST_GT, envPtr);
offset = CurrentOffset(envPtr);
TclEmitInstInt1( INST_JUMP_TRUE1, 0, envPtr);
TclEmitOpcode( INST_DUP, envPtr);
TclEmitOpcode( INST_LIST_LENGTH, envPtr);
offset2 = CurrentOffset(envPtr);
TclEmitInstInt1( INST_JUMP_FALSE1, 0, envPtr);
TclEmitPush(TclAddLiteralObj(envPtr, Tcl_ObjPrintf(
"list doesn't contain element %d", idx1), NULL), envPtr);
CompileReturnInternal(envPtr, INST_RETURN_IMM, TCL_ERROR, 0,
Tcl_ObjPrintf("-errorcode {TCL OPERATION LREPLACE BADIDX}"));
TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset,
envPtr->codeStart + offset + 1);
TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset2,
envPtr->codeStart + offset2 + 1);
TclAdjustStackDepth(-1, envPtr);
}
TclEmitOpcode( INST_DUP, envPtr);
@@ -1636,12 +1640,18 @@ TclCompileLreplaceCmd(
TclEmitOpcode( INST_GT, envPtr);
offset = CurrentOffset(envPtr);
TclEmitInstInt1( INST_JUMP_TRUE1, 0, envPtr);
TclEmitOpcode( INST_DUP, envPtr);
TclEmitOpcode( INST_LIST_LENGTH, envPtr);
offset2 = CurrentOffset(envPtr);
TclEmitInstInt1( INST_JUMP_TRUE1, 0, envPtr);
TclEmitPush(TclAddLiteralObj(envPtr, Tcl_ObjPrintf(
"list doesn't contain element %d", idx1), NULL), envPtr);
CompileReturnInternal(envPtr, INST_RETURN_IMM, TCL_ERROR, 0,
Tcl_ObjPrintf("-errorcode {TCL OPERATION LREPLACE BADIDX}"));
TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset,
envPtr->codeStart + offset + 1);
TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset2,
envPtr->codeStart + offset2 + 1);
TclAdjustStackDepth(-1, envPtr);
}
TclEmitOpcode( INST_DUP, envPtr);
@@ -2034,7 +2044,7 @@ TclCompileNamespaceUpvarCmd(
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr;
int isScalar, localIndex, numWords, i;
int localIndex, numWords, i;
DefineLineInformation; /* TIP #280 */
if (envPtr->procPtr == NULL) {
@@ -2069,10 +2079,8 @@ TclCompileNamespaceUpvarCmd(
localTokenPtr = TokenAfter(otherTokenPtr);
CompileWord(envPtr, otherTokenPtr, interp, i);
PushVarNameWord(interp, localTokenPtr, envPtr, 0,
&localIndex, &isScalar, i+1);
if ((localIndex < 0) || !isScalar) {
localIndex = LocalScalarFromToken(localTokenPtr, envPtr);
if (localIndex < 0) {
return TCL_ERROR;
}
TclEmitInstInt4( INST_NSUPVAR, localIndex, envPtr);
@@ -2258,7 +2266,7 @@ TclCompileRegexpCmd(
* converted pattern as a literal.
*/
if (TclReToGlob(NULL, varTokenPtr[1].start, len, &ds, &exact)
if (TclReToGlob(NULL, varTokenPtr[1].start, len, &ds, &exact, NULL)
== TCL_OK) {
simple = 1;
PushLiteral(envPtr, Tcl_DStringValue(&ds),Tcl_DStringLength(&ds));
@@ -2350,7 +2358,7 @@ TclCompileRegsubCmd(
Tcl_Obj *patternObj = NULL, *replacementObj = NULL;
Tcl_DString pattern;
const char *bytes;
int len, exact, result = TCL_ERROR;
int len, exact, quantified, result = TCL_ERROR;
if (parsePtr->numWords < 5 || parsePtr->numWords > 6) {
return TCL_ERROR;
@@ -2410,7 +2418,8 @@ TclCompileRegsubCmd(
*/
bytes = Tcl_GetStringFromObj(patternObj, &len);
if (TclReToGlob(NULL, bytes, len, &pattern, &exact) != TCL_OK || exact) {
if (TclReToGlob(NULL, bytes, len, &pattern, &exact, &quantified)
!= TCL_OK || exact || quantified) {
goto done;
}
bytes = Tcl_DStringValue(&pattern);
@@ -2752,7 +2761,7 @@ TclCompileUpvarCmd(
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr;
int isScalar, localIndex, numWords, i;
int localIndex, numWords, i;
DefineLineInformation; /* TIP #280 */
Tcl_Obj *objPtr;
@@ -2815,10 +2824,8 @@ TclCompileUpvarCmd(
localTokenPtr = TokenAfter(otherTokenPtr);
CompileWord(envPtr, otherTokenPtr, interp, i);
PushVarNameWord(interp, localTokenPtr, envPtr, 0,
&localIndex, &isScalar, i+1);
if ((localIndex < 0) || !isScalar) {
localIndex = LocalScalarFromToken(localTokenPtr, envPtr);
if (localIndex < 0) {
return TCL_ERROR;
}
TclEmitInstInt4( INST_UPVAR, localIndex, envPtr);
+105 -3
View File
@@ -28,6 +28,9 @@ static void FreeJumptableInfo(ClientData clientData);
static void PrintJumptableInfo(ClientData clientData,
Tcl_Obj *appendObj, ByteCode *codePtr,
unsigned int pcOffset);
static void DisassembleJumptableInfo(ClientData clientData,
Tcl_Obj *dictObj, ByteCode *codePtr,
unsigned int pcOffset);
static int CompileAssociativeBinaryOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, const char *identity,
int instruction, CompileEnv *envPtr);
@@ -72,7 +75,8 @@ const AuxDataType tclJumptableInfoType = {
"JumptableInfo", /* name */
DupJumptableInfo, /* dupProc */
FreeJumptableInfo, /* freeProc */
PrintJumptableInfo /* printProc */
PrintJumptableInfo, /* printProc */
DisassembleJumptableInfo /* disassembleProc */
};
/*
@@ -268,6 +272,78 @@ TclCompileSetCmd(
*----------------------------------------------------------------------
*/
int
TclCompileStringCatCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
int i, numWords = parsePtr->numWords, numArgs;
Tcl_Token *wordTokenPtr;
Tcl_Obj *obj, *folded;
DefineLineInformation; /* TIP #280 */
/* Trivial case, no arg */
if (numWords<2) {
PushStringLiteral(envPtr, "");
return TCL_OK;
}
/* General case: issue CONCAT1's (by chunks of 254 if needed), folding
contiguous constants along the way */
numArgs = 0;
folded = NULL;
wordTokenPtr = TokenAfter(parsePtr->tokenPtr);
for (i = 1; i < numWords; i++) {
obj = Tcl_NewObj();
if (TclWordKnownAtCompileTime(wordTokenPtr, obj)) {
if (folded) {
Tcl_AppendObjToObj(folded, obj);
Tcl_DecrRefCount(obj);
} else {
folded = obj;
}
} else {
Tcl_DecrRefCount(obj);
if (folded) {
int len;
const char *bytes = Tcl_GetStringFromObj(folded, &len);
PushLiteral(envPtr, bytes, len);
Tcl_DecrRefCount(folded);
folded = NULL;
numArgs ++;
}
CompileWord(envPtr, wordTokenPtr, interp, i);
numArgs ++;
if (numArgs >= 254) { /* 254 to take care of the possible +1 of "folded" above */
TclEmitInstInt1(INST_STR_CONCAT1, numArgs, envPtr);
numArgs = 1; /* concat pushes 1 obj, the result */
}
}
wordTokenPtr = TokenAfter(wordTokenPtr);
}
if (folded) {
int len;
const char *bytes = Tcl_GetStringFromObj(folded, &len);
PushLiteral(envPtr, bytes, len);
Tcl_DecrRefCount(folded);
folded = NULL;
numArgs ++;
}
if (numArgs > 1) {
TclEmitInstInt1(INST_STR_CONCAT1, numArgs, envPtr);
}
return TCL_OK;
}
int
TclCompileStringCmpCmd(
Tcl_Interp *interp, /* Used for error reporting. */
@@ -2019,7 +2095,7 @@ IssueSwitchChainedTests(
*/
if (TclReToGlob(NULL, bodyToken[i]->start,
bodyToken[i]->size, &ds, &exact) == TCL_OK) {
bodyToken[i]->size, &ds, &exact, NULL) == TCL_OK){
simple = 1;
PushLiteral(envPtr, Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds));
@@ -2369,11 +2445,13 @@ IssueSwitchJumpTable(
* DupJumptableInfo: a copy of the jump-table
* FreeJumptableInfo: none
* PrintJumptableInfo: none
* DisassembleJumptableInfo: none
*
* Side effects:
* DupJumptableInfo: allocates memory
* FreeJumptableInfo: releases memory
* PrintJumptableInfo: none
* DisassembleJumptableInfo: none
*
*----------------------------------------------------------------------
*/
@@ -2436,6 +2514,30 @@ PrintJumptableInfo(
keyPtr, pcOffset + offset);
}
}
static void
DisassembleJumptableInfo(
ClientData clientData,
Tcl_Obj *dictObj,
ByteCode *codePtr,
unsigned int pcOffset)
{
register JumptableInfo *jtPtr = clientData;
Tcl_Obj *mapping = Tcl_NewObj();
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
const char *keyPtr;
int offset;
hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search);
for (; hPtr ; hPtr = Tcl_NextHashEntry(&search)) {
keyPtr = Tcl_GetHashKey(&jtPtr->hashTable, hPtr);
offset = PTR2INT(Tcl_GetHashValue(hPtr));
Tcl_DictObjPut(NULL, mapping, Tcl_NewStringObj(keyPtr, -1),
Tcl_NewIntObj(offset));
}
Tcl_DictObjPut(NULL, dictObj, Tcl_NewStringObj("mapping", -1), mapping);
}
/*
*----------------------------------------------------------------------
@@ -2966,6 +3068,7 @@ IssueTryClausesInstructions(
if (!handlerTokens[i]) {
forwardsNeedFixing = 1;
JUMP4( JUMP, forwardsToFix[i]);
TclAdjustStackDepth(1, envPtr);
} else {
int dontChangeOptions;
@@ -3679,7 +3782,6 @@ TclCompileWhileCmd(
}
SetLineInformation(1);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
TclClearNumConversion(envPtr);
jumpDist = CurrentOffset(envPtr) - bodyCodeOffset;
if (jumpDist > 127) {
+40 -43
View File
@@ -365,7 +365,7 @@ static const unsigned char prec[] = {
0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
0,
/* Unary operator lexemes */
PREC_UNARY, /* UNARY_PLUS */
PREC_UNARY, /* UNARY_MINUS */
@@ -420,7 +420,7 @@ static const unsigned char instruction[] = {
0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
0,
/* Unary operator lexemes */
INST_UPLUS, /* UNARY_PLUS */
INST_UMINUS, /* UNARY_MINUS */
@@ -488,7 +488,7 @@ static const unsigned char Lexeme[] = {
typedef struct JumpList {
JumpFixup jump; /* Pass this argument to matching calls of
* TclEmitForwardJump() and
* TclEmitForwardJump() and
* TclFixupForwardJump(). */
struct JumpList *next; /* Point to next item on the stack */
} JumpList;
@@ -838,7 +838,7 @@ ParseExpr(
switch (lexeme) {
case NUMBER:
case BOOLEAN:
case BOOLEAN:
/*
* TODO: Consider using a dict or hash to collapse all
* duplicate literals into a single representative value.
@@ -861,7 +861,7 @@ ParseExpr(
start += scanned;
numBytes -= scanned;
continue;
default:
break;
}
@@ -1324,7 +1324,7 @@ ParseExpr(
nodePtr->mark = MARK_LEFT;
nodePtr->left = complete;
/*
/*
* The COMMA operator cannot be optimized, since the function
* needs all of its arguments, and optimization would reduce the
* number. Other binary operators root constant expressions when
@@ -1546,7 +1546,7 @@ ConvertTreeToTokens(
* Tcl_ParseExpr() we do not change them now. Internally, we can
* do better.
*/
int toCopy = tokenPtr->numComponents + 1;
if (tokenPtr->numComponents == tokenPtr[1].numComponents + 1) {
@@ -1562,7 +1562,7 @@ ConvertTreeToTokens(
subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR;
parsePtr->numTokens += toCopy;
} else {
/*
/*
* Multiple element word. Create a TCL_TOKEN_SUB_EXPR token to
* lead, with fields initialized from the leading token, then
* copy entire set of word tokens.
@@ -1611,7 +1611,7 @@ ConvertTreeToTokens(
case COMMA:
case COLON:
/*
/*
* Historical practice has been to have no Tcl_Tokens for
* these operators.
*/
@@ -1747,7 +1747,7 @@ ConvertTreeToTokens(
/*
* Before we leave this node/operator/subexpression for the
* last time, finish up its tokens....
*
*
* Our current position scanning the string is where the
* substring for the subexpression ends.
*/
@@ -1967,7 +1967,7 @@ ParseLexeme(
case 'i':
if ((numBytes > 1) && (start[1] == 'n')
&& ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
&& ((numBytes == 2) || start[2] & 0x80 || !isalpha(UCHAR(start[2])))) {
/*
* Must make this check so we can tell the difference between the
* "in" operator and the "int" function name and the "infinity"
@@ -1981,14 +1981,15 @@ ParseLexeme(
case 'e':
if ((numBytes > 1) && (start[1] == 'q')
&& ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
&& ((numBytes == 2) || start[2] & 0x80 || !isalpha(UCHAR(start[2])))) {
*lexemePtr = STREQ;
return 2;
}
break;
case 'n':
if ((numBytes > 1) && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
if ((numBytes > 1)
&& ((numBytes == 2) || start[2] & 0x80 || !isalpha(UCHAR(start[2])))) {
switch (start[1]) {
case 'e':
*lexemePtr = STRNEQ;
@@ -2003,9 +2004,8 @@ ParseLexeme(
literal = Tcl_NewObj();
if (TclParseNumber(NULL, literal, NULL, start, numBytes, &end,
TCL_PARSE_NO_WHITESPACE) == TCL_OK) {
if (end < start + numBytes && !isalnum(UCHAR(*end))
&& UCHAR(*end) != '_') {
if (end < start + numBytes && !TclIsBareword(*end)) {
number:
TclInitStringRep(literal, start, end-start);
*lexemePtr = NUMBER;
@@ -2029,9 +2029,9 @@ ParseLexeme(
const char *p = start;
while (p < end) {
if (!isalnum(UCHAR(*p++))) {
if (!TclIsBareword(*p++)) {
/*
* The number has non-bareword characters, so we
* The number has non-bareword characters, so we
* must treat it as a number.
*/
goto number;
@@ -2054,33 +2054,30 @@ ParseLexeme(
}
}
if (Tcl_UtfCharComplete(start, numBytes)) {
scanned = Tcl_UtfToUniChar(start, &ch);
} else {
char utfBytes[TCL_UTF_MAX];
/*
* We reject leading underscores in bareword. No sensible reason why.
* Might be inspired by reserved identifier rules in C, which of course
* have no direct relevance here.
*/
memcpy(utfBytes, start, (size_t) numBytes);
utfBytes[numBytes] = '\0';
scanned = Tcl_UtfToUniChar(utfBytes, &ch);
}
if (!isalnum(UCHAR(ch))) {
if (!TclIsBareword(*start) || *start == '_') {
if (Tcl_UtfCharComplete(start, numBytes)) {
scanned = Tcl_UtfToUniChar(start, &ch);
} else {
char utfBytes[TCL_UTF_MAX];
memcpy(utfBytes, start, (size_t) numBytes);
utfBytes[numBytes] = '\0';
scanned = Tcl_UtfToUniChar(utfBytes, &ch);
}
*lexemePtr = INVALID;
Tcl_DecrRefCount(literal);
return scanned;
}
end = start;
while (isalnum(UCHAR(ch)) || (UCHAR(ch) == '_')) {
end += scanned;
numBytes -= scanned;
if (Tcl_UtfCharComplete(end, numBytes)) {
scanned = Tcl_UtfToUniChar(end, &ch);
} else {
char utfBytes[TCL_UTF_MAX];
memcpy(utfBytes, end, (size_t) numBytes);
utfBytes[numBytes] = '\0';
scanned = Tcl_UtfToUniChar(utfBytes, &ch);
}
while (numBytes && TclIsBareword(*end)) {
end += 1;
numBytes -= 1;
}
*lexemePtr = BAREWORD;
if (literalPtr) {
@@ -2098,7 +2095,7 @@ ParseLexeme(
* TclCompileExpr --
*
* This procedure compiles a string containing a Tcl expression into Tcl
* bytecodes.
* bytecodes.
*
* Results:
* None.
@@ -2333,7 +2330,7 @@ CompileExprTree(
* Use the numWords count we've kept to invoke the function
* command with the correct number of arguments.
*/
if (numWords < 255) {
TclEmitInvoke(envPtr, INST_INVOKE_STK1, numWords);
} else {
@@ -2427,7 +2424,7 @@ CompileExprTree(
const char *bytes = TclGetStringFromObj(literal, &length);
int index = TclRegisterNewLiteral(envPtr, bytes, length);
Tcl_Obj *objPtr = TclFetchLiteral(envPtr, index);
if ((objPtr->typePtr == NULL) && (literal->typePtr != NULL)) {
/*
* Would like to do this:
@@ -2570,7 +2567,7 @@ TclSingleOpCmd(
*
* TclSortingOpCmd --
* Implements the commands:
* <, <=, >, >=, ==, eq
* <, <=, >, >=, ==, eq
* in the ::tcl::mathop namespace. These commands are defined for
* arbitrary number of arguments by computing the AND of the base
* operator applied to all neighbor argument pairs.
+11 -818
View File
@@ -55,9 +55,9 @@ InstructionDesc const tclInstructionTable[] = {
/* Name Bytes stackEffect #Opnds Operand types */
{"done", 1, -1, 0, {OPERAND_NONE}},
/* Finish ByteCode execution and return stktop (top stack item) */
{"push1", 2, +1, 1, {OPERAND_UINT1}},
{"push1", 2, +1, 1, {OPERAND_LIT1}},
/* Push object at ByteCode objArray[op1] */
{"push4", 5, +1, 1, {OPERAND_UINT4}},
{"push4", 5, +1, 1, {OPERAND_LIT4}},
/* Push object at ByteCode objArray[op4] */
{"pop", 1, -1, 0, {OPERAND_NONE}},
/* Pop the topmost stack object */
@@ -125,17 +125,17 @@ InstructionDesc const tclInstructionTable[] = {
{"incrStkImm", 2, 0, 1, {OPERAND_INT1}},
/* Incr general variable; unparsed name is top, amount is op1 */
{"jump1", 2, 0, 1, {OPERAND_INT1}},
{"jump1", 2, 0, 1, {OPERAND_OFFSET1}},
/* Jump relative to (pc + op1) */
{"jump4", 5, 0, 1, {OPERAND_INT4}},
{"jump4", 5, 0, 1, {OPERAND_OFFSET4}},
/* Jump relative to (pc + op4) */
{"jumpTrue1", 2, -1, 1, {OPERAND_INT1}},
{"jumpTrue1", 2, -1, 1, {OPERAND_OFFSET1}},
/* Jump relative to (pc + op1) if stktop expr object is true */
{"jumpTrue4", 5, -1, 1, {OPERAND_INT4}},
{"jumpTrue4", 5, -1, 1, {OPERAND_OFFSET4}},
/* Jump relative to (pc + op4) if stktop expr object is true */
{"jumpFalse1", 2, -1, 1, {OPERAND_INT1}},
{"jumpFalse1", 2, -1, 1, {OPERAND_OFFSET1}},
/* Jump relative to (pc + op1) if stktop expr object is false */
{"jumpFalse4", 5, -1, 1, {OPERAND_INT4}},
{"jumpFalse4", 5, -1, 1, {OPERAND_OFFSET4}},
/* Jump relative to (pc + op4) if stktop expr object is false */
{"lor", 1, -1, 0, {OPERAND_NONE}},
@@ -298,7 +298,7 @@ InstructionDesc const tclInstructionTable[] = {
/* List Index: push (lindex stktop op4) */
{"listRangeImm", 9, 0, 2, {OPERAND_IDX4, OPERAND_IDX4}},
/* List Range: push (lrange stktop op4 op4) */
{"startCommand", 9, 0, 2, {OPERAND_INT4,OPERAND_UINT4}},
{"startCommand", 9, 0, 2, {OPERAND_OFFSET4, OPERAND_UINT4}},
/* Start of bytecoded command: op is the length of the cmd's code, op2
* is number of commands here */
@@ -692,11 +692,6 @@ static void RegisterAuxDataType(const AuxDataType *typePtr);
static int SetByteCodeFromAny(Tcl_Interp *interp,
Tcl_Obj *objPtr);
static void StartExpanding(CompileEnv *envPtr);
static int FormatInstruction(ByteCode *codePtr,
const unsigned char *pc, Tcl_Obj *bufferObj);
static void PrintSourceToObj(Tcl_Obj *appendObj,
const char *stringPtr, int maxChars);
static void UpdateStringOfInstName(Tcl_Obj *objPtr);
/*
* TIP #280: Helper for building the per-word line information of all compiled
@@ -734,19 +729,6 @@ static const Tcl_ObjType substCodeType = {
NULL, /* setFromAnyProc */
};
/*
* The structure below defines an instruction name Tcl object to allow
* reporting of inner contexts in errorstack without string allocation.
*/
static const Tcl_ObjType tclInstNameType = {
"instname", /* name */
NULL, /* freeIntRepProc */
NULL, /* dupIntRepProc */
UpdateStringOfInstName, /* updateStringProc */
NULL, /* setFromAnyProc */
};
/*
* Helper macros.
*/
@@ -4360,10 +4342,11 @@ TclInitAuxDataTypeTable(void)
Tcl_InitHashTable(&auxDataTypeTable, TCL_STRING_KEYS);
/*
* There are only three AuxData types at this time, so register them here.
* There are only four AuxData types at this time, so register them here.
*/
RegisterAuxDataType(&tclForeachInfoType);
RegisterAuxDataType(&tclNewForeachInfoType);
RegisterAuxDataType(&tclJumptableInfoType);
RegisterAuxDataType(&tclDictUpdateInfoType);
}
@@ -4596,796 +4579,6 @@ EncodeCmdLocMap(
return p;
}
#ifdef TCL_COMPILE_DEBUG
/*
*----------------------------------------------------------------------
*
* TclPrintByteCodeObj --
*
* This procedure prints ("disassembles") the instructions of a bytecode
* object to stdout.
*
* Results:
* None.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
void
TclPrintByteCodeObj(
Tcl_Interp *interp, /* Used only for Tcl_GetStringFromObj. */
Tcl_Obj *objPtr) /* The bytecode object to disassemble. */
{
Tcl_Obj *bufPtr = TclDisassembleByteCodeObj(objPtr);
fprintf(stdout, "\n%s", TclGetString(bufPtr));
Tcl_DecrRefCount(bufPtr);
}
/*
*----------------------------------------------------------------------
*
* TclPrintInstruction --
*
* This procedure prints ("disassembles") one instruction from a bytecode
* object to stdout.
*
* Results:
* Returns the length in bytes of the current instruiction.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TclPrintInstruction(
ByteCode *codePtr, /* Bytecode containing the instruction. */
const unsigned char *pc) /* Points to first byte of instruction. */
{
Tcl_Obj *bufferObj;
int numBytes;
TclNewObj(bufferObj);
numBytes = FormatInstruction(codePtr, pc, bufferObj);
fprintf(stdout, "%s", TclGetString(bufferObj));
Tcl_DecrRefCount(bufferObj);
return numBytes;
}
/*
*----------------------------------------------------------------------
*
* TclPrintObject --
*
* This procedure prints up to a specified number of characters from the
* argument Tcl object's string representation to a specified file.
*
* Results:
* None.
*
* Side effects:
* Outputs characters to the specified file.
*
*----------------------------------------------------------------------
*/
void
TclPrintObject(
FILE *outFile, /* The file to print the source to. */
Tcl_Obj *objPtr, /* Points to the Tcl object whose string
* representation should be printed. */
int maxChars) /* Maximum number of chars to print. */
{
char *bytes;
int length;
bytes = Tcl_GetStringFromObj(objPtr, &length);
TclPrintSource(outFile, bytes, TclMin(length, maxChars));
}
/*
*----------------------------------------------------------------------
*
* TclPrintSource --
*
* This procedure prints up to a specified number of characters from the
* argument string to a specified file. It tries to produce legible
* output by adding backslashes as necessary.
*
* Results:
* None.
*
* Side effects:
* Outputs characters to the specified file.
*
*----------------------------------------------------------------------
*/
void
TclPrintSource(
FILE *outFile, /* The file to print the source to. */
const char *stringPtr, /* The string to print. */
int maxChars) /* Maximum number of chars to print. */
{
Tcl_Obj *bufferObj;
TclNewObj(bufferObj);
PrintSourceToObj(bufferObj, stringPtr, maxChars);
fprintf(outFile, "%s", TclGetString(bufferObj));
Tcl_DecrRefCount(bufferObj);
}
#endif /* TCL_COMPILE_DEBUG */
/*
*----------------------------------------------------------------------
*
* TclDisassembleByteCodeObj --
*
* Given an object which is of bytecode type, return a disassembled
* version of the bytecode (in a new refcount 0 object). No guarantees
* are made about the details of the contents of the result.
*
*----------------------------------------------------------------------
*/
Tcl_Obj *
TclDisassembleByteCodeObj(
Tcl_Obj *objPtr) /* The bytecode object to disassemble. */
{
ByteCode *codePtr = objPtr->internalRep.twoPtrValue.ptr1;
unsigned char *codeStart, *codeLimit, *pc;
unsigned char *codeDeltaNext, *codeLengthNext;
unsigned char *srcDeltaNext, *srcLengthNext;
int codeOffset, codeLen, srcOffset, srcLen, numCmds, delta, i;
Interp *iPtr = (Interp *) *codePtr->interpHandle;
Tcl_Obj *bufferObj;
char ptrBuf1[20], ptrBuf2[20];
TclNewObj(bufferObj);
if (codePtr->refCount <= 0) {
return bufferObj; /* Already freed. */
}
codeStart = codePtr->codeStart;
codeLimit = codeStart + codePtr->numCodeBytes;
numCmds = codePtr->numCommands;
/*
* Print header lines describing the ByteCode.
*/
sprintf(ptrBuf1, "%p", codePtr);
sprintf(ptrBuf2, "%p", iPtr);
Tcl_AppendPrintfToObj(bufferObj,
"ByteCode 0x%s, refCt %u, epoch %u, interp 0x%s (epoch %u)\n",
ptrBuf1, codePtr->refCount, codePtr->compileEpoch, ptrBuf2,
iPtr->compileEpoch);
Tcl_AppendToObj(bufferObj, " Source ", -1);
PrintSourceToObj(bufferObj, codePtr->source,
TclMin(codePtr->numSrcBytes, 55));
Tcl_AppendPrintfToObj(bufferObj,
"\n Cmds %d, src %d, inst %d, litObjs %u, aux %d, stkDepth %u, code/src %.2f\n",
numCmds, codePtr->numSrcBytes, codePtr->numCodeBytes,
codePtr->numLitObjects, codePtr->numAuxDataItems,
codePtr->maxStackDepth,
#ifdef TCL_COMPILE_STATS
codePtr->numSrcBytes?
codePtr->structureSize/(float)codePtr->numSrcBytes :
#endif
0.0);
#ifdef TCL_COMPILE_STATS
Tcl_AppendPrintfToObj(bufferObj,
" Code %lu = header %lu+inst %d+litObj %lu+exc %lu+aux %lu+cmdMap %d\n",
(unsigned long) codePtr->structureSize,
(unsigned long) (sizeof(ByteCode) - sizeof(size_t) - sizeof(Tcl_Time)),
codePtr->numCodeBytes,
(unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)),
(unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)),
(unsigned long) (codePtr->numAuxDataItems * sizeof(AuxData)),
codePtr->numCmdLocBytes);
#endif /* TCL_COMPILE_STATS */
/*
* If the ByteCode is the compiled body of a Tcl procedure, print
* information about that procedure. Note that we don't know the
* procedure's name since ByteCode's can be shared among procedures.
*/
if (codePtr->procPtr != NULL) {
Proc *procPtr = codePtr->procPtr;
int numCompiledLocals = procPtr->numCompiledLocals;
sprintf(ptrBuf1, "%p", procPtr);
Tcl_AppendPrintfToObj(bufferObj,
" Proc 0x%s, refCt %d, args %d, compiled locals %d\n",
ptrBuf1, procPtr->refCount, procPtr->numArgs,
numCompiledLocals);
if (numCompiledLocals > 0) {
CompiledLocal *localPtr = procPtr->firstLocalPtr;
for (i = 0; i < numCompiledLocals; i++) {
Tcl_AppendPrintfToObj(bufferObj,
" slot %d%s%s%s%s%s%s", i,
(localPtr->flags & (VAR_ARRAY|VAR_LINK)) ? "" : ", scalar",
(localPtr->flags & VAR_ARRAY) ? ", array" : "",
(localPtr->flags & VAR_LINK) ? ", link" : "",
(localPtr->flags & VAR_ARGUMENT) ? ", arg" : "",
(localPtr->flags & VAR_TEMPORARY) ? ", temp" : "",
(localPtr->flags & VAR_RESOLVED) ? ", resolved" : "");
if (TclIsVarTemporary(localPtr)) {
Tcl_AppendToObj(bufferObj, "\n", -1);
} else {
Tcl_AppendPrintfToObj(bufferObj, ", \"%s\"\n",
localPtr->name);
}
localPtr = localPtr->nextPtr;
}
}
}
/*
* Print the ExceptionRange array.
*/
if (codePtr->numExceptRanges > 0) {
Tcl_AppendPrintfToObj(bufferObj, " Exception ranges %d, depth %d:\n",
codePtr->numExceptRanges, codePtr->maxExceptDepth);
for (i = 0; i < codePtr->numExceptRanges; i++) {
ExceptionRange *rangePtr = &codePtr->exceptArrayPtr[i];
Tcl_AppendPrintfToObj(bufferObj,
" %d: level %d, %s, pc %d-%d, ",
i, rangePtr->nestingLevel,
(rangePtr->type==LOOP_EXCEPTION_RANGE ? "loop" : "catch"),
rangePtr->codeOffset,
(rangePtr->codeOffset + rangePtr->numCodeBytes - 1));
switch (rangePtr->type) {
case LOOP_EXCEPTION_RANGE:
Tcl_AppendPrintfToObj(bufferObj, "continue %d, break %d\n",
rangePtr->continueOffset, rangePtr->breakOffset);
break;
case CATCH_EXCEPTION_RANGE:
Tcl_AppendPrintfToObj(bufferObj, "catch %d\n",
rangePtr->catchOffset);
break;
default:
Tcl_Panic("TclDisassembleByteCodeObj: bad ExceptionRange type %d",
rangePtr->type);
}
}
}
/*
* If there were no commands (e.g., an expression or an empty string was
* compiled), just print all instructions and return.
*/
if (numCmds == 0) {
pc = codeStart;
while (pc < codeLimit) {
Tcl_AppendToObj(bufferObj, " ", -1);
pc += FormatInstruction(codePtr, pc, bufferObj);
}
return bufferObj;
}
/*
* Print table showing the code offset, source offset, and source length
* for each command. These are encoded as a sequence of bytes.
*/
Tcl_AppendPrintfToObj(bufferObj, " Commands %d:", numCmds);
codeDeltaNext = codePtr->codeDeltaStart;
codeLengthNext = codePtr->codeLengthStart;
srcDeltaNext = codePtr->srcDeltaStart;
srcLengthNext = codePtr->srcLengthStart;
codeOffset = srcOffset = 0;
for (i = 0; i < numCmds; i++) {
if ((unsigned) *codeDeltaNext == (unsigned) 0xFF) {
codeDeltaNext++;
delta = TclGetInt4AtPtr(codeDeltaNext);
codeDeltaNext += 4;
} else {
delta = TclGetInt1AtPtr(codeDeltaNext);
codeDeltaNext++;
}
codeOffset += delta;
if ((unsigned) *codeLengthNext == (unsigned) 0xFF) {
codeLengthNext++;
codeLen = TclGetInt4AtPtr(codeLengthNext);
codeLengthNext += 4;
} else {
codeLen = TclGetInt1AtPtr(codeLengthNext);
codeLengthNext++;
}
if ((unsigned) *srcDeltaNext == (unsigned) 0xFF) {
srcDeltaNext++;
delta = TclGetInt4AtPtr(srcDeltaNext);
srcDeltaNext += 4;
} else {
delta = TclGetInt1AtPtr(srcDeltaNext);
srcDeltaNext++;
}
srcOffset += delta;
if ((unsigned) *srcLengthNext == (unsigned) 0xFF) {
srcLengthNext++;
srcLen = TclGetInt4AtPtr(srcLengthNext);
srcLengthNext += 4;
} else {
srcLen = TclGetInt1AtPtr(srcLengthNext);
srcLengthNext++;
}
Tcl_AppendPrintfToObj(bufferObj, "%s%4d: pc %d-%d, src %d-%d",
((i % 2)? " " : "\n "),
(i+1), codeOffset, (codeOffset + codeLen - 1),
srcOffset, (srcOffset + srcLen - 1));
}
if (numCmds > 0) {
Tcl_AppendToObj(bufferObj, "\n", -1);
}
/*
* Print each instruction. If the instruction corresponds to the start of
* a command, print the command's source. Note that we don't need the code
* length here.
*/
codeDeltaNext = codePtr->codeDeltaStart;
srcDeltaNext = codePtr->srcDeltaStart;
srcLengthNext = codePtr->srcLengthStart;
codeOffset = srcOffset = 0;
pc = codeStart;
for (i = 0; i < numCmds; i++) {
if ((unsigned) *codeDeltaNext == (unsigned) 0xFF) {
codeDeltaNext++;
delta = TclGetInt4AtPtr(codeDeltaNext);
codeDeltaNext += 4;
} else {
delta = TclGetInt1AtPtr(codeDeltaNext);
codeDeltaNext++;
}
codeOffset += delta;
if ((unsigned) *srcDeltaNext == (unsigned) 0xFF) {
srcDeltaNext++;
delta = TclGetInt4AtPtr(srcDeltaNext);
srcDeltaNext += 4;
} else {
delta = TclGetInt1AtPtr(srcDeltaNext);
srcDeltaNext++;
}
srcOffset += delta;
if ((unsigned) *srcLengthNext == (unsigned) 0xFF) {
srcLengthNext++;
srcLen = TclGetInt4AtPtr(srcLengthNext);
srcLengthNext += 4;
} else {
srcLen = TclGetInt1AtPtr(srcLengthNext);
srcLengthNext++;
}
/*
* Print instructions before command i.
*/
while ((pc-codeStart) < codeOffset) {
Tcl_AppendToObj(bufferObj, " ", -1);
pc += FormatInstruction(codePtr, pc, bufferObj);
}
Tcl_AppendPrintfToObj(bufferObj, " Command %d: ", i+1);
PrintSourceToObj(bufferObj, (codePtr->source + srcOffset),
TclMin(srcLen, 55));
Tcl_AppendToObj(bufferObj, "\n", -1);
}
if (pc < codeLimit) {
/*
* Print instructions after the last command.
*/
while (pc < codeLimit) {
Tcl_AppendToObj(bufferObj, " ", -1);
pc += FormatInstruction(codePtr, pc, bufferObj);
}
}
return bufferObj;
}
/*
*----------------------------------------------------------------------
*
* FormatInstruction --
*
* Appends a representation of a bytecode instruction to a Tcl_Obj.
*
*----------------------------------------------------------------------
*/
static int
FormatInstruction(
ByteCode *codePtr, /* Bytecode containing the instruction. */
const unsigned char *pc, /* Points to first byte of instruction. */
Tcl_Obj *bufferObj) /* Object to append instruction info to. */
{
Proc *procPtr = codePtr->procPtr;
unsigned char opCode = *pc;
register const InstructionDesc *instDesc = &tclInstructionTable[opCode];
unsigned char *codeStart = codePtr->codeStart;
unsigned pcOffset = pc - codeStart;
int opnd = 0, i, j, numBytes = 1;
int localCt = procPtr ? procPtr->numCompiledLocals : 0;
CompiledLocal *localPtr = procPtr ? procPtr->firstLocalPtr : NULL;
char suffixBuffer[128]; /* Additional info to print after main opcode
* and immediates. */
char *suffixSrc = NULL;
Tcl_Obj *suffixObj = NULL;
AuxData *auxPtr = NULL;
suffixBuffer[0] = '\0';
Tcl_AppendPrintfToObj(bufferObj, "(%u) %s ", pcOffset, instDesc->name);
for (i = 0; i < instDesc->numOperands; i++) {
switch (instDesc->opTypes[i]) {
case OPERAND_INT1:
opnd = TclGetInt1AtPtr(pc+numBytes); numBytes++;
if (opCode == INST_JUMP1 || opCode == INST_JUMP_TRUE1
|| opCode == INST_JUMP_FALSE1) {
sprintf(suffixBuffer, "pc %u", pcOffset+opnd);
}
Tcl_AppendPrintfToObj(bufferObj, "%+d ", opnd);
break;
case OPERAND_INT4:
opnd = TclGetInt4AtPtr(pc+numBytes); numBytes += 4;
if (opCode == INST_JUMP4 || opCode == INST_JUMP_TRUE4
|| opCode == INST_JUMP_FALSE4) {
sprintf(suffixBuffer, "pc %u", pcOffset+opnd);
} else if (opCode == INST_START_CMD) {
sprintf(suffixBuffer, "next cmd at pc %u", pcOffset+opnd);
}
Tcl_AppendPrintfToObj(bufferObj, "%+d ", opnd);
break;
case OPERAND_UINT1:
opnd = TclGetUInt1AtPtr(pc+numBytes); numBytes++;
if (opCode == INST_PUSH1) {
suffixObj = codePtr->objArrayPtr[opnd];
}
Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned) opnd);
break;
case OPERAND_AUX4:
case OPERAND_UINT4:
opnd = TclGetUInt4AtPtr(pc+numBytes); numBytes += 4;
if (opCode == INST_PUSH4) {
suffixObj = codePtr->objArrayPtr[opnd];
} else if (opCode == INST_START_CMD && opnd != 1) {
sprintf(suffixBuffer+strlen(suffixBuffer),
", %u cmds start here", opnd);
}
Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned) opnd);
if (instDesc->opTypes[i] == OPERAND_AUX4) {
auxPtr = &codePtr->auxDataArrayPtr[opnd];
}
break;
case OPERAND_IDX4:
opnd = TclGetInt4AtPtr(pc+numBytes); numBytes += 4;
if (opnd >= -1) {
Tcl_AppendPrintfToObj(bufferObj, "%d ", opnd);
} else if (opnd == -2) {
Tcl_AppendPrintfToObj(bufferObj, "end ");
} else {
Tcl_AppendPrintfToObj(bufferObj, "end-%d ", -2-opnd);
}
break;
case OPERAND_LVT1:
opnd = TclGetUInt1AtPtr(pc+numBytes);
numBytes++;
goto printLVTindex;
case OPERAND_LVT4:
opnd = TclGetUInt4AtPtr(pc+numBytes);
numBytes += 4;
printLVTindex:
if (localPtr != NULL) {
if (opnd >= localCt) {
Tcl_Panic("FormatInstruction: bad local var index %u (%u locals)",
(unsigned) opnd, localCt);
}
for (j = 0; j < opnd; j++) {
localPtr = localPtr->nextPtr;
}
if (TclIsVarTemporary(localPtr)) {
sprintf(suffixBuffer, "temp var %u", (unsigned) opnd);
} else {
sprintf(suffixBuffer, "var ");
suffixSrc = localPtr->name;
}
}
Tcl_AppendPrintfToObj(bufferObj, "%%v%u ", (unsigned) opnd);
break;
case OPERAND_SCLS1:
opnd = TclGetUInt1AtPtr(pc+numBytes); numBytes++;
Tcl_AppendPrintfToObj(bufferObj, "%s ",
tclStringClassTable[opnd].name);
break;
case OPERAND_NONE:
default:
break;
}
}
if (suffixObj) {
const char *bytes;
int length;
Tcl_AppendToObj(bufferObj, "\t# ", -1);
bytes = Tcl_GetStringFromObj(codePtr->objArrayPtr[opnd], &length);
PrintSourceToObj(bufferObj, bytes, TclMin(length, 40));
} else if (suffixBuffer[0]) {
Tcl_AppendPrintfToObj(bufferObj, "\t# %s", suffixBuffer);
if (suffixSrc) {
PrintSourceToObj(bufferObj, suffixSrc, 40);
}
}
Tcl_AppendToObj(bufferObj, "\n", -1);
if (auxPtr && auxPtr->type->printProc) {
Tcl_AppendToObj(bufferObj, "\t\t[", -1);
auxPtr->type->printProc(auxPtr->clientData, bufferObj, codePtr,
pcOffset);
Tcl_AppendToObj(bufferObj, "]\n", -1);
}
return numBytes;
}
/*
*----------------------------------------------------------------------
*
* TclGetInnerContext --
*
* If possible, returns a list capturing the inner context. Otherwise
* return NULL.
*
*----------------------------------------------------------------------
*/
Tcl_Obj *
TclGetInnerContext(
Tcl_Interp *interp,
const unsigned char *pc,
Tcl_Obj **tosPtr)
{
int objc = 0, off = 0;
Tcl_Obj *result;
Interp *iPtr = (Interp *) interp;
switch (*pc) {
case INST_STR_LEN:
case INST_LNOT:
case INST_BITNOT:
case INST_UMINUS:
case INST_UPLUS:
case INST_TRY_CVT_TO_NUMERIC:
case INST_EXPAND_STKTOP:
case INST_EXPR_STK:
objc = 1;
break;
case INST_LIST_IN:
case INST_LIST_NOT_IN: /* Basic list containment operators. */
case INST_STR_EQ:
case INST_STR_NEQ: /* String (in)equality check */
case INST_STR_CMP: /* String compare. */
case INST_STR_INDEX:
case INST_STR_MATCH:
case INST_REGEXP:
case INST_EQ:
case INST_NEQ:
case INST_LT:
case INST_GT:
case INST_LE:
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:
objc = 2;
break;
case INST_RETURN_STK:
/* early pop. TODO: dig out opt dict too :/ */
objc = 1;
break;
case INST_SYNTAX:
case INST_RETURN_IMM:
objc = 2;
break;
case INST_INVOKE_STK4:
objc = TclGetUInt4AtPtr(pc+1);
break;
case INST_INVOKE_STK1:
objc = TclGetUInt1AtPtr(pc+1);
break;
}
result = iPtr->innerContext;
if (Tcl_IsShared(result)) {
Tcl_DecrRefCount(result);
iPtr->innerContext = result = Tcl_NewListObj(objc + 1, NULL);
Tcl_IncrRefCount(result);
} else {
int len;
/*
* Reset while keeping the list intrep as much as possible.
*/
Tcl_ListObjLength(interp, result, &len);
Tcl_ListObjReplace(interp, result, 0, len, 0, NULL);
}
Tcl_ListObjAppendElement(NULL, result, TclNewInstNameObj(*pc));
for (; objc>0 ; objc--) {
Tcl_Obj *objPtr;
objPtr = tosPtr[1 - objc + off];
if (!objPtr) {
Tcl_Panic("InnerContext: bad tos -- appending null object");
}
if ((objPtr->refCount<=0)
#ifdef TCL_MEM_DEBUG
|| (objPtr->refCount==0x61616161)
#endif
) {
Tcl_Panic("InnerContext: bad tos -- appending freed object %p",
objPtr);
}
Tcl_ListObjAppendElement(NULL, result, objPtr);
}
return result;
}
/*
*----------------------------------------------------------------------
*
* TclNewInstNameObj --
*
* Creates a new InstName Tcl_Obj based on the given instruction
*
*----------------------------------------------------------------------
*/
Tcl_Obj *
TclNewInstNameObj(
unsigned char inst)
{
Tcl_Obj *objPtr = Tcl_NewObj();
objPtr->typePtr = &tclInstNameType;
objPtr->internalRep.longValue = (long) inst;
objPtr->bytes = NULL;
return objPtr;
}
/*
*----------------------------------------------------------------------
*
* UpdateStringOfInstName --
*
* Update the string representation for an instruction name object.
*
*----------------------------------------------------------------------
*/
static void
UpdateStringOfInstName(
Tcl_Obj *objPtr)
{
int inst = objPtr->internalRep.longValue;
char *s, buf[20];
int len;
if ((inst < 0) || (inst > LAST_INST_OPCODE)) {
sprintf(buf, "inst_%d", inst);
s = buf;
} else {
s = (char *) tclInstructionTable[objPtr->internalRep.longValue].name;
}
len = strlen(s);
objPtr->bytes = ckalloc(len + 1);
memcpy(objPtr->bytes, s, len + 1);
objPtr->length = len;
}
/*
*----------------------------------------------------------------------
*
* PrintSourceToObj --
*
* Appends a quoted representation of a string to a Tcl_Obj.
*
*----------------------------------------------------------------------
*/
static void
PrintSourceToObj(
Tcl_Obj *appendObj, /* The object to print the source to. */
const char *stringPtr, /* The string to print. */
int maxChars) /* Maximum number of chars to print. */
{
register const char *p;
register int i = 0, len;
if (stringPtr == NULL) {
Tcl_AppendToObj(appendObj, "\"\"", -1);
return;
}
Tcl_AppendToObj(appendObj, "\"", -1);
p = stringPtr;
for (; (*p != '\0') && (i < maxChars); p+=len) {
Tcl_UniChar ch;
len = TclUtfToUniChar(p, &ch);
switch (ch) {
case '"':
Tcl_AppendToObj(appendObj, "\\\"", -1);
i += 2;
continue;
case '\f':
Tcl_AppendToObj(appendObj, "\\f", -1);
i += 2;
continue;
case '\n':
Tcl_AppendToObj(appendObj, "\\n", -1);
i += 2;
continue;
case '\r':
Tcl_AppendToObj(appendObj, "\\r", -1);
i += 2;
continue;
case '\t':
Tcl_AppendToObj(appendObj, "\\t", -1);
i += 2;
continue;
case '\v':
Tcl_AppendToObj(appendObj, "\\v", -1);
i += 2;
continue;
default:
if (ch < 0x20 || ch >= 0x7f) {
Tcl_AppendPrintfToObj(appendObj, "\\u%04x", ch);
i += 6;
} else {
Tcl_AppendPrintfToObj(appendObj, "%c", ch);
i++;
}
continue;
}
}
Tcl_AppendToObj(appendObj, "\"", -1);
if (*p != '\0') {
Tcl_AppendToObj(appendObj, "...", -1);
}
}
#ifdef TCL_COMPILE_STATS
/*
*----------------------------------------------------------------------
+36 -20
View File
@@ -48,6 +48,13 @@ MODULE_SCOPE int tclTraceCompile;
MODULE_SCOPE int tclTraceExec;
#endif
/*
* The type of lambda expressions. Note that every lambda will *always* have a
* string representation.
*/
MODULE_SCOPE const Tcl_ObjType tclLambdaType;
/*
*------------------------------------------------------------------------
@@ -238,6 +245,16 @@ typedef struct AuxDataType {
AuxDataPrintProc *printProc;/* Callback function to invoke when printing
* the aux data as part of debugging. NULL
* means that the data can't be printed. */
AuxDataPrintProc *disassembleProc;
/* Callback function to invoke when doing a
* disassembly of the aux data (like the
* printProc, except that the output is
* intended to be script-readable). The
* appendObj argument should be filled in with
* a descriptive dictionary; it will start out
* with "name" mapped to the content of the
* name field. NULL means that the printProc
* should be used instead. */
} AuxDataType;
/*
@@ -832,6 +849,12 @@ typedef enum InstOperandType {
* variable table. */
OPERAND_AUX4, /* Four byte unsigned index into the aux data
* table. */
OPERAND_OFFSET1, /* One byte signed jump offset. */
OPERAND_OFFSET4, /* Four byte signed jump offset. */
OPERAND_LIT1, /* One byte unsigned index into table of
* literals. */
OPERAND_LIT4, /* Four byte unsigned index into table of
* literals. */
OPERAND_SCLS1 /* Index into tclStringClassTable. */
} InstOperandType;
@@ -1128,6 +1151,10 @@ MODULE_SCOPE void TclFinalizeLoopExceptionRange(CompileEnv *envPtr,
MODULE_SCOPE char * TclLiteralStats(LiteralTable *tablePtr);
MODULE_SCOPE int TclLog2(int value);
#endif
MODULE_SCOPE int TclLocalScalar(const char *bytes, int numBytes,
CompileEnv *envPtr);
MODULE_SCOPE int TclLocalScalarFromToken(Tcl_Token *tokenPtr,
CompileEnv *envPtr);
MODULE_SCOPE void TclOptimizeBytecode(void *envPtr);
#ifdef TCL_COMPILE_DEBUG
MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp,
@@ -1165,12 +1192,15 @@ MODULE_SCOPE void TclVerifyLocalLiteralTable(CompileEnv *envPtr);
MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr,
Tcl_Obj *valuePtr);
MODULE_SCOPE void TclLogCommandInfo(Tcl_Interp *interp,
const char *script,
const char *command, int length,
const unsigned char *pc, Tcl_Obj **tosPtr);
const char *script, const char *command,
int length, const unsigned char *pc,
Tcl_Obj **tosPtr);
MODULE_SCOPE Tcl_Obj *TclGetInnerContext(Tcl_Interp *interp,
const unsigned char *pc, Tcl_Obj **tosPtr);
const unsigned char *pc, Tcl_Obj **tosPtr);
MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
register Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], int isLambda);
/*
@@ -1387,18 +1417,6 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
} \
} while (0)
/*
* If the expr compiler finished with TRY_CONVERT, macro to remove it when the
* job is done by the following instruction.
*/
#define TclClearNumConversion(envPtr) \
do { \
if (*(envPtr->codeNext - 1) == INST_TRY_CVT_TO_NUMERIC) { \
envPtr->codeNext--; \
} \
} while (0)
/*
* Macros to update a (signed or unsigned) integer starting at a pointer. The
* two variants depend on the number of bytes. The ANSI C "prototypes" for
@@ -1664,11 +1682,9 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
#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)))
TclLocalScalar(chars, len, envPtr)
#define LocalScalarFromToken(tokenPtr,envPtr) \
((tokenPtr)->type != TCL_TOKEN_SIMPLE_WORD ? -1 : \
LocalScalar((tokenPtr)[1].start, (tokenPtr)[1].size, (envPtr)))
TclLocalScalarFromToken(tokenPtr, envPtr)
/*
* Flags bits used by TclPushVarName.
File diff suppressed because it is too large Load Diff
+72 -24
View File
@@ -180,9 +180,9 @@ TCL_DECLARE_MUTEX(encodingMutex)
* the system encoding will be used to perform the conversion.
*/
static Tcl_Encoding defaultEncoding;
static Tcl_Encoding systemEncoding;
Tcl_Encoding tclIdentityEncoding;
static Tcl_Encoding defaultEncoding = NULL;
static Tcl_Encoding systemEncoding = NULL;
Tcl_Encoding tclIdentityEncoding = NULL;
/*
* The following variable is used in the sparse matrix code for a
@@ -652,7 +652,10 @@ TclFinalizeEncodingSubsystem(void)
Tcl_MutexLock(&encodingMutex);
encodingsInitialized = 0;
FreeEncoding(systemEncoding);
systemEncoding = NULL;
defaultEncoding = NULL;
FreeEncoding(tclIdentityEncoding);
tclIdentityEncoding = NULL;
hPtr = Tcl_FirstHashEntry(&encodingTable, &search);
while (hPtr != NULL) {
@@ -1203,7 +1206,10 @@ Tcl_ExternalToUtf(
* output buffer. */
{
const Encoding *encodingPtr;
int result, srcRead, dstWrote, dstChars;
int result, srcRead, dstWrote, dstChars = 0;
int noTerminate = flags & TCL_ENCODING_NO_TERMINATE;
int charLimited = (flags & TCL_ENCODING_CHAR_LIMIT) && dstCharsPtr;
int maxChars = INT_MAX;
Tcl_EncodingState state;
if (encoding == NULL) {
@@ -1228,19 +1234,40 @@ Tcl_ExternalToUtf(
}
if (dstCharsPtr == NULL) {
dstCharsPtr = &dstChars;
flags &= ~TCL_ENCODING_CHAR_LIMIT;
} else if (charLimited) {
maxChars = *dstCharsPtr;
}
/*
* If there are any null characters in the middle of the buffer, they will
* converted to the UTF-8 null character (\xC080). To get the actual \0 at
* the end of the destination buffer, we need to append it manually.
*/
if (!noTerminate) {
/*
* If there are any null characters in the middle of the buffer,
* they will converted to the UTF-8 null character (\xC080). To get
* the actual \0 at the end of the destination buffer, we need to
* append it manually. First make room for it...
*/
dstLen--;
result = encodingPtr->toUtfProc(encodingPtr->clientData, src, srcLen,
flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
dstCharsPtr);
dst[*dstWrotePtr] = '\0';
dstLen--;
}
do {
int savedFlags = flags;
Tcl_EncodingState savedState = *statePtr;
result = encodingPtr->toUtfProc(encodingPtr->clientData, src, srcLen,
flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
dstCharsPtr);
if (*dstCharsPtr <= maxChars) {
break;
}
dstLen = Tcl_UtfAtIndex(dst, maxChars) - 1 - dst + TCL_UTF_MAX;
flags = savedFlags;
*statePtr = savedState;
} while (1);
if (!noTerminate) {
/* ...and then append it */
dst[*dstWrotePtr] = '\0';
}
return result;
}
@@ -2104,6 +2131,9 @@ BinaryProc(
if (dstLen < 0) {
dstLen = 0;
}
if ((flags & TCL_ENCODING_CHAR_LIMIT) && srcLen > *dstCharsPtr) {
srcLen = *dstCharsPtr;
}
if (srcLen > dstLen) {
srcLen = dstLen;
result = TCL_CONVERT_NOSPACE;
@@ -2264,7 +2294,7 @@ UtfToUtfProc(
{
const char *srcStart, *srcEnd, *srcClose;
const char *dstStart, *dstEnd;
int result, numChars;
int result, numChars, charLimit = INT_MAX;
Tcl_UniChar ch;
result = TCL_OK;
@@ -2275,11 +2305,14 @@ UtfToUtfProc(
if ((flags & TCL_ENCODING_END) == 0) {
srcClose -= TCL_UTF_MAX;
}
if (flags & TCL_ENCODING_CHAR_LIMIT) {
charLimit = *dstCharsPtr;
}
dstStart = dst;
dstEnd = dst + dstLen - TCL_UTF_MAX;
for (numChars = 0; src < srcEnd; numChars++) {
for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
/*
* If there is more string to follow, this will ensure that the
@@ -2375,9 +2408,12 @@ UnicodeToUtfProc(
{
const char *srcStart, *srcEnd;
const char *dstEnd, *dstStart;
int result, numChars;
int result, numChars, charLimit = INT_MAX;
Tcl_UniChar ch;
if (flags & TCL_ENCODING_CHAR_LIMIT) {
charLimit = *dstCharsPtr;
}
result = TCL_OK;
if ((srcLen % sizeof(Tcl_UniChar)) != 0) {
result = TCL_CONVERT_MULTIBYTE;
@@ -2391,7 +2427,7 @@ UnicodeToUtfProc(
dstStart = dst;
dstEnd = dst + dstLen - TCL_UTF_MAX;
for (numChars = 0; src < srcEnd; numChars++) {
for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
if (dst > dstEnd) {
result = TCL_CONVERT_NOSPACE;
break;
@@ -2559,12 +2595,15 @@ TableToUtfProc(
{
const char *srcStart, *srcEnd;
const char *dstEnd, *dstStart, *prefixBytes;
int result, byte, numChars;
int result, byte, numChars, charLimit = INT_MAX;
Tcl_UniChar ch;
const unsigned short *const *toUnicode;
const unsigned short *pageZero;
TableEncodingData *dataPtr = clientData;
if (flags & TCL_ENCODING_CHAR_LIMIT) {
charLimit = *dstCharsPtr;
}
srcStart = src;
srcEnd = src + srcLen;
@@ -2576,7 +2615,7 @@ TableToUtfProc(
pageZero = toUnicode[0];
result = TCL_OK;
for (numChars = 0; src < srcEnd; numChars++) {
for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
if (dst > dstEnd) {
result = TCL_CONVERT_NOSPACE;
break;
@@ -2790,8 +2829,11 @@ Iso88591ToUtfProc(
{
const char *srcStart, *srcEnd;
const char *dstEnd, *dstStart;
int result, numChars;
int result, numChars, charLimit = INT_MAX;
if (flags & TCL_ENCODING_CHAR_LIMIT) {
charLimit = *dstCharsPtr;
}
srcStart = src;
srcEnd = src + srcLen;
@@ -2799,7 +2841,7 @@ Iso88591ToUtfProc(
dstEnd = dst + dstLen - TCL_UTF_MAX;
result = TCL_OK;
for (numChars = 0; src < srcEnd; numChars++) {
for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
Tcl_UniChar ch;
if (dst > dstEnd) {
@@ -2960,7 +3002,9 @@ TableFreeProc(
*/
ckfree(dataPtr->toUnicode);
dataPtr->toUnicode = NULL;
ckfree(dataPtr->fromUnicode);
dataPtr->fromUnicode = NULL;
ckfree(dataPtr);
}
@@ -3013,9 +3057,12 @@ EscapeToUtfProc(
const char *prefixBytes, *tablePrefixBytes, *srcStart, *srcEnd;
const unsigned short *const *tableToUnicode;
const Encoding *encodingPtr;
int state, result, numChars;
int state, result, numChars, charLimit = INT_MAX;
const char *dstStart, *dstEnd;
if (flags & TCL_ENCODING_CHAR_LIMIT) {
charLimit = *dstCharsPtr;
}
result = TCL_OK;
tablePrefixBytes = NULL; /* lint. */
tableToUnicode = NULL; /* lint. */
@@ -3033,7 +3080,7 @@ EscapeToUtfProc(
state = 0;
}
for (numChars = 0; src < srcEnd; ) {
for (numChars = 0; src < srcEnd && numChars <= charLimit; ) {
int byte, hi, lo, ch;
if (dst > dstEnd) {
@@ -3433,6 +3480,7 @@ EscapeFreeProc(
subTablePtr = dataPtr->subTables;
for (i = 0; i < dataPtr->numSubTables; i++) {
FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr);
subTablePtr->encodingPtr = NULL;
subTablePtr++;
}
}
+35 -1
View File
@@ -2749,6 +2749,7 @@ TclCompileEnsemble(
int ourResult = TCL_ERROR;
unsigned numBytes;
const char *word;
DefineLineInformation;
Tcl_IncrRefCount(replaced);
if (parsePtr->numWords < depth + 1) {
@@ -3007,6 +3008,23 @@ TclCompileEnsemble(
goto cleanup;
}
/*
* Throw out any line information generated by the failed compile attempt.
*/
while (mapPtr->nuloc - 1 > eclIndex) {
mapPtr->nuloc--;
ckfree(mapPtr->loc[mapPtr->nuloc].line);
mapPtr->loc[mapPtr->nuloc].line = NULL;
}
/*
* Reset the index of next command. Toss out any from failed nested
* partial compiles.
*/
envPtr->numCommands = mapPtr->nuloc;
/*
* Failed to do a full compile for some reason. Try to do a direct invoke
* instead of going through the ensemble lookup process again.
@@ -3019,8 +3037,24 @@ TclCompileEnsemble(
cmdPtr = oldCmdPtr;
depth--;
}
(void) Tcl_ListObjReplace(NULL, replaced, depth, 2, 0, NULL);
}
/*
* The length of the "replaced" list must be depth-1. Trim back
* any extra elements that might have been appended by failing
* pathways above.
*/
(void) Tcl_ListObjReplace(NULL, replaced, depth-1, INT_MAX, 0, NULL);
/*
* TODO: Reconsider whether we ought to call CompileToInvokedCommand()
* when depth==1. In that case we are choosing to emit the
* INST_INVOKE_REPLACE bytecode when there is in fact no replacing
* to be done. It would be equally functional and presumably more
* performant to fall through to cleanup below, return TCL_ERROR,
* and let the compiler harness emit the INST_INVOKE_STK
* implementation for us.
*/
CompileToInvokedCommand(interp, parsePtr, replaced, cmdPtr, envPtr);
ourResult = TCL_OK;
}
+11 -4
View File
@@ -119,6 +119,7 @@ static char * VwaitVarProc(ClientData clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
static void InvokeExitHandlers(void);
static void FinalizeThread(int quick);
/*
*----------------------------------------------------------------------
@@ -983,7 +984,7 @@ Tcl_Exit(
* Tcl_Channels that may have data enqueued.
*/
Tcl_FinalizeThread();
FinalizeThread(/* quick */ 1);
}
TclpExit(status);
Tcl_Panic("OS exit failed!");
@@ -1183,7 +1184,7 @@ Tcl_Finalize(void)
* This fixes the Tcl Bug #990552.
*/
TclFinalizeThreadData();
TclFinalizeThreadData(/* quick */ 0);
/*
* Now we can free constants for conversions to/from double.
@@ -1268,6 +1269,13 @@ Tcl_Finalize(void)
void
Tcl_FinalizeThread(void)
{
FinalizeThread(/* quick */ 0);
}
void
FinalizeThread(
int quick)
{
ExitHandler *exitPtr;
ThreadSpecificData *tsdPtr;
@@ -1309,8 +1317,7 @@ Tcl_FinalizeThread(void)
*
* Fix [Bug #571002]
*/
TclFinalizeThreadData();
TclFinalizeThreadData(quick);
}
/*
+8 -8
View File
@@ -81,9 +81,7 @@ int tclTraceExec = 0;
static const char *const operatorStrings[] = {
"||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>",
"+", "-", "*", "/", "%", "+", "-", "~", "!",
"BUILTIN FUNCTION", "FUNCTION",
"", "", "", "", "", "", "", "", "eq", "ne"
"+", "-", "*", "/", "%", "+", "-", "~", "!"
};
/*
@@ -5079,7 +5077,7 @@ TEBCresume(
valuePtr = OBJ_AT_TOS;
opnd = TclGetInt4AtPtr(pc+1);
TRACE(("\%.30s\" %d => ", O2S(valuePtr), opnd));
TRACE(("\"%.30s\" %d => ", O2S(valuePtr), opnd));
/*
* Get the contents of the list, making sure that it really is a list
@@ -5412,8 +5410,8 @@ TEBCresume(
s1 = (char *) Tcl_GetByteArrayFromObj(valuePtr, &s1len);
s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len);
memCmpFn = memcmp;
} else if (((valuePtr->typePtr == &tclStringType)
&& (value2Ptr->typePtr == &tclStringType))) {
} else if ((valuePtr->typePtr == &tclStringType)
&& (value2Ptr->typePtr == &tclStringType)) {
/*
* Do a unicode-specific comparison if both of the args are of
* String type. If the char length == byte length, we can do a
@@ -5424,7 +5422,9 @@ TEBCresume(
s1len = Tcl_GetCharLength(valuePtr);
s2len = Tcl_GetCharLength(value2Ptr);
if ((s1len == valuePtr->length)
&& (s2len == value2Ptr->length)) {
&& (valuePtr->bytes != NULL)
&& (s2len == value2Ptr->length)
&& (value2Ptr->bytes != NULL)) {
s1 = valuePtr->bytes;
s2 = value2Ptr->bytes;
memCmpFn = memcmp;
@@ -9830,7 +9830,7 @@ IllegalExprOperandType(
if (opcode == INST_EXPON) {
operator = "**";
} else if (opcode <= INST_STR_NEQ) {
} else if (opcode <= INST_LNOT) {
operator = operatorStrings[opcode - INST_LOR];
}
+4 -4
View File
@@ -235,9 +235,9 @@ ExtractWinRoot(
if ((path[0] == 'c' || path[0] == 'C')
&& (path[1] == 'o' || path[1] == 'O')) {
if ((path[2] == 'm' || path[2] == 'M')
&& path[3] >= '1' && path[3] <= '4') {
&& path[3] >= '1' && path[3] <= '9') {
/*
* May have match for 'com[1-4]:?', which is a serial port.
* May have match for 'com[1-9]:?', which is a serial port.
*/
if (path[4] == '\0') {
@@ -257,9 +257,9 @@ ExtractWinRoot(
} else if ((path[0] == 'l' || path[0] == 'L')
&& (path[1] == 'p' || path[1] == 'P')
&& (path[2] == 't' || path[2] == 'T')) {
if (path[3] >= '1' && path[3] <= '3') {
if (path[3] >= '1' && path[3] <= '9') {
/*
* May have match for 'lpt[1-3]:?'
* May have match for 'lpt[1-9]:?'
*/
if (path[4] == '\0') {
+292 -108
View File
@@ -35,15 +35,15 @@ typedef struct ChannelHandler {
/*
* This structure keeps track of the current ChannelHandler being invoked in
* the current invocation of ChannelHandlerEventProc. There is a potential
* the current invocation of Tcl_NotifyChannel. There is a potential
* problem if a ChannelHandler is deleted while it is the current one, since
* ChannelHandlerEventProc needs to look at the nextPtr field. To handle this
* Tcl_NotifyChannel needs to look at the nextPtr field. To handle this
* problem, structures of the type below indicate the next handler to be
* processed for any (recursively nested) dispatches in progress. The
* nextHandlerPtr field is updated if the handler being pointed to is deleted.
* The nextPtr field is used to chain together all recursive invocations, so
* that Tcl_DeleteChannelHandler can find all the recursively nested
* invocations of ChannelHandlerEventProc and compare the handler being
* The nestedHandlerPtr field is used to chain together all recursive
* invocations, so that Tcl_DeleteChannelHandler can find all the recursively
* nested invocations of Tcl_NotifyChannel and compare the handler being
* deleted against the NEXT handler to be invoked in that invocation; when it
* finds such a situation, Tcl_DeleteChannelHandler updates the nextHandlerPtr
* field of the structure to the next handler.
@@ -54,20 +54,9 @@ typedef struct NextChannelHandler {
* this invocation. */
struct NextChannelHandler *nestedHandlerPtr;
/* Next nested invocation of
* ChannelHandlerEventProc. */
* Tcl_NotifyChannel. */
} NextChannelHandler;
/*
* The following structure describes the event that is added to the Tcl
* event queue by the channel handler check procedure.
*/
typedef struct ChannelHandlerEvent {
Tcl_Event header; /* Standard header for all events. */
Channel *chanPtr; /* The channel that is ready. */
int readyMask; /* Events that have occurred. */
} ChannelHandlerEvent;
/*
* The following structure is used by Tcl_GetsObj() to encapsulates the
* state for a "gets" operation.
@@ -130,7 +119,7 @@ typedef struct CopyState {
typedef struct ThreadSpecificData {
NextChannelHandler *nestedHandlerPtr;
/* This variable holds the list of nested
* ChannelHandlerEventProc invocations. */
* Tcl_NotifyChannel invocations. */
ChannelState *firstCSPtr; /* List of all channels currently open,
* indexed by ChannelState, as only one
* ChannelState exists per set of stacked
@@ -166,6 +155,7 @@ static ChannelBuffer * AllocChannelBuffer(int length);
static void PreserveChannelBuffer(ChannelBuffer *bufPtr);
static void ReleaseChannelBuffer(ChannelBuffer *bufPtr);
static int IsShared(ChannelBuffer *bufPtr);
static void ChannelFree(Channel *chanPtr);
static void ChannelTimerProc(ClientData clientData);
static int ChanRead(Channel *chanPtr, char *dst, int dstSize);
static int CheckChannelErrors(ChannelState *statePtr,
@@ -626,6 +616,7 @@ TclFinalizeIOSubsystem(void)
if (active) {
TclChannelPreserve((Tcl_Channel)chanPtr);
/*
* TIP #398: by default, we no longer set the channel back into
* blocking mode. To restore the old blocking behavior, the
@@ -684,6 +675,7 @@ TclFinalizeIOSubsystem(void)
chanPtr->instanceData = NULL;
SetFlag(statePtr, CHANNEL_DEAD);
}
TclChannelRelease((Tcl_Channel)chanPtr);
}
}
@@ -1923,6 +1915,16 @@ TclChannelRelease(
}
}
static void
ChannelFree(
Channel *chanPtr)
{
if (chanPtr->refCount == 0) {
ckfree(chanPtr);
return;
}
chanPtr->typePtr = NULL;
}
/*
*----------------------------------------------------------------------
@@ -2069,7 +2071,7 @@ Tcl_UnstackChannel(
*/
result = ChanClose(chanPtr, interp);
chanPtr->typePtr = NULL;
ChannelFree(chanPtr);
UpdateInterest(statePtr->topChanPtr);
@@ -2820,9 +2822,15 @@ FlushChannel(
* write in this call, and we've completed the BG flush.
* These are the two cases above. If we get here, that means
* there is some kind failure in the writable event machinery.
*/
*
* The tls extension indeed suffers from flaws in its channel
* event mgmt. See http://core.tcl.tk/tcl/info/c31ca233ca.
* Until that patch is broadly distributed, disable the
* assertion checking here, so that programs using Tcl and
* tls can be debugged.
assert(!calledFromAsyncFlush);
*/
}
}
@@ -3021,7 +3029,8 @@ CloseChannel(
statePtr->topChanPtr = downChanPtr;
downChanPtr->upChanPtr = NULL;
chanPtr->typePtr = NULL;
ChannelFree(chanPtr);
return Tcl_Close(interp, (Tcl_Channel) downChanPtr);
}
@@ -3032,7 +3041,7 @@ CloseChannel(
* stack, make sure to free the ChannelState structure associated with it.
*/
chanPtr->typePtr = NULL;
ChannelFree(chanPtr);
Tcl_EventuallyFree(statePtr, TCL_DYNAMIC);
@@ -3903,7 +3912,10 @@ Tcl_Write(
if (srcLen < 0) {
srcLen = strlen(src);
}
return WriteBytes(chanPtr, src, srcLen);
if (WriteBytes(chanPtr, src, srcLen) < 0) {
return -1;
}
return srcLen;
}
/*
@@ -4393,6 +4405,21 @@ Tcl_GetsObj(
return -1;
}
/*
* If we're sitting ready to read the eofchar, there's no need to
* do it.
*/
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
SetFlag(statePtr, CHANNEL_EOF);
assert( statePtr->inputEncodingFlags & TCL_ENCODING_END );
assert( !GotFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR) );
/* TODO: Do we need this? */
UpdateInterest(chanPtr);
return -1;
}
/*
* A binary version of Tcl_GetsObj. This could also handle encodings that
* are ascii-7 pure (iso8859, utf-8, ...) with a final encoding conversion
@@ -4459,6 +4486,7 @@ Tcl_GetsObj(
eof = NULL;
inEofChar = statePtr->inEofChar;
ResetFlag(statePtr, CHANNEL_BLOCKED);
while (1) {
if (dst >= dstEnd) {
if (FilterInputBytes(chanPtr, &gs) != 0) {
@@ -4550,14 +4578,14 @@ Tcl_GetsObj(
* Skip the raw bytes that make up the '\n'.
*/
char tmp[1 + TCL_UTF_MAX];
char tmp[TCL_UTF_MAX];
int rawRead;
bufPtr = gs.bufPtr;
Tcl_ExternalToUtf(NULL, gs.encoding, RemovePoint(bufPtr),
gs.rawRead, statePtr->inputEncodingFlags,
&gs.state, tmp, 1 + TCL_UTF_MAX, &rawRead, NULL,
NULL);
gs.rawRead, statePtr->inputEncodingFlags
| TCL_ENCODING_NO_TERMINATE, &gs.state, tmp,
TCL_UTF_MAX, &rawRead, NULL, NULL);
bufPtr->nextRemoved += rawRead;
gs.rawRead -= rawRead;
gs.bytesWrote--;
@@ -4610,6 +4638,7 @@ Tcl_GetsObj(
dstEnd = eof;
SetFlag(statePtr, CHANNEL_EOF | CHANNEL_STICKY_EOF);
statePtr->inputEncodingFlags |= TCL_ENCODING_END;
ResetFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR);
}
if (GotFlag(statePtr, CHANNEL_EOF)) {
skip = 0;
@@ -4657,8 +4686,9 @@ Tcl_GetsObj(
}
statePtr->inputEncodingState = gs.state;
Tcl_ExternalToUtf(NULL, gs.encoding, RemovePoint(bufPtr), gs.rawRead,
statePtr->inputEncodingFlags, &statePtr->inputEncodingState, dst,
eol - dst + skip + TCL_UTF_MAX, &gs.rawRead, NULL,
statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE,
&statePtr->inputEncodingState, dst,
eol - dst + skip + TCL_UTF_MAX - 1, &gs.rawRead, NULL,
&gs.charsWrote);
bufPtr->nextRemoved += gs.rawRead;
@@ -4723,6 +4753,13 @@ Tcl_GetsObj(
*/
done:
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert( !(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)) );
/*
* Regenerate the top channel, in case it was changed due to
* self-modifying reflected transforms.
@@ -4746,6 +4783,11 @@ Tcl_GetsObj(
* end-of-line or end-of-file has been seen. Bytes read from the input
* channel return as a ByteArray obj.
*
* WARNING! The notion of "binary" used here is different from
* notions of "binary" used in other places. In particular, this
* "binary" routine may be called when an -eofchar is set on the
* channel.
*
* Results:
* Number of characters accumulated in the object or -1 if error,
* blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
@@ -4807,6 +4849,7 @@ TclGetsObjBinary(
eolChar = (statePtr->inputTranslation == TCL_TRANSLATE_LF) ? '\n' : '\r';
ResetFlag(statePtr, CHANNEL_BLOCKED);
while (1) {
/*
* Subtract the number of bytes that were removed from channel
@@ -4833,6 +4876,17 @@ TclGetsObjBinary(
if (bufPtr == NULL) {
goto restore;
}
} else {
/*
* Incoming CHANNEL_STICKY_EOF is filtered out on entry.
* A new CHANNEL_STICKY_EOF set in this routine leads to
* return before coming back here. When we are not dealing
* with CHANNEL_STICKY_EOF, a CHANNEL_EOF implies an
* empty buffer. Here the buffer is non-empty so we know
* we're a non-EOF */
assert ( !GotFlag(statePtr, CHANNEL_STICKY_EOF) );
assert ( !GotFlag(statePtr, CHANNEL_EOF) );
}
dst = (unsigned char *) RemovePoint(bufPtr);
@@ -4874,6 +4928,7 @@ TclGetsObjBinary(
SetFlag(statePtr, CHANNEL_EOF | CHANNEL_STICKY_EOF);
statePtr->inputEncodingFlags |= TCL_ENCODING_END;
ResetFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR);
}
if (GotFlag(statePtr, CHANNEL_EOF)) {
skip = 0;
@@ -4983,6 +5038,11 @@ TclGetsObjBinary(
*/
done:
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert( !(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)) );
UpdateInterest(chanPtr);
TclChannelRelease((Tcl_Channel)chanPtr);
return copiedTotal;
@@ -5095,6 +5155,12 @@ FilterInputBytes(
*/
read:
if (GotFlag(statePtr, CHANNEL_NONBLOCKING|CHANNEL_BLOCKED)
== (CHANNEL_NONBLOCKING|CHANNEL_BLOCKED)) {
gsPtr->charsWrote = 0;
gsPtr->rawRead = 0;
return -1;
}
if (GetInput(chanPtr) != 0) {
gsPtr->charsWrote = 0;
gsPtr->rawRead = 0;
@@ -5107,6 +5173,17 @@ FilterInputBytes(
gsPtr->rawRead = 0;
return -1;
}
} else {
/*
* Incoming CHANNEL_STICKY_EOF is filtered out on entry.
* A new CHANNEL_STICKY_EOF set in this routine leads to
* return before coming back here. When we are not dealing
* with CHANNEL_STICKY_EOF, a CHANNEL_EOF implies an
* empty buffer. Here the buffer is non-empty so we know
* we're a non-EOF */
assert ( !GotFlag(statePtr, CHANNEL_STICKY_EOF) );
assert ( !GotFlag(statePtr, CHANNEL_EOF) );
}
/*
@@ -5143,9 +5220,9 @@ FilterInputBytes(
}
gsPtr->state = statePtr->inputEncodingState;
result = Tcl_ExternalToUtf(NULL, gsPtr->encoding, raw, rawLen,
statePtr->inputEncodingFlags, &statePtr->inputEncodingState,
dst, spaceLeft+1, &gsPtr->rawRead, &gsPtr->bytesWrote,
&gsPtr->charsWrote);
statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE,
&statePtr->inputEncodingState, dst, spaceLeft, &gsPtr->rawRead,
&gsPtr->bytesWrote, &gsPtr->charsWrote);
/*
* Make sure that if we go through 'gets', that we reset the
@@ -5185,12 +5262,6 @@ FilterInputBytes(
* some more, but avoid blocking on a non-blocking channel.
*/
if (GotFlag(statePtr, CHANNEL_NONBLOCKING|CHANNEL_BLOCKED)
== (CHANNEL_NONBLOCKING|CHANNEL_BLOCKED)) {
gsPtr->charsWrote = 0;
gsPtr->rawRead = 0;
return -1;
}
goto read;
}
} else {
@@ -5437,6 +5508,7 @@ Tcl_ReadRaw(
/* State info for channel */
int copied = 0;
assert(bytesToRead > 0);
if (CheckChannelErrors(statePtr, TCL_READABLE | CHANNEL_RAW_MODE) != 0) {
return -1;
}
@@ -5468,8 +5540,19 @@ Tcl_ReadRaw(
}
}
/* Go to the driver if more data needed. */
/*
* Go to the driver only if we got nothing from pushback.
* Have to do it this way to avoid EOF mis-timings when we
* consider the ability that EOF may not be a permanent
* condition in the driver, and in that case we have to
* synchronize.
*/
if (copied) {
return copied;
}
/* This test not needed. */
if (bytesToRead > 0) {
int nread = ChanRead(chanPtr, readBuf, bytesToRead);
@@ -5492,12 +5575,10 @@ Tcl_ReadRaw(
if (!GotFlag(statePtr, CHANNEL_BLOCKED) || copied == 0) {
copied = -1;
}
} else if (copied > 0) {
} else {
/*
* nread == 0. Driver is at EOF, but if copied>0 bytes
* from pushback, then we should not signal it yet.
* nread == 0. Driver is at EOF. Let that state filter up.
*/
ResetFlag(statePtr, CHANNEL_EOF);
}
}
return copied;
@@ -5596,19 +5677,11 @@ DoReadChars(
ChannelState *statePtr = chanPtr->state;
/* State info for channel */
ChannelBuffer *bufPtr;
int factor, copied, copiedNow, result;
Tcl_Encoding encoding;
int copied, copiedNow, result;
Tcl_Encoding encoding = statePtr->encoding;
int binaryMode;
#define UTF_EXPANSION_FACTOR 1024
/*
* This operation should occur at the top of a channel stack.
*/
chanPtr = statePtr->topChanPtr;
encoding = statePtr->encoding;
factor = UTF_EXPANSION_FACTOR;
TclChannelPreserve((Tcl_Channel)chanPtr);
int factor = UTF_EXPANSION_FACTOR;
binaryMode = (encoding == NULL)
&& (statePtr->inputTranslation == TCL_TRANSLATE_LF)
@@ -5632,6 +5705,36 @@ DoReadChars(
}
}
/*
* Early out when next read will see eofchar.
*
* NOTE: See DoRead for argument that it's a bug (one we're keeping)
* to have this escape before the one for zero-char read request.
*/
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
SetFlag(statePtr, CHANNEL_EOF);
assert( statePtr->inputEncodingFlags & TCL_ENCODING_END );
assert( !GotFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR) );
UpdateInterest(chanPtr);
return 0;
}
/* Special handling for zero-char read request. */
if (toRead == 0) {
ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
UpdateInterest(chanPtr);
return 0;
}
/*
* This operation should occur at the top of a channel stack.
*/
chanPtr = statePtr->topChanPtr;
TclChannelPreserve((Tcl_Channel)chanPtr);
/* Must clear the BLOCKED flag here since we check before reading */
ResetFlag(statePtr, CHANNEL_BLOCKED);
for (copied = 0; (unsigned) toRead > 0; ) {
@@ -5708,6 +5811,11 @@ DoReadChars(
* Update the notifier state so we don't block while there is still data
* in the buffers.
*/
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert( !(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)) );
UpdateInterest(chanPtr);
TclChannelRelease((Tcl_Channel)chanPtr);
return copied;
@@ -5821,7 +5929,7 @@ ReadChars(
int savedIEFlags = statePtr->inputEncodingFlags;
int savedFlags = statePtr->flags;
char *dst, *src = RemovePoint(bufPtr);
int dstLimit, numBytes, srcLen = BytesLeft(bufPtr);
int numBytes, srcLen = BytesLeft(bufPtr);
/*
* One src byte can yield at most one character. So when the
@@ -5840,14 +5948,14 @@ ReadChars(
*/
int factor = *factorPtr;
int dstNeeded = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR;
int dstLimit = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR;
(void) TclGetStringFromObj(objPtr, &numBytes);
Tcl_AppendToObj(objPtr, NULL, dstNeeded);
Tcl_AppendToObj(objPtr, NULL, dstLimit);
if (toRead == srcLen) {
unsigned int size;
dst = TclGetStringStorage(objPtr, &size) + numBytes;
dstNeeded = size - numBytes;
dstLimit = size - numBytes;
} else {
dst = TclGetString(objPtr) + numBytes;
}
@@ -5868,19 +5976,24 @@ ReadChars(
* a consistent set of results. This takes the shape of a loop.
*/
dstLimit = dstNeeded + 1;
while (1) {
int dstDecoded, dstRead, dstWrote, srcRead, numChars;
int dstDecoded, dstRead, dstWrote, srcRead, numChars, code;
int flags = statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE;
if (charsToRead > 0) {
flags |= TCL_ENCODING_CHAR_LIMIT;
numChars = charsToRead;
}
/*
* Perform the encoding transformation. Read no more than
* srcLen bytes, write no more than dstLimit bytes.
*/
int code = Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
statePtr->inputEncodingFlags & (bufPtr->nextPtr
? ~0 : ~TCL_ENCODING_END), &statePtr->inputEncodingState,
dst, dstLimit, &srcRead, &dstDecoded, &numChars);
code = Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
flags & (bufPtr->nextPtr ? ~0 : ~TCL_ENCODING_END),
&statePtr->inputEncodingState, dst, dstLimit, &srcRead,
&dstDecoded, &numChars);
/*
* Perform the translation transformation in place. Read no more
@@ -5943,7 +6056,7 @@ ReadChars(
* time.
*/
dstLimit = dstRead + TCL_UTF_MAX;
dstLimit = dstRead - 1 + TCL_UTF_MAX;
statePtr->flags = savedFlags;
statePtr->inputEncodingFlags = savedIEFlags;
statePtr->inputEncodingState = savedState;
@@ -5969,7 +6082,7 @@ ReadChars(
* up back here in this call.
*/
dstLimit = dstRead + TCL_UTF_MAX;
dstLimit = dstRead - 1 + TCL_UTF_MAX;
statePtr->flags = savedFlags;
statePtr->inputEncodingFlags = savedIEFlags;
statePtr->inputEncodingState = savedState;
@@ -5986,7 +6099,7 @@ ReadChars(
*/
if (code != TCL_OK) {
char buffer[TCL_UTF_MAX + 2];
char buffer[TCL_UTF_MAX + 1];
int read, decoded, count;
/*
@@ -5998,9 +6111,10 @@ ReadChars(
statePtr->inputEncodingState = savedState;
Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
statePtr->inputEncodingFlags & (bufPtr->nextPtr
? ~0 : ~TCL_ENCODING_END), &statePtr->inputEncodingState,
buffer, TCL_UTF_MAX + 2, &read, &decoded, &count);
(statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE)
& (bufPtr->nextPtr ? ~0 : ~TCL_ENCODING_END),
&statePtr->inputEncodingState, buffer, TCL_UTF_MAX + 1,
&read, &decoded, &count);
if (count == 2) {
if (buffer[1] == '\n') {
@@ -6012,7 +6126,6 @@ ReadChars(
bufPtr->nextRemoved += srcRead;
}
dst[1] = '\0';
statePtr->inputEncodingFlags &= ~TCL_ENCODING_START;
Tcl_SetObjLength(objPtr, numBytes + 1);
@@ -6053,14 +6166,15 @@ ReadChars(
if (charsToRead > 0 && numChars > charsToRead) {
/*
* TODO: This cannot happen anymore.
*
* We read more chars than allowed. Reset limits to
* prevent that and try again. Don't forget the extra
* padding of TCL_UTF_MAX - 1 bytes demanded by the
* padding of TCL_UTF_MAX bytes demanded by the
* Tcl_ExternalToUtf() call!
*/
dstLimit = Tcl_UtfAtIndex(dst, charsToRead + 1)
+ TCL_UTF_MAX - 1 - dst;
dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - 1 + TCL_UTF_MAX - dst;
statePtr->flags = savedFlags;
statePtr->inputEncodingFlags = savedIEFlags;
statePtr->inputEncodingState = savedState;
@@ -6317,7 +6431,7 @@ TranslateInputEOL(
SetFlag(statePtr, CHANNEL_EOF | CHANNEL_STICKY_EOF);
statePtr->inputEncodingFlags |= TCL_ENCODING_END;
ResetFlag(statePtr, INPUT_SAW_CR);
ResetFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR);
}
}
@@ -6527,6 +6641,14 @@ GetInput(
ChannelState *statePtr = chanPtr->state;
/* State info for channel */
/*
* Verify that all callers know better than to call us when
* it's recorded that the next char waiting to be read is the
* eofchar.
*/
assert( !GotFlag(statePtr, CHANNEL_STICKY_EOF) );
/*
* Prevent reading from a dead channel -- a channel that has been closed
* but not yet deallocated, which can happen if the exit handler for
@@ -6538,18 +6660,24 @@ GetInput(
return EINVAL;
}
/*
* For a channel at EOF do not bother allocating buffers; there's
* nothing more to read. Avoid calling the driver inputproc in
* case some of them do not react well to additional calls after
* they've reported an eof state..
* TODO: Candidate for a can't happen panic.
/*
* WARNING: There was once a comment here claiming that it was
* a bad idea to make another call to the inputproc of a channel
* driver when EOF has already been detected on the channel. Through
* much of Tcl's history, this warning was then completely negated
* by having all (most?) read paths clear the EOF setting before
* reaching here. So we had a guard that was never triggered.
*
* Don't be tempted to restore the guard. Even if EOF is set on
* the channel, continue through and call the inputproc again. This
* is the way to enable the ability to [read] again beyond the EOF,
* which seems a strange thing to do, but for which use cases exist
* [Tcl Bug 5adc350683] and which may even be essential for channels
* representing things like ttys or other devices where the stream
* might take the logical form of a series of 'files' separated by
* an EOF condition.
*/
if (GotFlag(statePtr, CHANNEL_EOF)) {
return 0;
}
/*
* First check for more buffers in the pushback area of the topmost
* channel in the stack and use them. They can be the result of a
@@ -6559,6 +6687,7 @@ GetInput(
if (chanPtr->inQueueHead != NULL) {
/* TODO: Tests to cover this. */
assert(statePtr->inQueueHead == NULL);
statePtr->inQueueHead = chanPtr->inQueueHead;
@@ -6589,6 +6718,7 @@ GetInput(
* Check the actual buffersize against the requested buffersize.
* Saved buffers of the wrong size are squashed. This is done
* to honor dynamic changes of the buffersize made by the user.
* TODO: Tests to cover this.
*/
if ((bufPtr != NULL)
@@ -7106,9 +7236,7 @@ Tcl_Eof(
ChannelState *statePtr = ((Channel *) chan)->state;
/* State of real channel structure. */
return (GotFlag(statePtr, CHANNEL_STICKY_EOF) ||
(GotFlag(statePtr, CHANNEL_EOF) &&
(Tcl_InputBuffered(chan) == 0))) ? 1 : 0;
return GotFlag(statePtr, CHANNEL_EOF) ? 1 : 0;
}
/*
@@ -8098,7 +8226,7 @@ Tcl_NotifyChannel(
/*
* Add this invocation to the list of recursive invocations of
* ChannelHandlerEventProc.
* Tcl_NotifyChannel.
*/
nh.nextHandlerPtr = NULL;
@@ -8113,7 +8241,7 @@ Tcl_NotifyChannel(
if ((chPtr->mask & mask) != 0) {
nh.nextHandlerPtr = chPtr->nextPtr;
chPtr->proc(chPtr->clientData, mask);
chPtr->proc(chPtr->clientData, chPtr->mask & mask);
chPtr = nh.nextHandlerPtr;
} else {
chPtr = chPtr->nextPtr;
@@ -8417,7 +8545,7 @@ Tcl_DeleteChannelHandler(
}
/*
* If ChannelHandlerEventProc is about to process this handler, tell it to
* If Tcl_NotifyChannel is about to process this handler, tell it to
* process the next one instead - we are going to delete *this* one.
*/
@@ -9030,7 +9158,7 @@ MBRead(
}
code = GetInput(inStatePtr->topChanPtr);
if (code == 0) {
if (code == 0 || GotFlag(inStatePtr, CHANNEL_BLOCKED)) {
return TCL_OK;
} else {
MBError(csPtr, TCL_READABLE, code);
@@ -9046,7 +9174,8 @@ MBWrite(
ChannelState *outStatePtr = csPtr->writePtr->state;
ChannelBuffer *bufPtr = inStatePtr->inQueueHead;
ChannelBuffer *tail = NULL;
int code, inBytes = 0;
int code;
Tcl_WideInt inBytes = 0;
/* Count up number of bytes waiting in the input queue */
while (bufPtr) {
@@ -9061,7 +9190,14 @@ MBWrite(
if (bufPtr) {
/* Split the overflowing buffer in two */
int extra = inBytes - csPtr->toRead;
int extra = (int) (inBytes - csPtr->toRead);
/* Note that going with int for extra assumes that inBytes is not too
* much over toRead to require a wide itself. If that gets violated
* then the calculations involving extra must be made wide too.
*
* Noted with Win32/MSVC debug build treating the warning (possible of
* data in int64 to int conversion) as error.
*/
bufPtr = AllocChannelBuffer(extra);
@@ -9087,6 +9223,9 @@ MBWrite(
}
outStatePtr->outQueueTail = tail;
inStatePtr->inQueueHead = bufPtr;
if (inStatePtr->inQueueTail == tail) {
inStatePtr->inQueueTail = bufPtr;
}
if (bufPtr == NULL) {
inStatePtr->inQueueTail = NULL;
}
@@ -9272,6 +9411,10 @@ CopyData(
csPtr);
}
if (size == 0) {
if (!GotFlag(inStatePtr, CHANNEL_NONBLOCKING)) {
/* We allowed a short read. Keep trying. */
continue;
}
if (bufObj != NULL) {
TclDecrRefCount(bufObj);
bufObj = NULL;
@@ -9483,6 +9626,36 @@ DoRead(
ChannelState *statePtr = chanPtr->state;
char *p = dst;
assert (bytesToRead >= 0);
/*
* Early out when we know a read will get the eofchar.
*
* NOTE: This seems to be a bug. The special handling for
* a zero-char read request ought to come first. As coded
* the EOF due to eofchar has distinguishing behavior from
* the EOF due to reported EOF on the underlying device, and
* that seems undesirable. However recent history indicates
* that new inconsistent behavior in a patchlevel has problems
* too. Keep on keeping on for now.
*/
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
SetFlag(statePtr, CHANNEL_EOF);
assert( statePtr->inputEncodingFlags & TCL_ENCODING_END );
assert( !GotFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR) );
UpdateInterest(chanPtr);
return 0;
}
/* Special handling for zero-char read request. */
if (bytesToRead == 0) {
ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
UpdateInterest(chanPtr);
return 0;
}
TclChannelPreserve((Tcl_Channel)chanPtr);
while (bytesToRead) {
/*
@@ -9494,18 +9667,14 @@ DoRead(
ChannelBuffer *bufPtr = statePtr->inQueueHead;
/*
* When there's no buffered data to read, and we're at EOF,
* escape to the caller.
* Don't read more data if we have what we need.
*/
if (statePtr->flags & CHANNEL_EOF
&& (bufPtr == NULL || IsBufferEmpty(bufPtr))) {
break;
}
/* If there is no full buffer, attempt to create and/or fill one. */
while (!IsBufferFull(bufPtr)) {
while (!bufPtr || /* We got no buffer! OR */
(!IsBufferFull(bufPtr) && /* Our buffer has room AND */
(BytesLeft(bufPtr) < bytesToRead) ) ) {
/* Not enough bytes in it
* yet to fill the dst */
int code;
moreData:
@@ -9514,11 +9683,11 @@ DoRead(
assert (bufPtr != NULL);
if (statePtr->flags & (CHANNEL_EOF|CHANNEL_BLOCKED)) {
if (GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)) {
/* Further reads cannot do any more */
break;
}
if (code) {
/* Read error */
UpdateInterest(chanPtr);
@@ -9557,8 +9726,7 @@ DoRead(
* 1) We're @EOF because we saw eof char.
*/
if (statePtr->inEofChar
&& RemovePoint(bufPtr)[0] == statePtr->inEofChar) {
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
UpdateInterest(chanPtr);
break;
}
@@ -9609,17 +9777,33 @@ DoRead(
statePtr->inQueueTail = NULL;
}
RecycleBuffer(statePtr, bufPtr, 0);
bufPtr = statePtr->inQueueHead;
}
if ((GotFlag(statePtr, CHANNEL_NONBLOCKING) || allowShortReads)
&& GotFlag(statePtr, CHANNEL_BLOCKED)) {
break;
}
/*
* When there's no buffered data to read, and we're at EOF,
* escape to the caller.
*/
if (GotFlag(statePtr, CHANNEL_EOF)
&& (bufPtr == NULL || IsBufferEmpty(bufPtr))) {
break;
}
}
if (bytesToRead == 0) {
ResetFlag(statePtr, CHANNEL_BLOCKED);
}
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert( !(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)) );
TclChannelRelease((Tcl_Channel)chanPtr);
return (int)(p - dst);
}
+21 -10
View File
@@ -187,6 +187,7 @@ struct TransformChannelData {
Tcl_Channel self; /* Our own Channel handle. */
int readIsFlushed; /* Flag to note whether in.flushProc was
* called or not. */
int eofPending; /* Flag: EOF seen down, not raised up */
int flags; /* Currently CHANNEL_ASYNC or zero. */
int watchMask; /* Current watch/event/interest mask. */
int mode; /* Mode of parent channel, OR'ed combination
@@ -292,6 +293,7 @@ TclChannelTransform(
Tcl_DStringInit(&ds);
Tcl_GetChannelOption(interp, chan, "-blocking", &ds);
dataPtr->readIsFlushed = 0;
dataPtr->eofPending = 0;
dataPtr->flags = 0;
if (ds.string[0] == '0') {
dataPtr->flags |= CHANNEL_ASYNC;
@@ -624,7 +626,7 @@ TransformInputProc(
if (toRead == 0 || dataPtr->self == NULL) {
/*
* Catch a no-op.
* Catch a no-op. TODO: Is this a panic()?
*/
return 0;
}
@@ -676,6 +678,17 @@ TransformInputProc(
if (toRead <= 0) {
break;
}
if (dataPtr->eofPending) {
/*
* Already saw EOF from downChan; don't ask again.
* NOTE: Could move this up to avoid the last maxRead
* execution. Believe this would still be correct behavior,
* but the test suite tests the whole command callback
* sequence, so leave it unchanged for now.
*/
break;
}
/*
* Get bytes from the underlying channel.
@@ -711,14 +724,7 @@ TransformInputProc(
* on the down channel.
*/
if (dataPtr->readIsFlushed) {
/*
* Already flushed, nothing to do anymore.
*/
break;
}
dataPtr->eofPending = 1;
dataPtr->readIsFlushed = 1;
ExecuteCallback(dataPtr, NULL, A_FLUSH_READ, NULL, 0,
TRANSMIT_IBUF, P_PRESERVE);
@@ -746,8 +752,11 @@ TransformInputProc(
break;
}
} /* while toRead > 0 */
ReleaseData(dataPtr);
if (gotBytes == 0) {
dataPtr->eofPending = 0;
}
ReleaseData(dataPtr);
return gotBytes;
}
@@ -858,6 +867,7 @@ TransformSeekProc(
P_NO_PRESERVE);
ResultClear(&dataPtr->result);
dataPtr->readIsFlushed = 0;
dataPtr->eofPending = 0;
}
ReleaseData(dataPtr);
@@ -931,6 +941,7 @@ TransformWideSeekProc(
P_NO_PRESERVE);
ResultClear(&dataPtr->result);
dataPtr->readIsFlushed = 0;
dataPtr->eofPending = 0;
}
ReleaseData(dataPtr);
+17 -4
View File
@@ -161,6 +161,7 @@ typedef struct {
int mode; /* Mask of R/W mode */
int nonblocking; /* Flag: Channel is blocking or not. */
int readIsDrained; /* Flag: Read buffers are flushed. */
int eofPending; /* Flag: EOF seen down, but not raised up */
int dead; /* Boolean signal that some operations
* should no longer be attempted. */
ResultBuffer result;
@@ -1082,6 +1083,10 @@ ReflectInput(
bufObj = Tcl_NewByteArrayObj(NULL, toRead);
Tcl_IncrRefCount(bufObj);
gotBytes = 0;
if (rtPtr->eofPending) {
goto stop;
}
rtPtr->readIsDrained = 0;
while (toRead > 0) {
/*
* Loop until the request is satisfied (or no data available from
@@ -1097,6 +1102,11 @@ ReflectInput(
goto stop;
}
if (rtPtr->eofPending) {
goto stop;
}
/*
* The buffer is exhausted, but the caller wants even more. We now
* have to go to the underlying channel, get more bytes and then
@@ -1165,11 +1175,9 @@ ReflectInput(
* Zero returned from Tcl_ReadRaw() always indicates EOF
* on the down channel.
*/
if (rtPtr->readIsDrained) {
goto stop;
}
rtPtr->eofPending = 1;
/*
* Now this is a bit different. The partial data waiting is
* converted and returned.
@@ -1211,6 +1219,9 @@ ReflectInput(
} /* while toRead > 0 */
stop:
if (gotBytes == 0) {
rtPtr->eofPending = 0;
}
Tcl_DecrRefCount(bufObj);
Tcl_Release(rtPtr);
return gotBytes;
@@ -1766,6 +1777,7 @@ NewReflectedTransform(
rtPtr->timer = NULL;
rtPtr->mode = 0;
rtPtr->readIsDrained = 0;
rtPtr->eofPending = 0;
rtPtr->nonblocking =
(((Channel *) parentChan)->state->flags & CHANNEL_NONBLOCKING);
rtPtr->dead = 0;
@@ -3318,6 +3330,7 @@ TransformClear(
(void) InvokeTclMethod(rtPtr, "clear", NULL, NULL, NULL);
rtPtr->readIsDrained = 0;
rtPtr->eofPending = 0;
ResultClear(&rtPtr->result);
}
+20 -3
View File
@@ -12,9 +12,26 @@
#include "tclInt.h"
#if defined(_WIN32) && defined(UNICODE)
/* On Windows, we always need the ASCII version. */
# undef gai_strerror
# define gai_strerror gai_strerrorA
/* On Windows, we need to do proper Unicode->UTF-8 conversion. */
typedef struct ThreadSpecificData {
int initialized;
Tcl_DString errorMsg; /* UTF-8 encoded error-message */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
#undef gai_strerror
static const char *gai_strerror(int code) {
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
if (tsdPtr->initialized) {
Tcl_DStringFree(&tsdPtr->errorMsg);
} else {
tsdPtr->initialized = 1;
}
Tcl_WinTCharToUtf(gai_strerrorW(code), -1, &tsdPtr->errorMsg);
return Tcl_DStringValue(&tsdPtr->errorMsg);
}
#endif
/*
+8 -4
View File
@@ -1741,7 +1741,7 @@ enum PkgPreferOptions {
* definition there.
* Some macros require knowledge of some fields in the struct in order to
* avoid hitting the TSD unnecessarily. In order to facilitate this, a pointer
* to the relevant fields is kept in the objCache field in struct Interp.
* to the relevant fields is kept in the allocCache field in struct Interp.
*----------------------------------------------------------------
*/
@@ -2927,7 +2927,7 @@ MODULE_SCOPE void TclFinalizePreserve(void);
MODULE_SCOPE void TclFinalizeSynchronization(void);
MODULE_SCOPE void TclFinalizeThreadAlloc(void);
MODULE_SCOPE void TclFinalizeThreadAllocThread(void);
MODULE_SCOPE void TclFinalizeThreadData(void);
MODULE_SCOPE void TclFinalizeThreadData(int quick);
MODULE_SCOPE void TclFinalizeThreadObjects(void);
MODULE_SCOPE double TclFloor(const mp_int *a);
MODULE_SCOPE void TclFormatNaN(double value, char *buffer);
@@ -2985,8 +2985,8 @@ MODULE_SCOPE void TclInitNotifier(void);
MODULE_SCOPE void TclInitObjSubsystem(void);
MODULE_SCOPE void TclInitSubsystems(void);
MODULE_SCOPE int TclInterpReady(Tcl_Interp *interp);
MODULE_SCOPE int TclIsLocalScalar(const char *src, int len);
MODULE_SCOPE int TclIsSpaceProc(char byte);
MODULE_SCOPE int TclIsBareword(char byte);
MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[]);
MODULE_SCOPE int TclJoinThread(Tcl_ThreadId id, int *result);
MODULE_SCOPE void TclLimitRemoveAllHandlers(Tcl_Interp *interp);
@@ -3095,7 +3095,8 @@ MODULE_SCOPE void TclRememberJoinableThread(Tcl_ThreadId id);
MODULE_SCOPE void TclRememberMutex(Tcl_Mutex *mutex);
MODULE_SCOPE void TclRemoveScriptLimitCallbacks(Tcl_Interp *interp);
MODULE_SCOPE int TclReToGlob(Tcl_Interp *interp, const char *reStr,
int reStrLen, Tcl_DString *dsPtr, int *flagsPtr);
int reStrLen, Tcl_DString *dsPtr, int *flagsPtr,
int *quantifiersFoundPtr);
MODULE_SCOPE int TclScanElement(const char *string, int length,
int *flagPtr);
MODULE_SCOPE void TclSetBgErrorHandler(Tcl_Interp *interp,
@@ -3646,6 +3647,9 @@ MODULE_SCOPE int TclCompileReturnCmd(Tcl_Interp *interp,
MODULE_SCOPE int TclCompileSetCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
MODULE_SCOPE int TclCompileStringCatCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
MODULE_SCOPE int TclCompileStringCmpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
+3 -1
View File
@@ -104,7 +104,9 @@ TclpLoadMemory(
int size, /* Dummy: unused by this implementation */
int codeSize, /* Dummy: unused by this implementation */
Tcl_LoadHandle *loadHandle, /* Dummy: unused by this implementation */
Tcl_FSUnloadFileProc **unloadProcPtr)
Tcl_FSUnloadFileProc **unloadProcPtr,
/* Dummy: unused by this implementation */
int flags)
/* Dummy: unused by this implementation */
{
Tcl_SetObjResult(interp, Tcl_NewStringObj("dynamic loading from memory "
+4 -1
View File
@@ -394,6 +394,7 @@ InitFoundation(
fPtr->classCls->flags |= ROOT_CLASS;
TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls);
TclOOAddToInstances(fPtr->classCls->thisPtr, fPtr->classCls);
TclOOAddToSubclasses(fPtr->classCls, fPtr->objectCls);
AddRef(fPtr->objectCls->thisPtr);
AddRef(fPtr->objectCls);
@@ -1286,7 +1287,9 @@ TclOORemoveFromInstances(
removeInstance:
if (Deleted(clsPtr->thisPtr)) {
DelRef(clsPtr->instances.list[i]);
if (!IsRootClass(clsPtr)) {
DelRef(clsPtr->instances.list[i]);
}
clsPtr->instances.list[i] = NULL;
} else {
clsPtr->instances.num--;
+1 -1
View File
@@ -24,7 +24,7 @@
* win/tclooConfig.sh
*/
#define TCLOO_VERSION "1.0.1"
#define TCLOO_VERSION "1.0.3"
#define TCLOO_PATCHLEVEL TCLOO_VERSION
#include "tcl.h"
+72 -27
View File
@@ -38,6 +38,12 @@ struct ChainBuilder {
#define DEFINITE_PUBLIC 0x200000
#define KNOWN_STATE (DEFINITE_PROTECTED | DEFINITE_PUBLIC)
#define SPECIAL (CONSTRUCTOR | DESTRUCTOR | FORCE_UNKNOWN)
#define BUILDING_MIXINS 0x400000
#define TRAVERSED_MIXIN 0x800000
#define OBJECT_MIXIN 0x1000000
#define MIXIN_CONSISTENT(flags) \
(((flags) & OBJECT_MIXIN) || \
!((flags) & BUILDING_MIXINS) == !((flags) & TRAVERSED_MIXIN))
/*
* Function declarations for things defined in this file.
@@ -45,13 +51,13 @@ struct ChainBuilder {
static void AddClassFiltersToCallContext(Object *const oPtr,
Class *clsPtr, struct ChainBuilder *const cbPtr,
Tcl_HashTable *const doneFilters);
Tcl_HashTable *const doneFilters, int flags);
static void AddClassMethodNames(Class *clsPtr, const int flags,
Tcl_HashTable *const namesPtr);
static inline void AddMethodToCallChain(Method *const mPtr,
struct ChainBuilder *const cbPtr,
Tcl_HashTable *const doneFilters,
Class *const filterDecl);
Class *const filterDecl, int flags);
static inline void AddSimpleChainToCallContext(Object *const oPtr,
Tcl_Obj *const methodNameObj,
struct ChainBuilder *const cbPtr,
@@ -150,7 +156,7 @@ void
TclOODeleteChain(
CallChain *callPtr)
{
if (--callPtr->refCount >= 1) {
if (callPtr == NULL || --callPtr->refCount >= 1) {
return;
}
if (callPtr->chain != callPtr->staticChain) {
@@ -434,7 +440,7 @@ TclOOGetSortedMethodList(
AddClassMethodNames(oPtr->selfCls, flags, &names);
FOREACH(mixinPtr, oPtr->mixins) {
AddClassMethodNames(mixinPtr, flags, &names);
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names);
}
/*
@@ -598,7 +604,7 @@ AddClassMethodNames(
/* TODO: Beware of infinite loops! */
FOREACH(mixinPtr, clsPtr->mixins) {
AddClassMethodNames(mixinPtr, flags, namesPtr);
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, namesPtr);
}
}
@@ -695,13 +701,13 @@ AddSimpleChainToCallContext(
FOREACH(mixinPtr, oPtr->mixins) {
AddSimpleClassChainToCallContext(mixinPtr, methodNameObj, cbPtr,
doneFilters, flags, filterDecl);
doneFilters, flags|TRAVERSED_MIXIN, filterDecl);
}
if (oPtr->methodsPtr) {
hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char*) methodNameObj);
if (hPtr != NULL) {
AddMethodToCallChain(Tcl_GetHashValue(hPtr), cbPtr,
doneFilters, filterDecl);
doneFilters, filterDecl, flags);
}
}
}
@@ -732,9 +738,15 @@ AddMethodToCallChain(
* processed. If NULL, not processing filters.
* Note that this function does not update
* this hashtable. */
Class *const filterDecl) /* The class that declared the filter. If
Class *const filterDecl, /* The class that declared the filter. If
* NULL, either the filter was declared by the
* object or this isn't a filter. */
int flags) /* Used to check if we're mixin-consistent
* only. Mixin-consistent means that either
* we're looking to add things from a mixin
* and we have passed a mixin, or we're not
* looking to add things from a mixin and have
* not passed a mixin. */
{
register CallChain *callPtr = cbPtr->callChainPtr;
int i;
@@ -743,9 +755,11 @@ AddMethodToCallChain(
* Return if this is just an entry used to record whether this is a public
* method. If so, there's nothing real to call and so nothing to add to
* the call chain.
*
* This is also where we enforce mixin-consistency.
*/
if (mPtr == NULL || mPtr->typePtr == NULL) {
if (mPtr == NULL || mPtr->typePtr == NULL || !MIXIN_CONSISTENT(flags)) {
return;
}
@@ -1000,6 +1014,8 @@ TclOOGetCallContext(
*/
if (flags & FORCE_UNKNOWN) {
AddSimpleChainToCallContext(oPtr, oPtr->fPtr->unknownMethodNameObj,
&cb, NULL, BUILDING_MIXINS, NULL);
AddSimpleChainToCallContext(oPtr, oPtr->fPtr->unknownMethodNameObj,
&cb, NULL, 0, NULL);
callPtr->flags |= OO_UNKNOWN_METHOD;
@@ -1024,21 +1040,32 @@ TclOOGetCallContext(
doFilters = 1;
Tcl_InitObjHashTable(&doneFilters);
FOREACH(mixinPtr, oPtr->mixins) {
AddClassFiltersToCallContext(oPtr, mixinPtr, &cb, &doneFilters);
AddClassFiltersToCallContext(oPtr, mixinPtr, &cb, &doneFilters,
TRAVERSED_MIXIN|BUILDING_MIXINS|OBJECT_MIXIN);
AddClassFiltersToCallContext(oPtr, mixinPtr, &cb, &doneFilters,
OBJECT_MIXIN);
}
FOREACH(filterObj, oPtr->filters) {
AddSimpleChainToCallContext(oPtr, filterObj, &cb, &doneFilters,
BUILDING_MIXINS, NULL);
AddSimpleChainToCallContext(oPtr, filterObj, &cb, &doneFilters, 0,
NULL);
}
AddClassFiltersToCallContext(oPtr, oPtr->selfCls, &cb, &doneFilters);
AddClassFiltersToCallContext(oPtr, oPtr->selfCls, &cb, &doneFilters,
BUILDING_MIXINS);
AddClassFiltersToCallContext(oPtr, oPtr->selfCls, &cb, &doneFilters,
0);
Tcl_DeleteHashTable(&doneFilters);
}
count = cb.filterLength = callPtr->numChain;
/*
* Add the actual method implementations.
* Add the actual method implementations. We have to do this twice to
* handle class mixins right.
*/
AddSimpleChainToCallContext(oPtr, methodNameObj, &cb, NULL,
flags|BUILDING_MIXINS, NULL);
AddSimpleChainToCallContext(oPtr, methodNameObj, &cb, NULL, flags, NULL);
/*
@@ -1057,6 +1084,8 @@ TclOOGetCallContext(
TclOODeleteChain(callPtr);
return NULL;
}
AddSimpleChainToCallContext(oPtr, oPtr->fPtr->unknownMethodNameObj,
&cb, NULL, BUILDING_MIXINS, NULL);
AddSimpleChainToCallContext(oPtr, oPtr->fPtr->unknownMethodNameObj,
&cb, NULL, 0, NULL);
callPtr->flags |= OO_UNKNOWN_METHOD;
@@ -1201,7 +1230,9 @@ TclOOGetStereotypeCallChain(
*/
Tcl_InitObjHashTable(&doneFilters);
AddClassFiltersToCallContext(&obj, clsPtr, &cb, &doneFilters);
AddClassFiltersToCallContext(&obj, clsPtr, &cb, &doneFilters,
BUILDING_MIXINS);
AddClassFiltersToCallContext(&obj, clsPtr, &cb, &doneFilters, 0);
Tcl_DeleteHashTable(&doneFilters);
count = cb.filterLength = callPtr->numChain;
@@ -1209,6 +1240,8 @@ TclOOGetStereotypeCallChain(
* Add the actual method implementations.
*/
AddSimpleChainToCallContext(&obj, methodNameObj, &cb, NULL,
flags|BUILDING_MIXINS, NULL);
AddSimpleChainToCallContext(&obj, methodNameObj, &cb, NULL, flags, NULL);
/*
@@ -1218,6 +1251,8 @@ TclOOGetStereotypeCallChain(
*/
if (count == callPtr->numChain) {
AddSimpleChainToCallContext(&obj, fPtr->unknownMethodNameObj, &cb,
NULL, BUILDING_MIXINS, NULL);
AddSimpleChainToCallContext(&obj, fPtr->unknownMethodNameObj, &cb,
NULL, 0, NULL);
callPtr->flags |= OO_UNKNOWN_METHOD;
@@ -1259,12 +1294,15 @@ AddClassFiltersToCallContext(
Class *clsPtr, /* Class to get the filters from. */
struct ChainBuilder *const cbPtr,
/* Context to fill with call chain entries. */
Tcl_HashTable *const doneFilters)
Tcl_HashTable *const doneFilters,
/* Where to record what filters have been
* processed. Keys are objects, values are
* ignored. */
int flags) /* Whether we've gone along a mixin link
* yet. */
{
int i;
int i, clearedFlags =
flags & ~(TRAVERSED_MIXIN|OBJECT_MIXIN|BUILDING_MIXINS);
Class *superPtr, *mixinPtr;
Tcl_Obj *filterObj;
@@ -1279,7 +1317,8 @@ AddClassFiltersToCallContext(
*/
FOREACH(mixinPtr, clsPtr->mixins) {
AddClassFiltersToCallContext(oPtr, mixinPtr, cbPtr, doneFilters);
AddClassFiltersToCallContext(oPtr, mixinPtr, cbPtr, doneFilters,
flags|TRAVERSED_MIXIN);
}
/*
@@ -1288,13 +1327,18 @@ AddClassFiltersToCallContext(
* override how filters work to extend their behaviour.
*/
FOREACH(filterObj, clsPtr->filters) {
int isNew;
if (MIXIN_CONSISTENT(flags)) {
FOREACH(filterObj, clsPtr->filters) {
int isNew;
(void) Tcl_CreateHashEntry(doneFilters, (char *) filterObj, &isNew);
if (isNew) {
AddSimpleChainToCallContext(oPtr, filterObj, cbPtr, doneFilters,
0, clsPtr);
(void) Tcl_CreateHashEntry(doneFilters, (char *) filterObj,
&isNew);
if (isNew) {
AddSimpleChainToCallContext(oPtr, filterObj, cbPtr,
doneFilters, clearedFlags|BUILDING_MIXINS, clsPtr);
AddSimpleChainToCallContext(oPtr, filterObj, cbPtr,
doneFilters, clearedFlags, clsPtr);
}
}
}
@@ -1308,7 +1352,8 @@ AddClassFiltersToCallContext(
goto tailRecurse;
default:
FOREACH(superPtr, clsPtr->superclasses) {
AddClassFiltersToCallContext(oPtr, superPtr, cbPtr, doneFilters);
AddClassFiltersToCallContext(oPtr, superPtr, cbPtr, doneFilters,
flags);
}
case 0:
return;
@@ -1355,16 +1400,16 @@ AddSimpleClassChainToCallContext(
tailRecurse:
FOREACH(superPtr, classPtr->mixins) {
AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr,
doneFilters, flags, filterDecl);
doneFilters, flags|TRAVERSED_MIXIN, filterDecl);
}
if (flags & CONSTRUCTOR) {
AddMethodToCallChain(classPtr->constructorPtr, cbPtr, doneFilters,
filterDecl);
filterDecl, flags);
} else if (flags & DESTRUCTOR) {
AddMethodToCallChain(classPtr->destructorPtr, cbPtr, doneFilters,
filterDecl);
filterDecl, flags);
} else {
Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&classPtr->classMethods,
(char *) methodNameObj);
@@ -1383,7 +1428,7 @@ AddSimpleClassChainToCallContext(
flags |= DEFINITE_PROTECTED;
}
}
AddMethodToCallChain(mPtr, cbPtr, doneFilters, filterDecl);
AddMethodToCallChain(mPtr, cbPtr, doneFilters, filterDecl, flags);
}
}
+46 -67
View File
@@ -618,6 +618,47 @@ TclIsSpaceProc(
return CHAR_TYPE(byte) & (TYPE_SPACE) || byte == '\n';
}
/*
*----------------------------------------------------------------------
*
* TclIsBareword--
*
* Report whether byte is one that can be part of a "bareword".
* This concept is named in expression parsing, where it determines
* what can be a legal function name, but is the same definition used
* in determining what variable names can be parsed as variable
* substitutions without the benefit of enclosing braces. The set of
* ASCII chars that are accepted are the numeric chars ('0'-'9'),
* the alphabetic chars ('a'-'z', 'A'-'Z') and underscore ('_').
*
* Results:
* Returns 1, if byte is in the accepted set of chars, 0 otherwise.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TclIsBareword(
char byte)
{
if (byte < '0' || byte > 'z') {
return 0;
}
if (byte <= '9' || byte >= 'a') {
return 1;
}
if (byte == '_') {
return 1;
}
if (byte < 'A' || byte > 'Z') {
return 0;
}
return 1;
}
/*
*----------------------------------------------------------------------
*
@@ -1346,9 +1387,7 @@ Tcl_ParseVarName(
{
Tcl_Token *tokenPtr;
register const char *src;
unsigned char c;
int varIndex, offset;
Tcl_UniChar ch;
int varIndex;
unsigned array;
if ((numBytes == 0) || (start == NULL)) {
@@ -1431,22 +1470,12 @@ Tcl_ParseVarName(
tokenPtr->numComponents = 0;
while (numBytes) {
if (Tcl_UtfCharComplete(src, numBytes)) {
offset = Tcl_UtfToUniChar(src, &ch);
} else {
char utfBytes[TCL_UTF_MAX];
memcpy(utfBytes, src, (size_t) numBytes);
utfBytes[numBytes] = '\0';
offset = Tcl_UtfToUniChar(utfBytes, &ch);
}
c = UCHAR(ch);
if (isalnum(c) || (c == '_')) { /* INTL: ISO only, UCHAR. */
src += offset;
numBytes -= offset;
if (TclIsBareword(*src)) {
src += 1;
numBytes -= 1;
continue;
}
if ((c == ':') && (numBytes != 1) && (src[1] == ':')) {
if ((src[0] == ':') && (numBytes != 1) && (src[1] == ':')) {
src += 2;
numBytes -= 2;
while (numBytes && (*src == ':')) {
@@ -2496,56 +2525,6 @@ TclObjCommandComplete(
return CommandComplete(script, length);
}
/*
*----------------------------------------------------------------------
*
* TclIsLocalScalar --
*
* Check to see if a given string is a legal scalar variable name with no
* namespace qualifiers or substitutions.
*
* Results:
* Returns 1 if the variable is a local scalar.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TclIsLocalScalar(
const char *src,
int len)
{
const char *p;
const char *lastChar = src + (len - 1);
for (p=src ; p<=lastChar ; p++) {
if ((CHAR_TYPE(*p) != TYPE_NORMAL)
&& (CHAR_TYPE(*p) != TYPE_COMMAND_END)) {
/*
* TCL_COMMAND_END is returned for the last character of the
* string. By this point we know it isn't an array or namespace
* reference.
*/
return 0;
}
if (*p == '(') {
if (*lastChar == ')') { /* We have an array element */
return 0;
}
} else if (*p == ':') {
if ((p != lastChar) && *(p+1) == ':') { /* qualified name */
return 0;
}
}
}
return 1;
}
/*
* Local Variables:
* mode: c
+14 -246
View File
@@ -15,7 +15,6 @@
#include "tclInt.h"
#include "tclCompile.h"
#include "tclOOInt.h"
/*
* Variables that are part of the [apply] command implementation and which
@@ -41,9 +40,6 @@ static void InitResolvedLocals(Tcl_Interp *interp,
ByteCode *codePtr, Var *defPtr,
Namespace *nsPtr);
static void InitLocalCache(Proc *procPtr);
static int PushProcCallFrame(ClientData clientData,
register Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], int isLambda);
static void ProcBodyDup(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr);
static void ProcBodyFree(Tcl_Obj *objPtr);
static int ProcWrongNumArgs(Tcl_Interp *interp, int skip);
@@ -92,10 +88,10 @@ static const Tcl_ObjType levelReferenceType = {
*
* Internally, ptr1 is a pointer to a Proc instance that is not bound to a
* command name, and ptr2 is a pointer to the namespace that the Proc instance
* will execute within.
* will execute within. IF YOU CHANGE THIS, CHECK IN tclDisassemble.c TOO.
*/
static const Tcl_ObjType lambdaType = {
const Tcl_ObjType tclLambdaType = {
"lambdaExpr", /* name */
FreeLambdaInternalRep, /* freeIntRepProc */
DupLambdaInternalRep, /* dupIntRepProc */
@@ -221,7 +217,7 @@ Tcl_ProcObjCmd(
*
* This code is nearly identical to the #280 code in SetLambdaFromAny, see
* this file. The differences are the different index of the body in the
* line array of the context, and the lamdba code requires some special
* line array of the context, and the lambda code requires some special
* processing. Find a way to factor the common elements into a single
* function.
*/
@@ -1571,7 +1567,7 @@ InitArgsAndLocals(
/*
*----------------------------------------------------------------------
*
* PushProcCallFrame --
* TclPushProcCallFrame --
*
* Compiles a proc body if necessary, then pushes a CallFrame suitable
* for executing it.
@@ -1586,8 +1582,8 @@ InitArgsAndLocals(
*----------------------------------------------------------------------
*/
static int
PushProcCallFrame(
int
TclPushProcCallFrame(
ClientData clientData, /* Record describing procedure to be
* interpreted. */
register Tcl_Interp *interp,/* Interpreter in which procedure was
@@ -1708,7 +1704,7 @@ TclNRInterpProc(
* procedure. */
Tcl_Obj *const objv[]) /* Argument value objects. */
{
int result = PushProcCallFrame(clientData, interp, objc, objv,
int result = TclPushProcCallFrame(clientData, interp, objc, objv,
/*isLambda*/ 0);
if (result != TCL_OK) {
@@ -2443,7 +2439,7 @@ DupLambdaInternalRep(
procPtr->refCount++;
Tcl_IncrRefCount(nsObjPtr);
copyPtr->typePtr = &lambdaType;
copyPtr->typePtr = &tclLambdaType;
}
static void
@@ -2480,7 +2476,7 @@ SetLambdaFromAny(
/*
* Convert objPtr to list type first; if it cannot be converted, or if its
* length is not 2, then it cannot be converted to lambdaType.
* length is not 2, then it cannot be converted to tclLambdaType.
*/
result = TclListObjGetElements(NULL, objPtr, &objc, &objv);
@@ -2626,14 +2622,14 @@ SetLambdaFromAny(
/*
* Free the list internalrep of objPtr - this will free argsPtr, but
* bodyPtr retains a reference from the Proc structure. Then finish the
* conversion to lambdaType.
* conversion to tclLambdaType.
*/
TclFreeIntRep(objPtr);
objPtr->internalRep.twoPtrValue.ptr1 = procPtr;
objPtr->internalRep.twoPtrValue.ptr2 = nsObjPtr;
objPtr->typePtr = &lambdaType;
objPtr->typePtr = &tclLambdaType;
return TCL_OK;
}
@@ -2684,12 +2680,12 @@ TclNRApplyObjCmd(
}
/*
* Set lambdaPtr, convert it to lambdaType in the current interp if
* Set lambdaPtr, convert it to tclLambdaType in the current interp if
* necessary.
*/
lambdaPtr = objv[1];
if (lambdaPtr->typePtr == &lambdaType) {
if (lambdaPtr->typePtr == &tclLambdaType) {
procPtr = lambdaPtr->internalRep.twoPtrValue.ptr1;
}
@@ -2767,7 +2763,7 @@ TclNRApplyObjCmd(
}
extraPtr->isRootEnsemble = isRootEnsemble;
result = PushProcCallFrame(procPtr, interp, objc, objv, 1);
result = TclPushProcCallFrame(procPtr, interp, objc, objv, 1);
if (result == TCL_OK) {
TclNRAddCallback(interp, ApplyNR2, extraPtr, NULL, NULL, NULL);
result = TclNRInterpProcCore(interp, objv[1], 2, &MakeLambdaError);
@@ -2826,234 +2822,6 @@ MakeLambdaError(
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
}
/*
*----------------------------------------------------------------------
*
* Tcl_DisassembleObjCmd --
*
* Implementation of the "::tcl::unsupported::disassemble" command. This
* command is not documented, but will disassemble procedures, lambda
* terms and general scripts. Note that will compile terms if necessary
* in order to disassemble them.
*
*----------------------------------------------------------------------
*/
int
Tcl_DisassembleObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const types[] = {
"lambda", "method", "objmethod", "proc", "script", NULL
};
enum Types {
DISAS_LAMBDA, DISAS_CLASS_METHOD, DISAS_OBJECT_METHOD, DISAS_PROC,
DISAS_SCRIPT
};
int idx, result;
Tcl_Obj *codeObjPtr = NULL;
Proc *procPtr = NULL;
Tcl_HashEntry *hPtr;
Object *oPtr;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "type ...");
return TCL_ERROR;
}
if (Tcl_GetIndexFromObj(interp, objv[1], types, "type", 0, &idx)!=TCL_OK){
return TCL_ERROR;
}
switch ((enum Types) idx) {
case DISAS_LAMBDA: {
Command cmd;
Tcl_Obj *nsObjPtr;
Tcl_Namespace *nsPtr;
/*
* Compile (if uncompiled) and disassemble a lambda term.
*/
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "lambdaTerm");
return TCL_ERROR;
}
if (objv[2]->typePtr == &lambdaType) {
procPtr = objv[2]->internalRep.twoPtrValue.ptr1;
}
if (procPtr == NULL || procPtr->iPtr != (Interp *) interp) {
result = SetLambdaFromAny(interp, objv[2]);
if (result != TCL_OK) {
return result;
}
procPtr = objv[2]->internalRep.twoPtrValue.ptr1;
}
memset(&cmd, 0, sizeof(Command));
nsObjPtr = objv[2]->internalRep.twoPtrValue.ptr2;
result = TclGetNamespaceFromObj(interp, nsObjPtr, &nsPtr);
if (result != TCL_OK) {
return result;
}
cmd.nsPtr = (Namespace *) nsPtr;
procPtr->cmdPtr = &cmd;
result = PushProcCallFrame(procPtr, interp, objc, objv, 1);
if (result != TCL_OK) {
return result;
}
TclPopStackFrame(interp);
codeObjPtr = procPtr->bodyPtr;
break;
}
case DISAS_PROC:
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "procName");
return TCL_ERROR;
}
procPtr = TclFindProc((Interp *) interp, TclGetString(objv[2]));
if (procPtr == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" isn't a procedure", TclGetString(objv[2])));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROC",
TclGetString(objv[2]), NULL);
return TCL_ERROR;
}
/*
* Compile (if uncompiled) and disassemble a procedure.
*/
result = PushProcCallFrame(procPtr, interp, 2, objv+1, 1);
if (result != TCL_OK) {
return result;
}
TclPopStackFrame(interp);
codeObjPtr = procPtr->bodyPtr;
break;
case DISAS_SCRIPT:
/*
* Compile and disassemble a script.
*/
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "script");
return TCL_ERROR;
}
if ((objv[2]->typePtr != &tclByteCodeType)
&& (TclSetByteCodeFromAny(interp, objv[2], NULL, NULL) != TCL_OK)) {
return TCL_ERROR;
}
codeObjPtr = objv[2];
break;
case DISAS_CLASS_METHOD:
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "className methodName");
return TCL_ERROR;
}
/*
* Look up the body of a class method.
*/
oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[2]);
if (oPtr == NULL) {
return TCL_ERROR;
}
if (oPtr->classPtr == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" is not a class", TclGetString(objv[2])));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS",
TclGetString(objv[2]), NULL);
return TCL_ERROR;
}
hPtr = Tcl_FindHashEntry(&oPtr->classPtr->classMethods,
(char *) objv[3]);
goto methodBody;
case DISAS_OBJECT_METHOD:
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "objectName methodName");
return TCL_ERROR;
}
/*
* Look up the body of an instance method.
*/
oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[2]);
if (oPtr == NULL) {
return TCL_ERROR;
}
if (oPtr->methodsPtr == NULL) {
goto unknownMethod;
}
hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[3]);
/*
* Compile (if necessary) and disassemble a method body.
*/
methodBody:
if (hPtr == NULL) {
unknownMethod:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"unknown method \"%s\"", TclGetString(objv[3])));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD",
TclGetString(objv[3]), NULL);
return TCL_ERROR;
}
procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr));
if (procPtr == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"body not available for this kind of method", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE",
"METHODTYPE", NULL);
return TCL_ERROR;
}
if (procPtr->bodyPtr->typePtr != &tclByteCodeType) {
Command cmd;
/*
* Yes, this is ugly, but we need to pass the namespace in to the
* compiler in two places.
*/
cmd.nsPtr = (Namespace *) oPtr->namespacePtr;
procPtr->cmdPtr = &cmd;
result = TclProcCompileProc(interp, procPtr, procPtr->bodyPtr,
(Namespace *) oPtr->namespacePtr, "body of method",
TclGetString(objv[3]));
procPtr->cmdPtr = NULL;
if (result != TCL_OK) {
return result;
}
}
codeObjPtr = procPtr->bodyPtr;
break;
default:
CLANG_ASSERT(0);
}
/*
* Do the actual disassembly.
*/
if (((ByteCode *) codeObjPtr->internalRep.twoPtrValue.ptr1)->flags
& TCL_BYTECODE_PRECOMPILED) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"may not disassemble prebuilt bytecode", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE",
"BYTECODE", NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, TclDisassembleByteCodeObj(codeObjPtr));
return TCL_OK;
}
/*
* Local Variables:
* mode: c
+2 -1
View File
@@ -946,7 +946,8 @@ CompileRegexp(
* Tcl_RegExpExecObj to optionally do a fast match (avoids RE engine).
*/
if (TclReToGlob(NULL, string, length, &stringBuf, &exact) == TCL_OK) {
if (TclReToGlob(NULL, string, length, &stringBuf, &exact,
NULL) == TCL_OK) {
regexpPtr->globObjPtr = TclDStringToObj(&stringBuf);
Tcl_IncrRefCount(regexpPtr->globObjPtr);
} else {
+7 -2
View File
@@ -353,11 +353,16 @@ Tcl_ConditionFinalize(
*/
void
TclFinalizeThreadData(void)
TclFinalizeThreadData(int quick)
{
TclFinalizeThreadDataThread();
#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
TclFinalizeThreadAllocThread();
if (!quick) {
/*
* Quick exit principle makes it useless to terminate allocators
*/
TclFinalizeThreadAllocThread();
}
#endif
}
+10 -9
View File
@@ -217,10 +217,11 @@ GetCache(void)
cachePtr = TclpGetAllocCache();
if (cachePtr == NULL) {
cachePtr = calloc(1, sizeof(Cache));
cachePtr = TclpSysAlloc(sizeof(Cache), 0);
if (cachePtr == NULL) {
Tcl_Panic("alloc: could not allocate new cache");
}
memset(cachePtr, 0, sizeof(Cache));
Tcl_MutexLock(listLockPtr);
cachePtr->nextPtr = firstCachePtr;
firstCachePtr = cachePtr;
@@ -287,7 +288,7 @@ TclFreeAllocCache(
*nextPtrPtr = cachePtr->nextPtr;
cachePtr->nextPtr = NULL;
Tcl_MutexUnlock(listLockPtr);
free(cachePtr);
TclpSysFree(cachePtr);
}
/*
@@ -332,7 +333,7 @@ TclpAlloc(
/*
* Increment the requested size to include room for the Block structure.
* Call malloc() directly if the required amount is greater than the
* Call TclpSysAlloc() directly if the required amount is greater than the
* largest block, otherwise pop the smallest block large enough,
* allocating more blocks if necessary.
*/
@@ -344,7 +345,7 @@ TclpAlloc(
#endif
if (size > MAXALLOC) {
bucket = NBUCKETS;
blockPtr = malloc(size);
blockPtr = TclpSysAlloc(size, 0);
if (blockPtr != NULL) {
cachePtr->totalAssigned += reqSize;
}
@@ -407,7 +408,7 @@ TclpFree(
bucket = blockPtr->sourceBucket;
if (bucket == NBUCKETS) {
cachePtr->totalAssigned -= blockPtr->blockReqSize;
free(blockPtr);
TclpSysFree(blockPtr);
return;
}
@@ -472,7 +473,7 @@ TclpRealloc(
/*
* If the block is not a system block and fits in place, simply return the
* existing pointer. Otherwise, if the block is a system block and the new
* size would also require a system block, call realloc() directly.
* size would also require a system block, call TclpSysRealloc() directly.
*/
blockPtr = Ptr2Block(ptr);
@@ -495,7 +496,7 @@ TclpRealloc(
} else if (size > MAXALLOC) {
cachePtr->totalAssigned -= blockPtr->blockReqSize;
cachePtr->totalAssigned += reqSize;
blockPtr = realloc(blockPtr, size);
blockPtr = TclpSysRealloc(blockPtr, size);
if (blockPtr == NULL) {
return NULL;
}
@@ -567,7 +568,7 @@ TclThreadAllocObj(void)
Tcl_Obj *newObjsPtr;
cachePtr->numObjects = numMove = NOBJALLOC;
newObjsPtr = malloc(sizeof(Tcl_Obj) * numMove);
newObjsPtr = TclpSysAlloc(sizeof(Tcl_Obj) * numMove, 0);
if (newObjsPtr == NULL) {
Tcl_Panic("alloc: could not allocate %d new objects", numMove);
}
@@ -964,7 +965,7 @@ GetBlocks(
if (blockPtr == NULL) {
size = MAXALLOC;
blockPtr = malloc(size);
blockPtr = TclpSysAlloc(size, 0);
if (blockPtr == NULL) {
return 0;
}
+3
View File
@@ -2511,6 +2511,9 @@ TclObjCallVarTraces(
if (!part1Ptr) {
part1Ptr = localName(iPtr->varFramePtr, index);
}
if (!part1Ptr) {
Tcl_Panic("Cannot trace a variable with no name");
}
part1 = TclGetString(part1Ptr);
part2 = part2Ptr? TclGetString(part2Ptr) : NULL;
+8 -1
View File
@@ -4249,7 +4249,8 @@ TclReToGlob(
const char *reStr,
int reStrLen,
Tcl_DString *dsPtr,
int *exactPtr)
int *exactPtr,
int *quantifiersFoundPtr)
{
int anchorLeft, anchorRight, lastIsStar, numStars;
char *dsStr, *dsStrStart;
@@ -4257,6 +4258,9 @@ TclReToGlob(
strEnd = reStr + reStrLen;
Tcl_DStringInit(dsPtr);
if (quantifiersFoundPtr != NULL) {
*quantifiersFoundPtr = 0;
}
/*
* "***=xxx" == "*xxx*", watch for glob-sensitive chars.
@@ -4369,6 +4373,9 @@ TclReToGlob(
}
break;
case '.':
if (quantifiersFoundPtr != NULL) {
*quantifiersFoundPtr = 1;
}
anchorLeft = 0; /* prevent exact match */
if (p+1 < strEnd) {
if (p[1] == '*') {
+4 -5
View File
@@ -4405,8 +4405,8 @@ ObjMakeUpvar(
|| !HasLocalVars(varFramePtr)
|| (strstr(TclGetString(myNamePtr), "::") != NULL))) {
Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf(
"bad variable name \"%s\": upvar won't create "
"namespace variable that refers to procedure variable",
"bad variable name \"%s\": can't create namespace "
"variable that refers to procedure variable",
TclGetString(myNamePtr)));
Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", NULL);
return TCL_ERROR;
@@ -4506,9 +4506,8 @@ TclPtrObjMakeUpvar(
*/
Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf(
"bad variable name \"%s\": upvar won't create a"
" scalar variable that looks like an array element",
myName));
"bad variable name \"%s\": can't create a scalar "
"variable that looks like an array element", myName));
Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT",
NULL);
return TCL_ERROR;
+1 -1
View File
@@ -26,7 +26,7 @@
* interface, even if that is mostly true).
*/
#define TCL_ZLIB_VERSION "2.0"
#define TCL_ZLIB_VERSION "2.0.1"
/*
* Magic flags used with wbits fields to indicate that we're handling the gzip
+1 -1
View File
@@ -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.1
package require -exact Tcl 8.6.3
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
+1 -1
View File
@@ -1,3 +1,3 @@
package ifneeded platform 1.0.12 [list source [file join $dir platform.tcl]]
package ifneeded platform 1.0.13 [list source [file join $dir platform.tcl]]
package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]]
+23 -20
View File
@@ -313,13 +313,25 @@ proc ::platform::patterns {id} {
}
}
}
macosx-powerpc {
lappend res macosx-universal
}
macosx-x86_64 {
lappend res macosx-i386-x86_64
}
macosx-ix86 {
lappend res macosx-universal macosx-i386-x86_64
}
macosx*-* {
# 10.5+
if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} {
switch -exact -- $cpu {
ix86 -
x86_64 { set alt i386-x86_64 }
ix86 {
lappend alt i386-x86_64
lappend alt universal
}
x86_64 { lappend alt i386-x86_64 }
default { set alt {} }
}
@@ -330,35 +342,26 @@ proc ::platform::patterns {id} {
set res {}
for {set j $minor} {$j >= 5} {incr j -1} {
lappend res macosx${major}.${j}-${cpu}
lappend res macosx${major}.${j}-universal
if {$alt ne {}} {
lappend res macosx${major}.${j}-$alt
foreach a $alt {
lappend res macosx${major}.${j}-$a
}
}
# Add unversioned patterns for 10.3/10.4 builds.
lappend res macosx-${cpu}
lappend res macosx-universal
if {$alt ne {}} {
lappend res macosx-$alt
foreach a $alt {
lappend res macosx-$a
}
} else {
lappend res macosx-universal
if {$alt ne {}} {
lappend res macosx-$alt
# No version, just do unversioned patterns.
foreach a $alt {
lappend res macosx-$a
}
}
} else {
lappend res macosx-universal
# no v, no cpu ... nothing
}
}
macosx-powerpc {
lappend res macosx-universal
}
macosx-x86_64 -
macosx-ix86 {
lappend res macosx-universal macosx-i386-x86_64
}
}
lappend res tcl ; # Pure tcl packages are always compatible.
return $res
@@ -368,7 +371,7 @@ proc ::platform::patterns {id} {
# ### ### ### ######### ######### #########
## Ready
package provide platform 1.0.12
package provide platform 1.0.13
# ### ### ### ######### ######### #########
## Demo application
+1 -1
View File
@@ -187,7 +187,7 @@ proc ::platform::shell::TEMP {} {
}
}
}
if {$channel != ""} {
if {$channel ne ""} {
return -code error "Failed to open a temporary file: $channel"
} else {
return -code error "Failed to find an unused temporary file name"
+32
View File
@@ -3,6 +3,38 @@
set TZData(:Africa/Accra) {
{-9223372036854775808 -52 0 LMT}
{-1640995148 0 0 GMT}
{-1556841600 1200 1 GHST}
{-1546388400 0 0 GMT}
{-1525305600 1200 1 GHST}
{-1514852400 0 0 GMT}
{-1493769600 1200 1 GHST}
{-1483316400 0 0 GMT}
{-1462233600 1200 1 GHST}
{-1451780400 0 0 GMT}
{-1430611200 1200 1 GHST}
{-1420158000 0 0 GMT}
{-1399075200 1200 1 GHST}
{-1388622000 0 0 GMT}
{-1367539200 1200 1 GHST}
{-1357086000 0 0 GMT}
{-1336003200 1200 1 GHST}
{-1325550000 0 0 GMT}
{-1304380800 1200 1 GHST}
{-1293927600 0 0 GMT}
{-1272844800 1200 1 GHST}
{-1262391600 0 0 GMT}
{-1241308800 1200 1 GHST}
{-1230855600 0 0 GMT}
{-1209772800 1200 1 GHST}
{-1199319600 0 0 GMT}
{-1178150400 1200 1 GHST}
{-1167697200 0 0 GMT}
{-1146614400 1200 1 GHST}
{-1136161200 0 0 GMT}
{-1115078400 1200 1 GHST}
{-1104625200 0 0 GMT}
{-1083542400 1200 1 GHST}
{-1073089200 0 0 GMT}
{-1051920000 1200 1 GHST}
{-1041466800 0 0 GMT}
{-1020384000 1200 1 GHST}
+3 -5
View File
@@ -1,7 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Addis_Ababa) {
{-9223372036854775808 9288 0 LMT}
{-3155682888 9320 0 ADMT}
{-1062210920 10800 0 EAT}
if {![info exists TZData(Africa/Nairobi)]} {
LoadTimeZoneFile Africa/Nairobi
}
set TZData(:Africa/Addis_Ababa) $TZData(:Africa/Nairobi)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Asmara) {
{-9223372036854775808 9332 0 LMT}
{-3155682932 9332 0 AMT}
{-2524530932 9320 0 ADMT}
{-1062210920 10800 0 EAT}
if {![info exists TZData(Africa/Nairobi)]} {
LoadTimeZoneFile Africa/Nairobi
}
set TZData(:Africa/Asmara) $TZData(:Africa/Nairobi)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Bamako) {
{-9223372036854775808 -1920 0 LMT}
{-1830382080 0 0 GMT}
{-1131235200 -3600 0 WAT}
{-300841200 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Bamako) $TZData(:Africa/Abidjan)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Bangui) {
{-9223372036854775808 4460 0 LMT}
{-1830388460 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Bangui) $TZData(:Africa/Lagos)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Banjul) {
{-9223372036854775808 -3996 0 LMT}
{-1830380004 -3996 0 BMT}
{-1104533604 -3600 0 WAT}
{-189385200 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Banjul) $TZData(:Africa/Abidjan)
+1 -1
View File
@@ -2,6 +2,6 @@
set TZData(:Africa/Bissau) {
{-9223372036854775808 -3740 0 LMT}
{-1849388260 -3600 0 WAT}
{-1830380260 -3600 0 WAT}
{157770000 0 0 GMT}
}
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Blantyre) {
{-9223372036854775808 8400 0 LMT}
{-2109291600 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Blantyre) $TZData(:Africa/Maputo)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Brazzaville) {
{-9223372036854775808 3668 0 LMT}
{-1830387668 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Brazzaville) $TZData(:Africa/Lagos)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Bujumbura) {
{-9223372036854775808 7048 0 LMT}
{-2524528648 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Bujumbura) $TZData(:Africa/Maputo)
+184
View File
@@ -125,4 +125,188 @@ set TZData(:Africa/Cairo) {
{1281474000 7200 0 EET}
{1284069600 10800 1 EEST}
{1285880400 7200 0 EET}
{1400191200 10800 1 EEST}
{1403816400 7200 0 EET}
{1406844000 10800 1 EEST}
{1411678800 7200 0 EET}
{1429826400 10800 1 EEST}
{1434056400 7200 0 EET}
{1437688800 10800 1 EEST}
{1443128400 7200 0 EET}
{1461880800 10800 1 EEST}
{1464901200 7200 0 EET}
{1467928800 10800 1 EEST}
{1475182800 7200 0 EET}
{1493330400 10800 1 EEST}
{1495746000 7200 0 EET}
{1498773600 10800 1 EEST}
{1506632400 7200 0 EET}
{1524780000 10800 1 EEST}
{1525986000 7200 0 EET}
{1529013600 10800 1 EEST}
{1538082000 7200 0 EET}
{1556229600 10800 1 EEST}
{1556830800 7200 0 EET}
{1559858400 10800 1 EEST}
{1569531600 7200 0 EET}
{1590703200 10800 1 EEST}
{1600981200 7200 0 EET}
{1620943200 10800 1 EEST}
{1633035600 7200 0 EET}
{1651788000 10800 1 EEST}
{1664485200 7200 0 EET}
{1682632800 10800 1 EEST}
{1695934800 7200 0 EET}
{1714082400 10800 1 EEST}
{1727384400 7200 0 EET}
{1745532000 10800 1 EEST}
{1758834000 7200 0 EET}
{1776981600 10800 1 EEST}
{1790283600 7200 0 EET}
{1809036000 10800 1 EEST}
{1822338000 7200 0 EET}
{1840485600 10800 1 EEST}
{1853787600 7200 0 EET}
{1871935200 10800 1 EEST}
{1885237200 7200 0 EET}
{1903384800 10800 1 EEST}
{1916686800 7200 0 EET}
{1934834400 10800 1 EEST}
{1948136400 7200 0 EET}
{1966888800 10800 1 EEST}
{1980190800 7200 0 EET}
{1998338400 10800 1 EEST}
{2011640400 7200 0 EET}
{2029788000 10800 1 EEST}
{2043090000 7200 0 EET}
{2061237600 10800 1 EEST}
{2074539600 7200 0 EET}
{2092687200 10800 1 EEST}
{2105989200 7200 0 EET}
{2124136800 10800 1 EEST}
{2137438800 7200 0 EET}
{2156191200 10800 1 EEST}
{2169493200 7200 0 EET}
{2187640800 10800 1 EEST}
{2200942800 7200 0 EET}
{2219090400 10800 1 EEST}
{2232392400 7200 0 EET}
{2250540000 10800 1 EEST}
{2263842000 7200 0 EET}
{2281989600 10800 1 EEST}
{2295291600 7200 0 EET}
{2313439200 10800 1 EEST}
{2326741200 7200 0 EET}
{2345493600 10800 1 EEST}
{2358795600 7200 0 EET}
{2376943200 10800 1 EEST}
{2390245200 7200 0 EET}
{2408392800 10800 1 EEST}
{2421694800 7200 0 EET}
{2439842400 10800 1 EEST}
{2453144400 7200 0 EET}
{2471292000 10800 1 EEST}
{2484594000 7200 0 EET}
{2503346400 10800 1 EEST}
{2516648400 7200 0 EET}
{2534796000 10800 1 EEST}
{2548098000 7200 0 EET}
{2566245600 10800 1 EEST}
{2579547600 7200 0 EET}
{2597695200 10800 1 EEST}
{2610997200 7200 0 EET}
{2629144800 10800 1 EEST}
{2642446800 7200 0 EET}
{2660594400 10800 1 EEST}
{2673896400 7200 0 EET}
{2692648800 10800 1 EEST}
{2705950800 7200 0 EET}
{2724098400 10800 1 EEST}
{2737400400 7200 0 EET}
{2755548000 10800 1 EEST}
{2768850000 7200 0 EET}
{2786997600 10800 1 EEST}
{2800299600 7200 0 EET}
{2818447200 10800 1 EEST}
{2831749200 7200 0 EET}
{2850501600 10800 1 EEST}
{2863803600 7200 0 EET}
{2881951200 10800 1 EEST}
{2895253200 7200 0 EET}
{2913400800 10800 1 EEST}
{2926702800 7200 0 EET}
{2944850400 10800 1 EEST}
{2958152400 7200 0 EET}
{2976300000 10800 1 EEST}
{2989602000 7200 0 EET}
{3007749600 10800 1 EEST}
{3021051600 7200 0 EET}
{3039804000 10800 1 EEST}
{3053106000 7200 0 EET}
{3071253600 10800 1 EEST}
{3084555600 7200 0 EET}
{3102703200 10800 1 EEST}
{3116005200 7200 0 EET}
{3134152800 10800 1 EEST}
{3147454800 7200 0 EET}
{3165602400 10800 1 EEST}
{3178904400 7200 0 EET}
{3197052000 10800 1 EEST}
{3210354000 7200 0 EET}
{3229106400 10800 1 EEST}
{3242408400 7200 0 EET}
{3260556000 10800 1 EEST}
{3273858000 7200 0 EET}
{3292005600 10800 1 EEST}
{3305307600 7200 0 EET}
{3323455200 10800 1 EEST}
{3336757200 7200 0 EET}
{3354904800 10800 1 EEST}
{3368206800 7200 0 EET}
{3386959200 10800 1 EEST}
{3400261200 7200 0 EET}
{3418408800 10800 1 EEST}
{3431710800 7200 0 EET}
{3449858400 10800 1 EEST}
{3463160400 7200 0 EET}
{3481308000 10800 1 EEST}
{3494610000 7200 0 EET}
{3512757600 10800 1 EEST}
{3526059600 7200 0 EET}
{3544207200 10800 1 EEST}
{3557509200 7200 0 EET}
{3576261600 10800 1 EEST}
{3589563600 7200 0 EET}
{3607711200 10800 1 EEST}
{3621013200 7200 0 EET}
{3639160800 10800 1 EEST}
{3652462800 7200 0 EET}
{3670610400 10800 1 EEST}
{3683912400 7200 0 EET}
{3702060000 10800 1 EEST}
{3715362000 7200 0 EET}
{3734114400 10800 1 EEST}
{3747416400 7200 0 EET}
{3765564000 10800 1 EEST}
{3778866000 7200 0 EET}
{3797013600 10800 1 EEST}
{3810315600 7200 0 EET}
{3828463200 10800 1 EEST}
{3841765200 7200 0 EET}
{3859912800 10800 1 EEST}
{3873214800 7200 0 EET}
{3891362400 10800 1 EEST}
{3904664400 7200 0 EET}
{3923416800 10800 1 EEST}
{3936718800 7200 0 EET}
{3954866400 10800 1 EEST}
{3968168400 7200 0 EET}
{3986316000 10800 1 EEST}
{3999618000 7200 0 EET}
{4017765600 10800 1 EEST}
{4031067600 7200 0 EET}
{4049215200 10800 1 EEST}
{4062517200 7200 0 EET}
{4080664800 10800 1 EEST}
{4093966800 7200 0 EET}
}
+148 -83
View File
@@ -38,46 +38,46 @@ set TZData(:Africa/Casablanca) {
{1376100000 3600 1 WEST}
{1382839200 0 0 WET}
{1396144800 3600 1 WEST}
{1404007200 0 0 WET}
{1406599200 3600 1 WEST}
{1403920800 0 0 WET}
{1406944800 3600 1 WEST}
{1414288800 0 0 WET}
{1427594400 3600 1 WEST}
{1434592800 0 0 WET}
{1434160800 0 0 WET}
{1437184800 3600 1 WEST}
{1445738400 0 0 WET}
{1459044000 3600 1 WEST}
{1465264800 0 0 WET}
{1467856800 3600 1 WEST}
{1465005600 0 0 WET}
{1468029600 3600 1 WEST}
{1477792800 0 0 WET}
{1490493600 3600 1 WEST}
{1495850400 0 0 WET}
{1498442400 3600 1 WEST}
{1495245600 0 0 WET}
{1498874400 3600 1 WEST}
{1509242400 0 0 WET}
{1521943200 3600 1 WEST}
{1526436000 0 0 WET}
{1529028000 3600 1 WEST}
{1526090400 0 0 WET}
{1529114400 3600 1 WEST}
{1540692000 0 0 WET}
{1553997600 3600 1 WEST}
{1557108000 0 0 WET}
{1559700000 3600 1 WEST}
{1556935200 0 0 WET}
{1559959200 3600 1 WEST}
{1572141600 0 0 WET}
{1585447200 3600 1 WEST}
{1587693600 0 0 WET}
{1590285600 3600 1 WEST}
{1587175200 0 0 WET}
{1590804000 3600 1 WEST}
{1603591200 0 0 WET}
{1616896800 3600 1 WEST}
{1618279200 0 0 WET}
{1620871200 3600 1 WEST}
{1618020000 0 0 WET}
{1621044000 3600 1 WEST}
{1635645600 0 0 WET}
{1648346400 3600 1 WEST}
{1648951200 0 0 WET}
{1651543200 3600 1 WEST}
{1648864800 0 0 WET}
{1651888800 3600 1 WEST}
{1667095200 0 0 WET}
{1682128800 3600 1 WEST}
{1698544800 0 0 WET}
{1712714400 3600 1 WEST}
{1712973600 3600 1 WEST}
{1729994400 0 0 WET}
{1743386400 3600 1 WEST}
{1743818400 3600 1 WEST}
{1761444000 0 0 WET}
{1774749600 3600 1 WEST}
{1792893600 0 0 WET}
@@ -98,71 +98,136 @@ set TZData(:Africa/Casablanca) {
{2026951200 3600 1 WEST}
{2045700000 0 0 WET}
{2058400800 3600 1 WEST}
{2077149600 0 0 WET}
{2077063200 0 0 WET}
{2077153200 0 0 WET}
{2090455200 3600 1 WEST}
{2108167200 0 0 WET}
{2107908000 0 0 WET}
{2108602800 0 0 WET}
{2121904800 3600 1 WEST}
{2138839200 0 0 WET}
{2138752800 0 0 WET}
{2140052400 0 0 WET}
{2153354400 3600 1 WEST}
{2184800400 3600 1 WEST}
{2216250000 3600 1 WEST}
{2248304400 3600 1 WEST}
{2279754000 3600 1 WEST}
{2311203600 3600 1 WEST}
{2342653200 3600 1 WEST}
{2374102800 3600 1 WEST}
{2405552400 3600 1 WEST}
{2437606800 3600 1 WEST}
{2469056400 3600 1 WEST}
{2500506000 3600 1 WEST}
{2531955600 3600 1 WEST}
{2563405200 3600 1 WEST}
{2595459600 3600 1 WEST}
{2626909200 3600 1 WEST}
{2658358800 3600 1 WEST}
{2689808400 3600 1 WEST}
{2721258000 3600 1 WEST}
{2752707600 3600 1 WEST}
{2784762000 3600 1 WEST}
{2816211600 3600 1 WEST}
{2847661200 3600 1 WEST}
{2879110800 3600 1 WEST}
{2910560400 3600 1 WEST}
{2942010000 3600 1 WEST}
{2974064400 3600 1 WEST}
{3005514000 3600 1 WEST}
{3036963600 3600 1 WEST}
{3068413200 3600 1 WEST}
{3099862800 3600 1 WEST}
{3131917200 3600 1 WEST}
{3163366800 3600 1 WEST}
{3194816400 3600 1 WEST}
{3226266000 3600 1 WEST}
{3257715600 3600 1 WEST}
{3289165200 3600 1 WEST}
{3321219600 3600 1 WEST}
{3352669200 3600 1 WEST}
{3384118800 3600 1 WEST}
{3415568400 3600 1 WEST}
{3447018000 3600 1 WEST}
{3479072400 3600 1 WEST}
{3510522000 3600 1 WEST}
{3541971600 3600 1 WEST}
{3573421200 3600 1 WEST}
{3604870800 3600 1 WEST}
{3636320400 3600 1 WEST}
{3668374800 3600 1 WEST}
{3699824400 3600 1 WEST}
{3731274000 3600 1 WEST}
{3762723600 3600 1 WEST}
{3794173200 3600 1 WEST}
{3825622800 3600 1 WEST}
{3857677200 3600 1 WEST}
{3889126800 3600 1 WEST}
{3920576400 3600 1 WEST}
{3952026000 3600 1 WEST}
{3983475600 3600 1 WEST}
{4015530000 3600 1 WEST}
{4046979600 3600 1 WEST}
{4078429200 3600 1 WEST}
{2172103200 0 0 WET}
{2184804000 3600 1 WEST}
{2203552800 0 0 WET}
{2216253600 3600 1 WEST}
{2235002400 0 0 WET}
{2248308000 3600 1 WEST}
{2266452000 0 0 WET}
{2279757600 3600 1 WEST}
{2297901600 0 0 WET}
{2311207200 3600 1 WEST}
{2329351200 0 0 WET}
{2342656800 3600 1 WEST}
{2361405600 0 0 WET}
{2374106400 3600 1 WEST}
{2392855200 0 0 WET}
{2405556000 3600 1 WEST}
{2424304800 0 0 WET}
{2437610400 3600 1 WEST}
{2455754400 0 0 WET}
{2469060000 3600 1 WEST}
{2487204000 0 0 WET}
{2500509600 3600 1 WEST}
{2519258400 0 0 WET}
{2531959200 3600 1 WEST}
{2550708000 0 0 WET}
{2563408800 3600 1 WEST}
{2582157600 0 0 WET}
{2595463200 3600 1 WEST}
{2613607200 0 0 WET}
{2626912800 3600 1 WEST}
{2645056800 0 0 WET}
{2658362400 3600 1 WEST}
{2676506400 0 0 WET}
{2689812000 3600 1 WEST}
{2708560800 0 0 WET}
{2721261600 3600 1 WEST}
{2740010400 0 0 WET}
{2752711200 3600 1 WEST}
{2771460000 0 0 WET}
{2784765600 3600 1 WEST}
{2802909600 0 0 WET}
{2816215200 3600 1 WEST}
{2834359200 0 0 WET}
{2847664800 3600 1 WEST}
{2866413600 0 0 WET}
{2879114400 3600 1 WEST}
{2897863200 0 0 WET}
{2910564000 3600 1 WEST}
{2929312800 0 0 WET}
{2942013600 3600 1 WEST}
{2960762400 0 0 WET}
{2974068000 3600 1 WEST}
{2992212000 0 0 WET}
{3005517600 3600 1 WEST}
{3023661600 0 0 WET}
{3036967200 3600 1 WEST}
{3055716000 0 0 WET}
{3068416800 3600 1 WEST}
{3087165600 0 0 WET}
{3099866400 3600 1 WEST}
{3118615200 0 0 WET}
{3131920800 3600 1 WEST}
{3150064800 0 0 WET}
{3163370400 3600 1 WEST}
{3181514400 0 0 WET}
{3194820000 3600 1 WEST}
{3212964000 0 0 WET}
{3226269600 3600 1 WEST}
{3245018400 0 0 WET}
{3257719200 3600 1 WEST}
{3276468000 0 0 WET}
{3289168800 3600 1 WEST}
{3307917600 0 0 WET}
{3321223200 3600 1 WEST}
{3339367200 0 0 WET}
{3352672800 3600 1 WEST}
{3370816800 0 0 WET}
{3384122400 3600 1 WEST}
{3402871200 0 0 WET}
{3415572000 3600 1 WEST}
{3434320800 0 0 WET}
{3447021600 3600 1 WEST}
{3465770400 0 0 WET}
{3479076000 3600 1 WEST}
{3497220000 0 0 WET}
{3510525600 3600 1 WEST}
{3528669600 0 0 WET}
{3541975200 3600 1 WEST}
{3560119200 0 0 WET}
{3573424800 3600 1 WEST}
{3592173600 0 0 WET}
{3604874400 3600 1 WEST}
{3623623200 0 0 WET}
{3636324000 3600 1 WEST}
{3655072800 0 0 WET}
{3668378400 3600 1 WEST}
{3686522400 0 0 WET}
{3699828000 3600 1 WEST}
{3717972000 0 0 WET}
{3731277600 3600 1 WEST}
{3750026400 0 0 WET}
{3762727200 3600 1 WEST}
{3781476000 0 0 WET}
{3794176800 3600 1 WEST}
{3812925600 0 0 WET}
{3825626400 3600 1 WEST}
{3844375200 0 0 WET}
{3857680800 3600 1 WEST}
{3875824800 0 0 WET}
{3889130400 3600 1 WEST}
{3907274400 0 0 WET}
{3920580000 3600 1 WEST}
{3939328800 0 0 WET}
{3952029600 3600 1 WEST}
{3970778400 0 0 WET}
{3983479200 3600 1 WEST}
{4002228000 0 0 WET}
{4015533600 3600 1 WEST}
{4033677600 0 0 WET}
{4046983200 3600 1 WEST}
{4065127200 0 0 WET}
{4078432800 3600 1 WEST}
{4096576800 0 0 WET}
}
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Conakry) {
{-9223372036854775808 -3292 0 LMT}
{-1830380708 0 0 GMT}
{-1131235200 -3600 0 WAT}
{-315615600 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Conakry) $TZData(:Africa/Abidjan)
+3 -5
View File
@@ -1,7 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Dakar) {
{-9223372036854775808 -4184 0 LMT}
{-1830379816 -3600 0 WAT}
{-902098800 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Dakar) $TZData(:Africa/Abidjan)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Dar_es_Salaam) {
{-9223372036854775808 9428 0 LMT}
{-1230777428 10800 0 EAT}
{-694321200 9900 0 BEAUT}
{-284006700 10800 0 EAT}
if {![info exists TZData(Africa/Nairobi)]} {
LoadTimeZoneFile Africa/Nairobi
}
set TZData(:Africa/Dar_es_Salaam) $TZData(:Africa/Nairobi)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Djibouti) {
{-9223372036854775808 10356 0 LMT}
{-1846291956 10800 0 EAT}
if {![info exists TZData(Africa/Nairobi)]} {
LoadTimeZoneFile Africa/Nairobi
}
set TZData(:Africa/Djibouti) $TZData(:Africa/Nairobi)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Douala) {
{-9223372036854775808 2328 0 LMT}
{-1830386328 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Douala) $TZData(:Africa/Lagos)
+215
View File
@@ -4,4 +4,219 @@ set TZData(:Africa/El_Aaiun) {
{-9223372036854775808 -3168 0 LMT}
{-1136070432 -3600 0 WAT}
{198291600 0 0 WET}
{199756800 3600 1 WEST}
{207702000 0 0 WET}
{231292800 3600 1 WEST}
{244249200 0 0 WET}
{265507200 3600 1 WEST}
{271033200 0 0 WET}
{1212278400 3600 1 WEST}
{1220223600 0 0 WET}
{1243814400 3600 1 WEST}
{1250809200 0 0 WET}
{1272758400 3600 1 WEST}
{1281222000 0 0 WET}
{1301788800 3600 1 WEST}
{1312066800 0 0 WET}
{1335664800 3600 1 WEST}
{1342749600 0 0 WET}
{1345428000 3600 1 WEST}
{1348970400 0 0 WET}
{1367114400 3600 1 WEST}
{1373162400 0 0 WET}
{1376100000 3600 1 WEST}
{1382839200 0 0 WET}
{1396144800 3600 1 WEST}
{1403920800 0 0 WET}
{1406944800 3600 1 WEST}
{1414288800 0 0 WET}
{1427594400 3600 1 WEST}
{1434160800 0 0 WET}
{1437184800 3600 1 WEST}
{1445738400 0 0 WET}
{1459044000 3600 1 WEST}
{1465005600 0 0 WET}
{1468029600 3600 1 WEST}
{1477792800 0 0 WET}
{1490493600 3600 1 WEST}
{1495245600 0 0 WET}
{1498874400 3600 1 WEST}
{1509242400 0 0 WET}
{1521943200 3600 1 WEST}
{1526090400 0 0 WET}
{1529114400 3600 1 WEST}
{1540692000 0 0 WET}
{1553997600 3600 1 WEST}
{1556935200 0 0 WET}
{1559959200 3600 1 WEST}
{1572141600 0 0 WET}
{1585447200 3600 1 WEST}
{1587175200 0 0 WET}
{1590804000 3600 1 WEST}
{1603591200 0 0 WET}
{1616896800 3600 1 WEST}
{1618020000 0 0 WET}
{1621044000 3600 1 WEST}
{1635645600 0 0 WET}
{1648346400 3600 1 WEST}
{1648864800 0 0 WET}
{1651888800 3600 1 WEST}
{1667095200 0 0 WET}
{1682128800 3600 1 WEST}
{1698544800 0 0 WET}
{1712973600 3600 1 WEST}
{1729994400 0 0 WET}
{1743818400 3600 1 WEST}
{1761444000 0 0 WET}
{1774749600 3600 1 WEST}
{1792893600 0 0 WET}
{1806199200 3600 1 WEST}
{1824948000 0 0 WET}
{1837648800 3600 1 WEST}
{1856397600 0 0 WET}
{1869098400 3600 1 WEST}
{1887847200 0 0 WET}
{1901152800 3600 1 WEST}
{1919296800 0 0 WET}
{1932602400 3600 1 WEST}
{1950746400 0 0 WET}
{1964052000 3600 1 WEST}
{1982800800 0 0 WET}
{1995501600 3600 1 WEST}
{2014250400 0 0 WET}
{2026951200 3600 1 WEST}
{2045700000 0 0 WET}
{2058400800 3600 1 WEST}
{2077063200 0 0 WET}
{2077153200 0 0 WET}
{2090455200 3600 1 WEST}
{2107908000 0 0 WET}
{2108602800 0 0 WET}
{2121904800 3600 1 WEST}
{2138752800 0 0 WET}
{2140052400 0 0 WET}
{2153354400 3600 1 WEST}
{2172103200 0 0 WET}
{2184804000 3600 1 WEST}
{2203552800 0 0 WET}
{2216253600 3600 1 WEST}
{2235002400 0 0 WET}
{2248308000 3600 1 WEST}
{2266452000 0 0 WET}
{2279757600 3600 1 WEST}
{2297901600 0 0 WET}
{2311207200 3600 1 WEST}
{2329351200 0 0 WET}
{2342656800 3600 1 WEST}
{2361405600 0 0 WET}
{2374106400 3600 1 WEST}
{2392855200 0 0 WET}
{2405556000 3600 1 WEST}
{2424304800 0 0 WET}
{2437610400 3600 1 WEST}
{2455754400 0 0 WET}
{2469060000 3600 1 WEST}
{2487204000 0 0 WET}
{2500509600 3600 1 WEST}
{2519258400 0 0 WET}
{2531959200 3600 1 WEST}
{2550708000 0 0 WET}
{2563408800 3600 1 WEST}
{2582157600 0 0 WET}
{2595463200 3600 1 WEST}
{2613607200 0 0 WET}
{2626912800 3600 1 WEST}
{2645056800 0 0 WET}
{2658362400 3600 1 WEST}
{2676506400 0 0 WET}
{2689812000 3600 1 WEST}
{2708560800 0 0 WET}
{2721261600 3600 1 WEST}
{2740010400 0 0 WET}
{2752711200 3600 1 WEST}
{2771460000 0 0 WET}
{2784765600 3600 1 WEST}
{2802909600 0 0 WET}
{2816215200 3600 1 WEST}
{2834359200 0 0 WET}
{2847664800 3600 1 WEST}
{2866413600 0 0 WET}
{2879114400 3600 1 WEST}
{2897863200 0 0 WET}
{2910564000 3600 1 WEST}
{2929312800 0 0 WET}
{2942013600 3600 1 WEST}
{2960762400 0 0 WET}
{2974068000 3600 1 WEST}
{2992212000 0 0 WET}
{3005517600 3600 1 WEST}
{3023661600 0 0 WET}
{3036967200 3600 1 WEST}
{3055716000 0 0 WET}
{3068416800 3600 1 WEST}
{3087165600 0 0 WET}
{3099866400 3600 1 WEST}
{3118615200 0 0 WET}
{3131920800 3600 1 WEST}
{3150064800 0 0 WET}
{3163370400 3600 1 WEST}
{3181514400 0 0 WET}
{3194820000 3600 1 WEST}
{3212964000 0 0 WET}
{3226269600 3600 1 WEST}
{3245018400 0 0 WET}
{3257719200 3600 1 WEST}
{3276468000 0 0 WET}
{3289168800 3600 1 WEST}
{3307917600 0 0 WET}
{3321223200 3600 1 WEST}
{3339367200 0 0 WET}
{3352672800 3600 1 WEST}
{3370816800 0 0 WET}
{3384122400 3600 1 WEST}
{3402871200 0 0 WET}
{3415572000 3600 1 WEST}
{3434320800 0 0 WET}
{3447021600 3600 1 WEST}
{3465770400 0 0 WET}
{3479076000 3600 1 WEST}
{3497220000 0 0 WET}
{3510525600 3600 1 WEST}
{3528669600 0 0 WET}
{3541975200 3600 1 WEST}
{3560119200 0 0 WET}
{3573424800 3600 1 WEST}
{3592173600 0 0 WET}
{3604874400 3600 1 WEST}
{3623623200 0 0 WET}
{3636324000 3600 1 WEST}
{3655072800 0 0 WET}
{3668378400 3600 1 WEST}
{3686522400 0 0 WET}
{3699828000 3600 1 WEST}
{3717972000 0 0 WET}
{3731277600 3600 1 WEST}
{3750026400 0 0 WET}
{3762727200 3600 1 WEST}
{3781476000 0 0 WET}
{3794176800 3600 1 WEST}
{3812925600 0 0 WET}
{3825626400 3600 1 WEST}
{3844375200 0 0 WET}
{3857680800 3600 1 WEST}
{3875824800 0 0 WET}
{3889130400 3600 1 WEST}
{3907274400 0 0 WET}
{3920580000 3600 1 WEST}
{3939328800 0 0 WET}
{3952029600 3600 1 WEST}
{3970778400 0 0 WET}
{3983479200 3600 1 WEST}
{4002228000 0 0 WET}
{4015533600 3600 1 WEST}
{4033677600 0 0 WET}
{4046983200 3600 1 WEST}
{4065127200 0 0 WET}
{4078432800 3600 1 WEST}
{4096576800 0 0 WET}
}
+3 -34
View File
@@ -1,36 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Freetown) {
{-9223372036854775808 -3180 0 LMT}
{-2776979220 -3180 0 FMT}
{-1785712020 -3600 0 WAT}
{-1091487600 -1200 1 SLST}
{-1080949200 -3600 0 WAT}
{-1059865200 -1200 1 SLST}
{-1049326800 -3600 0 WAT}
{-1028329200 -1200 1 SLST}
{-1017790800 -3600 0 WAT}
{-996793200 -1200 1 SLST}
{-986254800 -3600 0 WAT}
{-965257200 -1200 1 SLST}
{-954718800 -3600 0 WAT}
{-933634800 -1200 1 SLST}
{-923096400 -3600 0 WAT}
{-902098800 -1200 1 SLST}
{-891560400 -3600 0 WAT}
{-870562800 -1200 1 SLST}
{-860024400 -3600 0 WAT}
{-410223600 0 0 WAT}
{-397180800 3600 1 SLST}
{-389235600 0 0 GMT}
{-365644800 3600 1 SLST}
{-357699600 0 0 GMT}
{-334108800 3600 1 SLST}
{-326163600 0 0 GMT}
{-302486400 3600 1 SLST}
{-294541200 0 0 GMT}
{-270950400 3600 1 SLST}
{-263005200 0 0 GMT}
{-239414400 3600 1 SLST}
{-231469200 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Freetown) $TZData(:Africa/Abidjan)
+3 -7
View File
@@ -1,9 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Gaborone) {
{-9223372036854775808 6220 0 LMT}
{-2682294220 5400 0 SAST}
{-2109288600 7200 0 CAT}
{-829526400 10800 1 CAST}
{-813805200 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Gaborone) $TZData(:Africa/Maputo)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Harare) {
{-9223372036854775808 7452 0 LMT}
{-2109290652 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Harare) $TZData(:Africa/Maputo)
+3 -7
View File
@@ -1,9 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Kampala) {
{-9223372036854775808 7780 0 LMT}
{-1309745380 10800 0 EAT}
{-1262314800 9000 0 BEAT}
{-694319400 9900 0 BEAUT}
{-410237100 10800 0 EAT}
if {![info exists TZData(Africa/Nairobi)]} {
LoadTimeZoneFile Africa/Nairobi
}
set TZData(:Africa/Kampala) $TZData(:Africa/Nairobi)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Kigali) {
{-9223372036854775808 7216 0 LMT}
{-1091498416 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Kigali) $TZData(:Africa/Maputo)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Kinshasa) {
{-9223372036854775808 3672 0 LMT}
{-2276643672 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Kinshasa) $TZData(:Africa/Lagos)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Libreville) {
{-9223372036854775808 2268 0 LMT}
{-1830386268 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Libreville) $TZData(:Africa/Lagos)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Lome) {
{-9223372036854775808 292 0 LMT}
{-2429827492 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Lome) $TZData(:Africa/Abidjan)
+3 -5
View File
@@ -1,7 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Luanda) {
{-9223372036854775808 3176 0 LMT}
{-2461452776 3124 0 AOT}
{-1849395124 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Luanda) $TZData(:Africa/Lagos)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Lubumbashi) {
{-9223372036854775808 6592 0 LMT}
{-2276646592 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Lubumbashi) $TZData(:Africa/Maputo)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Lusaka) {
{-9223372036854775808 6788 0 LMT}
{-2109289988 7200 0 CAT}
if {![info exists TZData(Africa/Maputo)]} {
LoadTimeZoneFile Africa/Maputo
}
set TZData(:Africa/Lusaka) $TZData(:Africa/Maputo)
+3 -5
View File
@@ -1,7 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Malabo) {
{-9223372036854775808 2108 0 LMT}
{-1830386108 0 0 GMT}
{-190857600 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Malabo) $TZData(:Africa/Lagos)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Maseru) {
{-9223372036854775808 6600 0 LMT}
{-2109289800 7200 0 SAST}
{-829526400 10800 1 SAST}
{-813805200 7200 0 SAST}
if {![info exists TZData(Africa/Johannesburg)]} {
LoadTimeZoneFile Africa/Johannesburg
}
set TZData(:Africa/Maseru) $TZData(:Africa/Johannesburg)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Mbabane) {
{-9223372036854775808 7464 0 LMT}
{-2109290664 7200 0 SAST}
if {![info exists TZData(Africa/Johannesburg)]} {
LoadTimeZoneFile Africa/Johannesburg
}
set TZData(:Africa/Mbabane) $TZData(:Africa/Johannesburg)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Mogadishu) {
{-9223372036854775808 10888 0 LMT}
{-2403572488 10800 0 EAT}
{-1230778800 9000 0 BEAT}
{-410236200 10800 0 EAT}
if {![info exists TZData(Africa/Nairobi)]} {
LoadTimeZoneFile Africa/Nairobi
}
set TZData(:Africa/Mogadishu) $TZData(:Africa/Nairobi)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Niamey) {
{-9223372036854775808 508 0 LMT}
{-1830384508 -3600 0 WAT}
{-1131231600 0 0 GMT}
{-315619200 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Niamey) $TZData(:Africa/Lagos)
+3 -6
View File
@@ -1,8 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Nouakchott) {
{-9223372036854775808 -3828 0 LMT}
{-1830380172 0 0 GMT}
{-1131235200 -3600 0 WAT}
{-286930800 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Nouakchott) $TZData(:Africa/Abidjan)
+3 -4
View File
@@ -1,6 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Ouagadougou) {
{-9223372036854775808 -364 0 LMT}
{-1830383636 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Ouagadougou) $TZData(:Africa/Abidjan)
+3 -5
View File
@@ -1,7 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Porto-Novo) {
{-9223372036854775808 628 0 LMT}
{-1830384628 0 0 GMT}
{-1131235200 3600 0 WAT}
if {![info exists TZData(Africa/Lagos)]} {
LoadTimeZoneFile Africa/Lagos
}
set TZData(:Africa/Porto-Novo) $TZData(:Africa/Lagos)
+3 -5
View File
@@ -1,7 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Sao_Tome) {
{-9223372036854775808 1616 0 LMT}
{-2713912016 -2192 0 LMT}
{-1830381808 0 0 GMT}
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Sao_Tome) $TZData(:Africa/Abidjan)
+3 -3
View File
@@ -1,5 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
if {![info exists TZData(Africa/Bamako)]} {
LoadTimeZoneFile Africa/Bamako
if {![info exists TZData(Africa/Abidjan)]} {
LoadTimeZoneFile Africa/Abidjan
}
set TZData(:Africa/Timbuktu) $TZData(:Africa/Bamako)
set TZData(:Africa/Timbuktu) $TZData(:Africa/Abidjan)
+1 -173
View File
@@ -30,177 +30,5 @@ set TZData(:Africa/Tripoli) {
{875919600 7200 0 EET}
{1352505600 3600 0 CET}
{1364515200 7200 1 CEST}
{1382659200 3600 0 CET}
{1395964800 7200 1 CEST}
{1414713600 3600 0 CET}
{1427414400 7200 1 CEST}
{1446163200 3600 0 CET}
{1458864000 7200 1 CEST}
{1477612800 3600 0 CET}
{1490918400 7200 1 CEST}
{1509062400 3600 0 CET}
{1522368000 7200 1 CEST}
{1540512000 3600 0 CET}
{1553817600 7200 1 CEST}
{1571961600 3600 0 CET}
{1585267200 7200 1 CEST}
{1604016000 3600 0 CET}
{1616716800 7200 1 CEST}
{1635465600 3600 0 CET}
{1648166400 7200 1 CEST}
{1666915200 3600 0 CET}
{1680220800 7200 1 CEST}
{1698364800 3600 0 CET}
{1711670400 7200 1 CEST}
{1729814400 3600 0 CET}
{1743120000 7200 1 CEST}
{1761868800 3600 0 CET}
{1774569600 7200 1 CEST}
{1793318400 3600 0 CET}
{1806019200 7200 1 CEST}
{1824768000 3600 0 CET}
{1838073600 7200 1 CEST}
{1856217600 3600 0 CET}
{1869523200 7200 1 CEST}
{1887667200 3600 0 CET}
{1900972800 7200 1 CEST}
{1919116800 3600 0 CET}
{1932422400 7200 1 CEST}
{1951171200 3600 0 CET}
{1963872000 7200 1 CEST}
{1982620800 3600 0 CET}
{1995321600 7200 1 CEST}
{2014070400 3600 0 CET}
{2027376000 7200 1 CEST}
{2045520000 3600 0 CET}
{2058825600 7200 1 CEST}
{2076969600 3600 0 CET}
{2090275200 7200 1 CEST}
{2109024000 3600 0 CET}
{2121724800 7200 1 CEST}
{2140473600 3600 0 CET}
{2153174400 7200 1 CEST}
{2171923200 3600 0 CET}
{2184624000 7200 1 CEST}
{2203372800 3600 0 CET}
{2216678400 7200 1 CEST}
{2234822400 3600 0 CET}
{2248128000 7200 1 CEST}
{2266272000 3600 0 CET}
{2279577600 7200 1 CEST}
{2298326400 3600 0 CET}
{2311027200 7200 1 CEST}
{2329776000 3600 0 CET}
{2342476800 7200 1 CEST}
{2361225600 3600 0 CET}
{2374531200 7200 1 CEST}
{2392675200 3600 0 CET}
{2405980800 7200 1 CEST}
{2424124800 3600 0 CET}
{2437430400 7200 1 CEST}
{2455574400 3600 0 CET}
{2468880000 7200 1 CEST}
{2487628800 3600 0 CET}
{2500329600 7200 1 CEST}
{2519078400 3600 0 CET}
{2531779200 7200 1 CEST}
{2550528000 3600 0 CET}
{2563833600 7200 1 CEST}
{2581977600 3600 0 CET}
{2595283200 7200 1 CEST}
{2613427200 3600 0 CET}
{2626732800 7200 1 CEST}
{2645481600 3600 0 CET}
{2658182400 7200 1 CEST}
{2676931200 3600 0 CET}
{2689632000 7200 1 CEST}
{2708380800 3600 0 CET}
{2721686400 7200 1 CEST}
{2739830400 3600 0 CET}
{2753136000 7200 1 CEST}
{2771280000 3600 0 CET}
{2784585600 7200 1 CEST}
{2802729600 3600 0 CET}
{2816035200 7200 1 CEST}
{2834784000 3600 0 CET}
{2847484800 7200 1 CEST}
{2866233600 3600 0 CET}
{2878934400 7200 1 CEST}
{2897683200 3600 0 CET}
{2910988800 7200 1 CEST}
{2929132800 3600 0 CET}
{2942438400 7200 1 CEST}
{2960582400 3600 0 CET}
{2973888000 7200 1 CEST}
{2992636800 3600 0 CET}
{3005337600 7200 1 CEST}
{3024086400 3600 0 CET}
{3036787200 7200 1 CEST}
{3055536000 3600 0 CET}
{3068236800 7200 1 CEST}
{3086985600 3600 0 CET}
{3100291200 7200 1 CEST}
{3118435200 3600 0 CET}
{3131740800 7200 1 CEST}
{3149884800 3600 0 CET}
{3163190400 7200 1 CEST}
{3181939200 3600 0 CET}
{3194640000 7200 1 CEST}
{3213388800 3600 0 CET}
{3226089600 7200 1 CEST}
{3244838400 3600 0 CET}
{3258144000 7200 1 CEST}
{3276288000 3600 0 CET}
{3289593600 7200 1 CEST}
{3307737600 3600 0 CET}
{3321043200 7200 1 CEST}
{3339187200 3600 0 CET}
{3352492800 7200 1 CEST}
{3371241600 3600 0 CET}
{3383942400 7200 1 CEST}
{3402691200 3600 0 CET}
{3415392000 7200 1 CEST}
{3434140800 3600 0 CET}
{3447446400 7200 1 CEST}
{3465590400 3600 0 CET}
{3478896000 7200 1 CEST}
{3497040000 3600 0 CET}
{3510345600 7200 1 CEST}
{3529094400 3600 0 CET}
{3541795200 7200 1 CEST}
{3560544000 3600 0 CET}
{3573244800 7200 1 CEST}
{3591993600 3600 0 CET}
{3605299200 7200 1 CEST}
{3623443200 3600 0 CET}
{3636748800 7200 1 CEST}
{3654892800 3600 0 CET}
{3668198400 7200 1 CEST}
{3686342400 3600 0 CET}
{3699648000 7200 1 CEST}
{3718396800 3600 0 CET}
{3731097600 7200 1 CEST}
{3749846400 3600 0 CET}
{3762547200 7200 1 CEST}
{3781296000 3600 0 CET}
{3794601600 7200 1 CEST}
{3812745600 3600 0 CET}
{3826051200 7200 1 CEST}
{3844195200 3600 0 CET}
{3857500800 7200 1 CEST}
{3876249600 3600 0 CET}
{3888950400 7200 1 CEST}
{3907699200 3600 0 CET}
{3920400000 7200 1 CEST}
{3939148800 3600 0 CET}
{3951849600 7200 1 CEST}
{3970598400 3600 0 CET}
{3983904000 7200 1 CEST}
{4002048000 3600 0 CET}
{4015353600 7200 1 CEST}
{4033497600 3600 0 CET}
{4046803200 7200 1 CEST}
{4065552000 3600 0 CET}
{4078252800 7200 1 CEST}
{4097001600 3600 0 CET}
{1382662800 7200 0 EET}
}
+1
View File
@@ -37,4 +37,5 @@ set TZData(:America/Eirunepe) {
{761716800 -18000 0 ACT}
{780206400 -18000 0 ACT}
{1214283600 -14400 0 AMT}
{1384056000 -18000 0 ACT}
}
+2 -169
View File
@@ -4,6 +4,7 @@ set TZData(:America/Grand_Turk) {
{-9223372036854775808 -17072 0 LMT}
{-2524504528 -18431 0 KMT}
{-1827687169 -18000 0 EST}
{284014800 -18000 0 EST}
{294217200 -14400 1 EDT}
{309938400 -18000 0 EST}
{325666800 -14400 1 EDT}
@@ -77,173 +78,5 @@ set TZData(:America/Grand_Turk) {
{1394348400 -14400 1 EDT}
{1414908000 -18000 0 EST}
{1425798000 -14400 1 EDT}
{1446357600 -18000 0 EST}
{1457852400 -14400 1 EDT}
{1478412000 -18000 0 EST}
{1489302000 -14400 1 EDT}
{1509861600 -18000 0 EST}
{1520751600 -14400 1 EDT}
{1541311200 -18000 0 EST}
{1552201200 -14400 1 EDT}
{1572760800 -18000 0 EST}
{1583650800 -14400 1 EDT}
{1604210400 -18000 0 EST}
{1615705200 -14400 1 EDT}
{1636264800 -18000 0 EST}
{1647154800 -14400 1 EDT}
{1667714400 -18000 0 EST}
{1678604400 -14400 1 EDT}
{1699164000 -18000 0 EST}
{1710054000 -14400 1 EDT}
{1730613600 -18000 0 EST}
{1741503600 -14400 1 EDT}
{1762063200 -18000 0 EST}
{1772953200 -14400 1 EDT}
{1793512800 -18000 0 EST}
{1805007600 -14400 1 EDT}
{1825567200 -18000 0 EST}
{1836457200 -14400 1 EDT}
{1857016800 -18000 0 EST}
{1867906800 -14400 1 EDT}
{1888466400 -18000 0 EST}
{1899356400 -14400 1 EDT}
{1919916000 -18000 0 EST}
{1930806000 -14400 1 EDT}
{1951365600 -18000 0 EST}
{1962860400 -14400 1 EDT}
{1983420000 -18000 0 EST}
{1994310000 -14400 1 EDT}
{2014869600 -18000 0 EST}
{2025759600 -14400 1 EDT}
{2046319200 -18000 0 EST}
{2057209200 -14400 1 EDT}
{2077768800 -18000 0 EST}
{2088658800 -14400 1 EDT}
{2109218400 -18000 0 EST}
{2120108400 -14400 1 EDT}
{2140668000 -18000 0 EST}
{2152162800 -14400 1 EDT}
{2172722400 -18000 0 EST}
{2183612400 -14400 1 EDT}
{2204172000 -18000 0 EST}
{2215062000 -14400 1 EDT}
{2235621600 -18000 0 EST}
{2246511600 -14400 1 EDT}
{2267071200 -18000 0 EST}
{2277961200 -14400 1 EDT}
{2298520800 -18000 0 EST}
{2309410800 -14400 1 EDT}
{2329970400 -18000 0 EST}
{2341465200 -14400 1 EDT}
{2362024800 -18000 0 EST}
{2372914800 -14400 1 EDT}
{2393474400 -18000 0 EST}
{2404364400 -14400 1 EDT}
{2424924000 -18000 0 EST}
{2435814000 -14400 1 EDT}
{2456373600 -18000 0 EST}
{2467263600 -14400 1 EDT}
{2487823200 -18000 0 EST}
{2499318000 -14400 1 EDT}
{2519877600 -18000 0 EST}
{2530767600 -14400 1 EDT}
{2551327200 -18000 0 EST}
{2562217200 -14400 1 EDT}
{2582776800 -18000 0 EST}
{2593666800 -14400 1 EDT}
{2614226400 -18000 0 EST}
{2625116400 -14400 1 EDT}
{2645676000 -18000 0 EST}
{2656566000 -14400 1 EDT}
{2677125600 -18000 0 EST}
{2688620400 -14400 1 EDT}
{2709180000 -18000 0 EST}
{2720070000 -14400 1 EDT}
{2740629600 -18000 0 EST}
{2751519600 -14400 1 EDT}
{2772079200 -18000 0 EST}
{2782969200 -14400 1 EDT}
{2803528800 -18000 0 EST}
{2814418800 -14400 1 EDT}
{2834978400 -18000 0 EST}
{2846473200 -14400 1 EDT}
{2867032800 -18000 0 EST}
{2877922800 -14400 1 EDT}
{2898482400 -18000 0 EST}
{2909372400 -14400 1 EDT}
{2929932000 -18000 0 EST}
{2940822000 -14400 1 EDT}
{2961381600 -18000 0 EST}
{2972271600 -14400 1 EDT}
{2992831200 -18000 0 EST}
{3003721200 -14400 1 EDT}
{3024280800 -18000 0 EST}
{3035775600 -14400 1 EDT}
{3056335200 -18000 0 EST}
{3067225200 -14400 1 EDT}
{3087784800 -18000 0 EST}
{3098674800 -14400 1 EDT}
{3119234400 -18000 0 EST}
{3130124400 -14400 1 EDT}
{3150684000 -18000 0 EST}
{3161574000 -14400 1 EDT}
{3182133600 -18000 0 EST}
{3193023600 -14400 1 EDT}
{3213583200 -18000 0 EST}
{3225078000 -14400 1 EDT}
{3245637600 -18000 0 EST}
{3256527600 -14400 1 EDT}
{3277087200 -18000 0 EST}
{3287977200 -14400 1 EDT}
{3308536800 -18000 0 EST}
{3319426800 -14400 1 EDT}
{3339986400 -18000 0 EST}
{3350876400 -14400 1 EDT}
{3371436000 -18000 0 EST}
{3382930800 -14400 1 EDT}
{3403490400 -18000 0 EST}
{3414380400 -14400 1 EDT}
{3434940000 -18000 0 EST}
{3445830000 -14400 1 EDT}
{3466389600 -18000 0 EST}
{3477279600 -14400 1 EDT}
{3497839200 -18000 0 EST}
{3508729200 -14400 1 EDT}
{3529288800 -18000 0 EST}
{3540178800 -14400 1 EDT}
{3560738400 -18000 0 EST}
{3572233200 -14400 1 EDT}
{3592792800 -18000 0 EST}
{3603682800 -14400 1 EDT}
{3624242400 -18000 0 EST}
{3635132400 -14400 1 EDT}
{3655692000 -18000 0 EST}
{3666582000 -14400 1 EDT}
{3687141600 -18000 0 EST}
{3698031600 -14400 1 EDT}
{3718591200 -18000 0 EST}
{3730086000 -14400 1 EDT}
{3750645600 -18000 0 EST}
{3761535600 -14400 1 EDT}
{3782095200 -18000 0 EST}
{3792985200 -14400 1 EDT}
{3813544800 -18000 0 EST}
{3824434800 -14400 1 EDT}
{3844994400 -18000 0 EST}
{3855884400 -14400 1 EDT}
{3876444000 -18000 0 EST}
{3887334000 -14400 1 EDT}
{3907893600 -18000 0 EST}
{3919388400 -14400 1 EDT}
{3939948000 -18000 0 EST}
{3950838000 -14400 1 EDT}
{3971397600 -18000 0 EST}
{3982287600 -14400 1 EDT}
{4002847200 -18000 0 EST}
{4013737200 -14400 1 EDT}
{4034296800 -18000 0 EST}
{4045186800 -14400 1 EDT}
{4065746400 -18000 0 EST}
{4076636400 -14400 1 EDT}
{4097196000 -18000 0 EST}
{1446361200 -14400 0 AST}
}
+1 -1
View File
@@ -94,7 +94,7 @@ set TZData(:America/Havana) {
{1035694800 -18000 0 CST}
{1049605200 -14400 1 CDT}
{1067144400 -18000 0 CST}
{1081054800 -14400 1 CDT}
{1080450000 -14400 1 CDT}
{1162098000 -18000 0 CST}
{1173589200 -14400 1 CDT}
{1193547600 -18000 0 CST}
+2 -1
View File
@@ -4,7 +4,8 @@ set TZData(:America/Jamaica) {
{-9223372036854775808 -18431 0 LMT}
{-2524503169 -18431 0 KMT}
{-1827687169 -18000 0 EST}
{136364400 -14400 0 EDT}
{126248400 -18000 0 EST}
{126687600 -14400 1 EDT}
{152085600 -18000 0 EST}
{162370800 -14400 1 EDT}
{183535200 -18000 0 EST}
+1 -1
View File
@@ -39,5 +39,5 @@ set TZData(:America/Metlakatla) {
{388576800 -25200 1 PDT}
{404902800 -28800 0 PST}
{420026400 -25200 1 PDT}
{436356000 -28800 0 MeST}
{436356000 -28800 0 PST}
}
+1
View File
@@ -33,4 +33,5 @@ set TZData(:America/Rio_Branco) {
{571204800 -18000 0 ACT}
{590040000 -18000 0 ACT}
{1214283600 -14400 0 AMT}
{1384056000 -18000 0 ACT}
}
+3 -3
View File
@@ -2,9 +2,9 @@
set TZData(:Antarctica/Casey) {
{-9223372036854775808 0 0 zzz}
{-31536000 28800 0 WST}
{-31536000 28800 0 AWST}
{1255802400 39600 0 CAST}
{1267714800 28800 0 WST}
{1267714800 28800 0 AWST}
{1319738400 39600 0 CAST}
{1329843600 28800 0 WST}
{1329843600 28800 0 AWST}
}
+90 -90
View File
@@ -2,96 +2,96 @@
set TZData(:Antarctica/Macquarie) {
{-9223372036854775808 0 0 zzz}
{-2214259200 36000 0 EST}
{-1680508800 39600 1 EST}
{-1669892400 39600 0 EST}
{-1665392400 36000 0 EST}
{-2214259200 36000 0 AEST}
{-1680508800 39600 1 AEDT}
{-1669892400 39600 0 AEDT}
{-1665392400 36000 0 AEST}
{-1601719200 0 0 zzz}
{-94730400 36000 0 EST}
{-71136000 39600 1 EST}
{-55411200 36000 0 EST}
{-37267200 39600 1 EST}
{-25776000 36000 0 EST}
{-5817600 39600 1 EST}
{5673600 36000 0 EST}
{25632000 39600 1 EST}
{37728000 36000 0 EST}
{57686400 39600 1 EST}
{67968000 36000 0 EST}
{89136000 39600 1 EST}
{100022400 36000 0 EST}
{120585600 39600 1 EST}
{131472000 36000 0 EST}
{152035200 39600 1 EST}
{162921600 36000 0 EST}
{183484800 39600 1 EST}
{194976000 36000 0 EST}
{215539200 39600 1 EST}
{226425600 36000 0 EST}
{246988800 39600 1 EST}
{257875200 36000 0 EST}
{278438400 39600 1 EST}
{289324800 36000 0 EST}
{309888000 39600 1 EST}
{320774400 36000 0 EST}
{341337600 39600 1 EST}
{352224000 36000 0 EST}
{372787200 39600 1 EST}
{386092800 36000 0 EST}
{404841600 39600 1 EST}
{417542400 36000 0 EST}
{436291200 39600 1 EST}
{447177600 36000 0 EST}
{467740800 39600 1 EST}
{478627200 36000 0 EST}
{499190400 39600 1 EST}
{510076800 36000 0 EST}
{530035200 39600 1 EST}
{542736000 36000 0 EST}
{562089600 39600 1 EST}
{574790400 36000 0 EST}
{594144000 39600 1 EST}
{606240000 36000 0 EST}
{625593600 39600 1 EST}
{637689600 36000 0 EST}
{657043200 39600 1 EST}
{670348800 36000 0 EST}
{686678400 39600 1 EST}
{701798400 36000 0 EST}
{718128000 39600 1 EST}
{733248000 36000 0 EST}
{749577600 39600 1 EST}
{764697600 36000 0 EST}
{781027200 39600 1 EST}
{796147200 36000 0 EST}
{812476800 39600 1 EST}
{828201600 36000 0 EST}
{844531200 39600 1 EST}
{859651200 36000 0 EST}
{875980800 39600 1 EST}
{891100800 36000 0 EST}
{907430400 39600 1 EST}
{922550400 36000 0 EST}
{938880000 39600 1 EST}
{954000000 36000 0 EST}
{967305600 39600 1 EST}
{985449600 36000 0 EST}
{1002384000 39600 1 EST}
{1017504000 36000 0 EST}
{1033833600 39600 1 EST}
{1048953600 36000 0 EST}
{1065283200 39600 1 EST}
{1080403200 36000 0 EST}
{1096732800 39600 1 EST}
{1111852800 36000 0 EST}
{1128182400 39600 1 EST}
{1143907200 36000 0 EST}
{1159632000 39600 1 EST}
{1174752000 36000 0 EST}
{1191686400 39600 1 EST}
{1207411200 36000 0 EST}
{1223136000 39600 1 EST}
{1238860800 36000 0 EST}
{1254585600 39600 1 EST}
{-94730400 36000 0 AEST}
{-71136000 39600 1 AEDT}
{-55411200 36000 0 AEST}
{-37267200 39600 1 AEDT}
{-25776000 36000 0 AEST}
{-5817600 39600 1 AEDT}
{5673600 36000 0 AEST}
{25632000 39600 1 AEDT}
{37728000 36000 0 AEST}
{57686400 39600 1 AEDT}
{67968000 36000 0 AEST}
{89136000 39600 1 AEDT}
{100022400 36000 0 AEST}
{120585600 39600 1 AEDT}
{131472000 36000 0 AEST}
{152035200 39600 1 AEDT}
{162921600 36000 0 AEST}
{183484800 39600 1 AEDT}
{194976000 36000 0 AEST}
{215539200 39600 1 AEDT}
{226425600 36000 0 AEST}
{246988800 39600 1 AEDT}
{257875200 36000 0 AEST}
{278438400 39600 1 AEDT}
{289324800 36000 0 AEST}
{309888000 39600 1 AEDT}
{320774400 36000 0 AEST}
{341337600 39600 1 AEDT}
{352224000 36000 0 AEST}
{372787200 39600 1 AEDT}
{386092800 36000 0 AEST}
{404841600 39600 1 AEDT}
{417542400 36000 0 AEST}
{436291200 39600 1 AEDT}
{447177600 36000 0 AEST}
{467740800 39600 1 AEDT}
{478627200 36000 0 AEST}
{499190400 39600 1 AEDT}
{510076800 36000 0 AEST}
{530035200 39600 1 AEDT}
{542736000 36000 0 AEST}
{562089600 39600 1 AEDT}
{574790400 36000 0 AEST}
{594144000 39600 1 AEDT}
{606240000 36000 0 AEST}
{625593600 39600 1 AEDT}
{637689600 36000 0 AEST}
{657043200 39600 1 AEDT}
{670348800 36000 0 AEST}
{686678400 39600 1 AEDT}
{701798400 36000 0 AEST}
{718128000 39600 1 AEDT}
{733248000 36000 0 AEST}
{749577600 39600 1 AEDT}
{764697600 36000 0 AEST}
{781027200 39600 1 AEDT}
{796147200 36000 0 AEST}
{812476800 39600 1 AEDT}
{828201600 36000 0 AEST}
{844531200 39600 1 AEDT}
{859651200 36000 0 AEST}
{875980800 39600 1 AEDT}
{891100800 36000 0 AEST}
{907430400 39600 1 AEDT}
{922550400 36000 0 AEST}
{938880000 39600 1 AEDT}
{954000000 36000 0 AEST}
{967305600 39600 1 AEDT}
{985449600 36000 0 AEST}
{1002384000 39600 1 AEDT}
{1017504000 36000 0 AEST}
{1033833600 39600 1 AEDT}
{1048953600 36000 0 AEST}
{1065283200 39600 1 AEDT}
{1080403200 36000 0 AEST}
{1096732800 39600 1 AEDT}
{1111852800 36000 0 AEST}
{1128182400 39600 1 AEDT}
{1143907200 36000 0 AEST}
{1159632000 39600 1 AEDT}
{1174752000 36000 0 AEST}
{1191686400 39600 1 AEDT}
{1207411200 36000 0 AEST}
{1223136000 39600 1 AEDT}
{1238860800 36000 0 AEST}
{1254585600 39600 1 AEDT}
{1270310400 39600 0 MIST}
}
+196
View File
@@ -0,0 +1,196 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Antarctica/Troll) {
{-9223372036854775808 0 0 zzz}
{1108166400 0 0 UTC}
{1111885200 7200 1 CEST}
{1130634000 0 0 UTC}
{1143334800 7200 1 CEST}
{1162083600 0 0 UTC}
{1174784400 7200 1 CEST}
{1193533200 0 0 UTC}
{1206838800 7200 1 CEST}
{1224982800 0 0 UTC}
{1238288400 7200 1 CEST}
{1256432400 0 0 UTC}
{1269738000 7200 1 CEST}
{1288486800 0 0 UTC}
{1301187600 7200 1 CEST}
{1319936400 0 0 UTC}
{1332637200 7200 1 CEST}
{1351386000 0 0 UTC}
{1364691600 7200 1 CEST}
{1382835600 0 0 UTC}
{1396141200 7200 1 CEST}
{1414285200 0 0 UTC}
{1427590800 7200 1 CEST}
{1445734800 0 0 UTC}
{1459040400 7200 1 CEST}
{1477789200 0 0 UTC}
{1490490000 7200 1 CEST}
{1509238800 0 0 UTC}
{1521939600 7200 1 CEST}
{1540688400 0 0 UTC}
{1553994000 7200 1 CEST}
{1572138000 0 0 UTC}
{1585443600 7200 1 CEST}
{1603587600 0 0 UTC}
{1616893200 7200 1 CEST}
{1635642000 0 0 UTC}
{1648342800 7200 1 CEST}
{1667091600 0 0 UTC}
{1679792400 7200 1 CEST}
{1698541200 0 0 UTC}
{1711846800 7200 1 CEST}
{1729990800 0 0 UTC}
{1743296400 7200 1 CEST}
{1761440400 0 0 UTC}
{1774746000 7200 1 CEST}
{1792890000 0 0 UTC}
{1806195600 7200 1 CEST}
{1824944400 0 0 UTC}
{1837645200 7200 1 CEST}
{1856394000 0 0 UTC}
{1869094800 7200 1 CEST}
{1887843600 0 0 UTC}
{1901149200 7200 1 CEST}
{1919293200 0 0 UTC}
{1932598800 7200 1 CEST}
{1950742800 0 0 UTC}
{1964048400 7200 1 CEST}
{1982797200 0 0 UTC}
{1995498000 7200 1 CEST}
{2014246800 0 0 UTC}
{2026947600 7200 1 CEST}
{2045696400 0 0 UTC}
{2058397200 7200 1 CEST}
{2077146000 0 0 UTC}
{2090451600 7200 1 CEST}
{2108595600 0 0 UTC}
{2121901200 7200 1 CEST}
{2140045200 0 0 UTC}
{2153350800 7200 1 CEST}
{2172099600 0 0 UTC}
{2184800400 7200 1 CEST}
{2203549200 0 0 UTC}
{2216250000 7200 1 CEST}
{2234998800 0 0 UTC}
{2248304400 7200 1 CEST}
{2266448400 0 0 UTC}
{2279754000 7200 1 CEST}
{2297898000 0 0 UTC}
{2311203600 7200 1 CEST}
{2329347600 0 0 UTC}
{2342653200 7200 1 CEST}
{2361402000 0 0 UTC}
{2374102800 7200 1 CEST}
{2392851600 0 0 UTC}
{2405552400 7200 1 CEST}
{2424301200 0 0 UTC}
{2437606800 7200 1 CEST}
{2455750800 0 0 UTC}
{2469056400 7200 1 CEST}
{2487200400 0 0 UTC}
{2500506000 7200 1 CEST}
{2519254800 0 0 UTC}
{2531955600 7200 1 CEST}
{2550704400 0 0 UTC}
{2563405200 7200 1 CEST}
{2582154000 0 0 UTC}
{2595459600 7200 1 CEST}
{2613603600 0 0 UTC}
{2626909200 7200 1 CEST}
{2645053200 0 0 UTC}
{2658358800 7200 1 CEST}
{2676502800 0 0 UTC}
{2689808400 7200 1 CEST}
{2708557200 0 0 UTC}
{2721258000 7200 1 CEST}
{2740006800 0 0 UTC}
{2752707600 7200 1 CEST}
{2771456400 0 0 UTC}
{2784762000 7200 1 CEST}
{2802906000 0 0 UTC}
{2816211600 7200 1 CEST}
{2834355600 0 0 UTC}
{2847661200 7200 1 CEST}
{2866410000 0 0 UTC}
{2879110800 7200 1 CEST}
{2897859600 0 0 UTC}
{2910560400 7200 1 CEST}
{2929309200 0 0 UTC}
{2942010000 7200 1 CEST}
{2960758800 0 0 UTC}
{2974064400 7200 1 CEST}
{2992208400 0 0 UTC}
{3005514000 7200 1 CEST}
{3023658000 0 0 UTC}
{3036963600 7200 1 CEST}
{3055712400 0 0 UTC}
{3068413200 7200 1 CEST}
{3087162000 0 0 UTC}
{3099862800 7200 1 CEST}
{3118611600 0 0 UTC}
{3131917200 7200 1 CEST}
{3150061200 0 0 UTC}
{3163366800 7200 1 CEST}
{3181510800 0 0 UTC}
{3194816400 7200 1 CEST}
{3212960400 0 0 UTC}
{3226266000 7200 1 CEST}
{3245014800 0 0 UTC}
{3257715600 7200 1 CEST}
{3276464400 0 0 UTC}
{3289165200 7200 1 CEST}
{3307914000 0 0 UTC}
{3321219600 7200 1 CEST}
{3339363600 0 0 UTC}
{3352669200 7200 1 CEST}
{3370813200 0 0 UTC}
{3384118800 7200 1 CEST}
{3402867600 0 0 UTC}
{3415568400 7200 1 CEST}
{3434317200 0 0 UTC}
{3447018000 7200 1 CEST}
{3465766800 0 0 UTC}
{3479072400 7200 1 CEST}
{3497216400 0 0 UTC}
{3510522000 7200 1 CEST}
{3528666000 0 0 UTC}
{3541971600 7200 1 CEST}
{3560115600 0 0 UTC}
{3573421200 7200 1 CEST}
{3592170000 0 0 UTC}
{3604870800 7200 1 CEST}
{3623619600 0 0 UTC}
{3636320400 7200 1 CEST}
{3655069200 0 0 UTC}
{3668374800 7200 1 CEST}
{3686518800 0 0 UTC}
{3699824400 7200 1 CEST}
{3717968400 0 0 UTC}
{3731274000 7200 1 CEST}
{3750022800 0 0 UTC}
{3762723600 7200 1 CEST}
{3781472400 0 0 UTC}
{3794173200 7200 1 CEST}
{3812922000 0 0 UTC}
{3825622800 7200 1 CEST}
{3844371600 0 0 UTC}
{3857677200 7200 1 CEST}
{3875821200 0 0 UTC}
{3889126800 7200 1 CEST}
{3907270800 0 0 UTC}
{3920576400 7200 1 CEST}
{3939325200 0 0 UTC}
{3952026000 7200 1 CEST}
{3970774800 0 0 UTC}
{3983475600 7200 1 CEST}
{4002224400 0 0 UTC}
{4015530000 7200 1 CEST}
{4033674000 0 0 UTC}
{4046979600 7200 1 CEST}
{4065123600 0 0 UTC}
{4078429200 7200 1 CEST}
{4096573200 0 0 UTC}
}
+173 -1
View File
@@ -70,5 +70,177 @@ set TZData(:Asia/Amman) {
{1301608800 10800 1 EEST}
{1319752800 7200 0 EET}
{1333058400 10800 1 EEST}
{1351202400 10800 0 AST}
{1387486800 7200 0 EET}
{1395957600 10800 1 EEST}
{1414706400 7200 0 EET}
{1427407200 10800 1 EEST}
{1446156000 7200 0 EET}
{1459461600 10800 1 EEST}
{1477605600 7200 0 EET}
{1490911200 10800 1 EEST}
{1509055200 7200 0 EET}
{1522360800 10800 1 EEST}
{1540504800 7200 0 EET}
{1553810400 10800 1 EEST}
{1571954400 7200 0 EET}
{1585260000 10800 1 EEST}
{1604008800 7200 0 EET}
{1616709600 10800 1 EEST}
{1635458400 7200 0 EET}
{1648764000 10800 1 EEST}
{1666908000 7200 0 EET}
{1680213600 10800 1 EEST}
{1698357600 7200 0 EET}
{1711663200 10800 1 EEST}
{1729807200 7200 0 EET}
{1743112800 10800 1 EEST}
{1761861600 7200 0 EET}
{1774562400 10800 1 EEST}
{1793311200 7200 0 EET}
{1806012000 10800 1 EEST}
{1824760800 7200 0 EET}
{1838066400 10800 1 EEST}
{1856210400 7200 0 EET}
{1869516000 10800 1 EEST}
{1887660000 7200 0 EET}
{1900965600 10800 1 EEST}
{1919109600 7200 0 EET}
{1932415200 10800 1 EEST}
{1951164000 7200 0 EET}
{1963864800 10800 1 EEST}
{1982613600 7200 0 EET}
{1995919200 10800 1 EEST}
{2014063200 7200 0 EET}
{2027368800 10800 1 EEST}
{2045512800 7200 0 EET}
{2058818400 10800 1 EEST}
{2076962400 7200 0 EET}
{2090268000 10800 1 EEST}
{2109016800 7200 0 EET}
{2121717600 10800 1 EEST}
{2140466400 7200 0 EET}
{2153167200 10800 1 EEST}
{2171916000 7200 0 EET}
{2185221600 10800 1 EEST}
{2203365600 7200 0 EET}
{2216671200 10800 1 EEST}
{2234815200 7200 0 EET}
{2248120800 10800 1 EEST}
{2266264800 7200 0 EET}
{2279570400 10800 1 EEST}
{2298319200 7200 0 EET}
{2311020000 10800 1 EEST}
{2329768800 7200 0 EET}
{2343074400 10800 1 EEST}
{2361218400 7200 0 EET}
{2374524000 10800 1 EEST}
{2392668000 7200 0 EET}
{2405973600 10800 1 EEST}
{2424117600 7200 0 EET}
{2437423200 10800 1 EEST}
{2455567200 7200 0 EET}
{2468872800 10800 1 EEST}
{2487621600 7200 0 EET}
{2500322400 10800 1 EEST}
{2519071200 7200 0 EET}
{2532376800 10800 1 EEST}
{2550520800 7200 0 EET}
{2563826400 10800 1 EEST}
{2581970400 7200 0 EET}
{2595276000 10800 1 EEST}
{2613420000 7200 0 EET}
{2626725600 10800 1 EEST}
{2645474400 7200 0 EET}
{2658175200 10800 1 EEST}
{2676924000 7200 0 EET}
{2689624800 10800 1 EEST}
{2708373600 7200 0 EET}
{2721679200 10800 1 EEST}
{2739823200 7200 0 EET}
{2753128800 10800 1 EEST}
{2771272800 7200 0 EET}
{2784578400 10800 1 EEST}
{2802722400 7200 0 EET}
{2816028000 10800 1 EEST}
{2834776800 7200 0 EET}
{2847477600 10800 1 EEST}
{2866226400 7200 0 EET}
{2879532000 10800 1 EEST}
{2897676000 7200 0 EET}
{2910981600 10800 1 EEST}
{2929125600 7200 0 EET}
{2942431200 10800 1 EEST}
{2960575200 7200 0 EET}
{2973880800 10800 1 EEST}
{2992629600 7200 0 EET}
{3005330400 10800 1 EEST}
{3024079200 7200 0 EET}
{3036780000 10800 1 EEST}
{3055528800 7200 0 EET}
{3068834400 10800 1 EEST}
{3086978400 7200 0 EET}
{3100284000 10800 1 EEST}
{3118428000 7200 0 EET}
{3131733600 10800 1 EEST}
{3149877600 7200 0 EET}
{3163183200 10800 1 EEST}
{3181932000 7200 0 EET}
{3194632800 10800 1 EEST}
{3213381600 7200 0 EET}
{3226687200 10800 1 EEST}
{3244831200 7200 0 EET}
{3258136800 10800 1 EEST}
{3276280800 7200 0 EET}
{3289586400 10800 1 EEST}
{3307730400 7200 0 EET}
{3321036000 10800 1 EEST}
{3339180000 7200 0 EET}
{3352485600 10800 1 EEST}
{3371234400 7200 0 EET}
{3383935200 10800 1 EEST}
{3402684000 7200 0 EET}
{3415989600 10800 1 EEST}
{3434133600 7200 0 EET}
{3447439200 10800 1 EEST}
{3465583200 7200 0 EET}
{3478888800 10800 1 EEST}
{3497032800 7200 0 EET}
{3510338400 10800 1 EEST}
{3529087200 7200 0 EET}
{3541788000 10800 1 EEST}
{3560536800 7200 0 EET}
{3573237600 10800 1 EEST}
{3591986400 7200 0 EET}
{3605292000 10800 1 EEST}
{3623436000 7200 0 EET}
{3636741600 10800 1 EEST}
{3654885600 7200 0 EET}
{3668191200 10800 1 EEST}
{3686335200 7200 0 EET}
{3699640800 10800 1 EEST}
{3718389600 7200 0 EET}
{3731090400 10800 1 EEST}
{3749839200 7200 0 EET}
{3763144800 10800 1 EEST}
{3781288800 7200 0 EET}
{3794594400 10800 1 EEST}
{3812738400 7200 0 EET}
{3826044000 10800 1 EEST}
{3844188000 7200 0 EET}
{3857493600 10800 1 EEST}
{3876242400 7200 0 EET}
{3888943200 10800 1 EEST}
{3907692000 7200 0 EET}
{3920392800 10800 1 EEST}
{3939141600 7200 0 EET}
{3952447200 10800 1 EEST}
{3970591200 7200 0 EET}
{3983896800 10800 1 EEST}
{4002040800 7200 0 EET}
{4015346400 10800 1 EEST}
{4033490400 7200 0 EET}
{4046796000 10800 1 EEST}
{4065544800 7200 0 EET}
{4078245600 10800 1 EEST}
{4096994400 7200 0 EET}
}
+71
View File
@@ -0,0 +1,71 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Asia/Chita) {
{-9223372036854775808 27232 0 LMT}
{-1579419232 28800 0 YAKT}
{-1247558400 32400 0 YAKMMTT}
{354898800 36000 1 YAKST}
{370706400 32400 0 YAKT}
{386434800 36000 1 YAKST}
{402242400 32400 0 YAKT}
{417970800 36000 1 YAKST}
{433778400 32400 0 YAKT}
{449593200 36000 1 YAKST}
{465325200 32400 0 YAKT}
{481050000 36000 1 YAKST}
{496774800 32400 0 YAKT}
{512499600 36000 1 YAKST}
{528224400 32400 0 YAKT}
{543949200 36000 1 YAKST}
{559674000 32400 0 YAKT}
{575398800 36000 1 YAKST}
{591123600 32400 0 YAKT}
{606848400 36000 1 YAKST}
{622573200 32400 0 YAKT}
{638298000 36000 1 YAKST}
{654627600 32400 0 YAKT}
{670352400 28800 0 YAKMMTT}
{670356000 32400 1 YAKST}
{686080800 28800 0 YAKT}
{695757600 32400 0 YAKMMTT}
{701791200 36000 1 YAKST}
{717512400 32400 0 YAKT}
{733251600 36000 1 YAKST}
{748976400 32400 0 YAKT}
{764701200 36000 1 YAKST}
{780426000 32400 0 YAKT}
{796150800 36000 1 YAKST}
{811875600 32400 0 YAKT}
{828205200 36000 1 YAKST}
{846349200 32400 0 YAKT}
{859654800 36000 1 YAKST}
{877798800 32400 0 YAKT}
{891104400 36000 1 YAKST}
{909248400 32400 0 YAKT}
{922554000 36000 1 YAKST}
{941302800 32400 0 YAKT}
{954003600 36000 1 YAKST}
{972752400 32400 0 YAKT}
{985453200 36000 1 YAKST}
{1004202000 32400 0 YAKT}
{1017507600 36000 1 YAKST}
{1035651600 32400 0 YAKT}
{1048957200 36000 1 YAKST}
{1067101200 32400 0 YAKT}
{1080406800 36000 1 YAKST}
{1099155600 32400 0 YAKT}
{1111856400 36000 1 YAKST}
{1130605200 32400 0 YAKT}
{1143306000 36000 1 YAKST}
{1162054800 32400 0 YAKT}
{1174755600 36000 1 YAKST}
{1193504400 32400 0 YAKT}
{1206810000 36000 1 YAKST}
{1224954000 32400 0 YAKT}
{1238259600 36000 1 YAKST}
{1256403600 32400 0 YAKT}
{1269709200 36000 1 YAKST}
{1288458000 32400 0 YAKT}
{1301158800 36000 0 YAKT}
{1414252800 28800 0 IRKT}
}
+3 -17
View File
@@ -1,19 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Asia/Chongqing) {
{-9223372036854775808 25580 0 LMT}
{-1325487980 25200 0 LONT}
{325962000 28800 0 CST}
{515520000 32400 1 CDT}
{527007600 28800 0 CST}
{545155200 32400 1 CDT}
{558457200 28800 0 CST}
{576604800 32400 1 CDT}
{589906800 28800 0 CST}
{608659200 32400 1 CDT}
{621961200 28800 0 CST}
{640108800 32400 1 CDT}
{653410800 28800 0 CST}
{671558400 32400 1 CDT}
{684860400 28800 0 CST}
if {![info exists TZData(Asia/Shanghai)]} {
LoadTimeZoneFile Asia/Shanghai
}
set TZData(:Asia/Chongqing) $TZData(:Asia/Shanghai)
+3 -3
View File
@@ -1,5 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
if {![info exists TZData(Asia/Chongqing)]} {
LoadTimeZoneFile Asia/Chongqing
if {![info exists TZData(Asia/Shanghai)]} {
LoadTimeZoneFile Asia/Shanghai
}
set TZData(:Asia/Chungking) $TZData(:Asia/Chongqing)
set TZData(:Asia/Chungking) $TZData(:Asia/Shanghai)
+1 -1
View File
@@ -10,5 +10,5 @@ set TZData(:Asia/Dhaka) {
{38772000 21600 0 BDT}
{1230746400 21600 0 BDT}
{1245430800 25200 1 BDST}
{1262278740 21600 0 BDT}
{1262278800 21600 0 BDT}
}
+2 -2
View File
@@ -46,8 +46,8 @@ set TZData(:Asia/Gaza) {
{526424400 7200 0 IST}
{545436000 10800 1 IDT}
{558478800 7200 0 IST}
{576540000 10800 1 IDT}
{589237200 7200 0 IST}
{576626400 10800 1 IDT}
{589323600 7200 0 IST}
{609890400 10800 1 IDT}
{620773200 7200 0 IST}
{638316000 10800 1 IDT}
+3 -20
View File
@@ -1,22 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Asia/Harbin) {
{-9223372036854775808 30404 0 LMT}
{-1325492804 30600 0 CHAT}
{-1194078600 28800 0 CST}
{-946800000 32400 0 CHAT}
{-115894800 30600 0 CHAT}
{325956600 28800 0 CST}
{515520000 32400 1 CDT}
{527007600 28800 0 CST}
{545155200 32400 1 CDT}
{558457200 28800 0 CST}
{576604800 32400 1 CDT}
{589906800 28800 0 CST}
{608659200 32400 1 CDT}
{621961200 28800 0 CST}
{640108800 32400 1 CDT}
{653410800 28800 0 CST}
{671558400 32400 1 CDT}
{684860400 28800 0 CST}
if {![info exists TZData(Asia/Shanghai)]} {
LoadTimeZoneFile Asia/Shanghai
}
set TZData(:Asia/Harbin) $TZData(:Asia/Shanghai)

Some files were not shown because too many files have changed in this diff Show More