summaryrefslogtreecommitdiffstats
path: root/generic
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tcl.h: Changed the typedef for the mp_digit typedgp2009-10-291-6/+2
| | | | | | | | | | | | | | | | | | | | | | | from: typedef unsigned long mp_digit; to: typedef unsigned int mp_digit; For 32-bit builds where "long" and "int" are two names for the same thing, this is no change at all. For 64-bit builds, though, this causes the dp[] array of an mp_int to be made up of 32-bit elements instead of 64-bit elements. This is a huge improvement because details elsewhere in the mp_int implementation cause only 28 bits of each element to be actually used storing number data. Without this change bignums are over 50% wasted space on 64-bit systems. [Bug 2800740]. ***POTENTIAL INCOMPATIBILITY*** For 64-bit builds, callers of routines with (mp_digit) or (mp_digit *) arguments *will*, and callers of routines with (mp_int *) arguments *may* suffer both binary and stubs incompatibilities with Tcl releases 8.5.0 - 8.5.7. Such possibilities should be checked, and if such incompatibilities are present, suitable [package require] requirements on the Tcl release should be put in place to keep such built code [load]-ing only in Tcl interps that are compatible.
* Remove accidental C99-ism which reportedly makes the AIX native compiler choke.dkf2009-10-291-19/+31
|
* * generic/tclLiteral.c: Fixed 2 bugs reported in [Bug 2888044].dgp2009-10-281-1/+2
| | | | | | | | | | | * tests/info.test: First, as noted in the comments of the TclCleanupLiteralTable routine, since the teardown of the intrep of one Tcl_Obj can cause the teardown of others in the same table, the full table cleanup must be done with care, but the code did not contain the same care demanded in the comment. Second, recent additions to the info.test file had poor hygiene, leaving an array variable ::a lying around, which breaks later interp.test tests during a -singleproc 1 run of the test suite.
* * generic/tclPathObj.c: Missing refcount on cached normalized pathdgp2009-10-271-1/+2
| | | | caused crashes. [Bug 2884203].
* * generic/tclIO.c (FlushChannel): Skip OutputProc for low-levelandreas_kupries2009-10-231-2/+6
| | | | | | 0-length writes. When closing pipes which have already been closed not skipping leads to spurious SIG_PIPE signals. Reported by Mikhail Teterin <mi+thun@aldan.algebra.com>.
* Let [$obj varname x(y)] work. [Bug 2883857]dkf2009-10-221-2/+25
|
* Fix [Bug 2882561].dkf2009-10-211-3/+3
|
* Fix [Bug 2881259].dkf2009-10-211-2/+2
|
* * generic/tclIO.c: Revised ReadChars and FilterInputBytes routinesdgp2009-10-191-17/+27
| | | | | | | to permit reads to continue up to the string limits of Tcl values. Before revisions, large read attempts could panic when as little as half the limiting value length was reached. [Patch 2107634] Thanks to Sean Morrison and Bob Parker for their roles in the fix.
* Fix for [Bug 2871908]Joe Mistachkin2009-10-181-6/+6
|
* Fix [Bug 2629338]: Stop evil unset traces from accessing freed memory.dkf2009-10-172-22/+45
|
* [Bug 2874678]: Don't leak bignums in [dict incr]...dkf2009-10-081-1/+7
|
* * generic/tclObj.c: [Bug 2871908]: Plug memory leaks of theandreas_kupries2009-10-071-21/+19
| | | | | | | objThreadMap and lineCLPtr hashtables. Also make the names of the continuation line information initialization and finalization functions more consistent. Patch supplied by Joe Mistachkin <joe@mistachkin.com>.
* * generic/tclIORChan.c (ErrnoReturn): Replace the hardwiredandreas_kupries2009-10-071-2/+2
| | | | | | constant 11 with the proper errno define, EAGAIN. What was I thinking ? The BSD's have a different errno assignment and break with the hardwired number. Reported by emiliano on the chat.
* * generic/tclInterp.c (SlaveEval): Agressive stomping of internal repsdgp2009-10-061-17/+4
| | | | | | | was added as part of the NRE patch of 2008-07-13. This doesn't appear to actually be needed, and it hurts quite a bit when large lists lose their intreps and require reparsing. Thanks to Ashok Nadkarni for reporting the problem.
* * generic/tclTomMathInt.h (new): Public header tclTomMath.h haddgp2009-10-063-5/+5
| | | | | * generic/tclTomMath.h: dependence on private headers, breaking use * generic/tommath.h: by extensions [Bug 1941434].
* * generic/tclDictObj.c: Updated freeIntRepProc routines sodgp2009-09-3013-19/+29
| | | | | | | | | | | | | | | * generic/tclExecute.c: that they set the typePtr field to * generic/tclIO.c: NULL so that the Tcl_Obj is not left * generic/tclIndexObj.c: in an inconsistent state. * generic/tclInt.h: [Bug 2857044] * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclOOCall.c: * generic/tclObj.c: * generic/tclPathObj.c: * generic/tclProc.c: * generic/tclRegexp.c: * generic/tclStringObj.c:
* * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-294-23/+66
| | | | | | | * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclInt.h: guarantee that any size values computed * generic/tclThreadAlloc.c: are within the domains of the routines they get passed to. [Bugs 2557696 and 2557796].
* * generic/tclCmdMZ.c: Replaced TclProcessReturn() calls withdgp2009-09-281-17/+9
| | | | | | * tests/error.test: Tcl_SetReturnOptions() calls as a simple fix for [Bug 2855247]. Thanks to Anton Kovalenko for the report and fix. Additional fixes for other failures demonstrated by new tests.
* Added dummy tclooConfig.sh files for easier cross-version building. [2026844]dkf2009-09-261-2/+6
|
* TIP #356 IMPLEMENTATIONdgp2009-09-246-12/+27
| | | | | | | | | | * generic/tcl.decls: Promote internal routine TclNRSubstObj() * generic/tclCmdMZ.c: to public Tcl_NRSubstObj(). Still needs docs. * generic/tclCompile.c: * generic/tclInt.h: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
* * generic/tclCompile.c: Correct botch in the conversion ofdgp2009-09-211-2/+4
| | | | Tcl_SubstObj(). Thanks to Kevin Kenny for detection and report.
* * generic/tclCompile.c: Re-implement Tcl_SubstObj() as a simpledgp2009-09-172-82/+52
| | | | | | | | | | * generic/tclParse.c: wrapper around TclNRSubstObj(). This has * tests/basic.test: the effect of caching compiled bytecode in * tests/parse.test: the value to be substituted. Note that Tcl_SubstObj() now exists only for extensions. Tcl itself no longer makes any use of it. Note also that TclSubstTokens() is now reachable only by Tcl_EvalEx() and Tcl_ParseVar() so tests aiming to test its functioning needed adjustment to still have the intended effect.
* need to remember to save before commit...das2009-09-171-2/+2
|
* typodas2009-09-171-2/+2
|
* fix string buffer sizes for pointer printingdas2009-09-171-42/+30
| | | | fix whitespace, formatting & style to match codebase conventions
* Extended ::tcl::unsupported::representation.ferrieux2009-09-161-6/+46
|
* fix warningdas2009-09-121-2/+2
|
* * generic/tclBasic.c: Completed the NR-enabling of [subst].dgp2009-09-115-26/+201
| | | | | | | | | * generic/tclCmdMZ.c: [Bug 2314561]. * generic/tclCompCmds.c: * generic/tclCompile.c: * generic/tclInt.h: * tests/coroutine.test: * tests/parse.test:
* * generic/tclParse.c Corrected line counting error in multi-commanddgp2009-09-071-0/+4
| | | | * tests/into.test: script substitutions. [Bug 2850901].
* * generic/tclExecute.c: fix potential uninitialized variable use anddas2009-09-078-39/+52
| | | | | | | | | | | | * generic/tclFCmd.c: null dereference flagged by clang static * generic/tclProc.c: analyzer. * generic/tclTimer.c: * generic/tclUtf.c: * generic/tclExecute.c: silence false positives from clang static * generic/tclIO.c: analyzer about potential null dereference. * generic/tclScan.c: * generic/tclCompExpr.c:
* make support for clang static analyzer safer & cleanerdas2009-09-071-7/+9
|
* Fixed up error in stack requirement estimation that made debug buildsdgp2009-09-041-1/+11
| | | | panic during execution of [subst] bytecode.
* Patched up flaw in option syntax checkingdgp2009-09-041-6/+3
|
* * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecodedgp2009-09-048-122/+477
| | | | | | | | | | | | | * generic/tclBasic.c: compiler routine for the [subst] command. * generic/tclCmdMZ.c: This is a partial solution to the need to * generic/tclCompile.c: NR-enable [subst] since bytecode execution is * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new * generic/tclExecute.c: bytecode instructions, INST_NOP and * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is * tests/basic.test: likely to be useful in any future effort to * tests/info.test: add a bytecode compiler routine for [try]. * tests/parse.test:
* Improve consistency of formatting of comments and function declsdkf2009-09-041-45/+47
|
* * generic/tclIORTrans.c (ReflectInput): Remove error response toandreas_kupries2009-09-011-5/+2
| | | | | | | | 0-result from method 'limit?' of transformations. Return the number of copied bytes instead, which is possibly nothing. The latter then triggers EOF handling in the higher layers, making the 0-result of limit? the way to inject artificial EOF's into the data stream.
* * generic/tclStringObj.c: A few more string overflow cases indgp2009-08-271-3/+13
| | | | [format]. [Bug 2845535]
* guard clang analyzer Tcl_Panic annotation with #ifndef USE_TCL_STUBSdas2009-08-251-2/+5
|
* fix warningsdas2009-08-252-3/+3
|
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-2510-98/+979
| | | | | | | | | | | | | | | | | | | | | | | Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript, TclCompileTokens): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended the parser, compiler, and execution engine with code and attendant data structures tracking the position of continuation lines which are not visible in the resulting script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang staticdas2009-08-241-4/+2
| | | | analyzer in PURIFY builds, replacing preprocessor/assert technique.
* * generic/tclFileName.c: Correct regression in [Bug 2837800] fix.dgp2009-08-211-2/+2
| | | | * tests/fileName.test:
* * generic/tclFileName.c: Correct result from [glob */test] when *dgp2009-08-201-2/+30
| | | | matches something like ~foo. [Bug 2837800]
* * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of stringsdgp2009-08-201-149/+80
| | | | | | | | starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied on elsewhere that the name stored there is a relative path. Also refactored to make an AppendPath() routine instead of the cut/paste stanzas that were littered throughout.
* Use the Tcl value stack more, simplify exit paths in [lsearch]dkf2009-08-201-75/+40
|
* Small tweaksdkf2009-08-201-43/+39
|
* Close off memory leak in [lsort].dkf2009-08-201-74/+68
|
* Interpreted [if] is now fully NRE-enabled. [Bug 2823276]dkf2009-08-191-36/+78
|
* Make interpreted [for] and [while] NRE-safe. [Bug 2823276]dkf2009-08-191-61/+121
|