summaryrefslogtreecommitdiffstats
path: root/generic
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclCompCmds.c: [Bug 2881263] (TclCompileForeachCmd,andreas_kupries2009-10-231-3/+4
| | | | | | TclCompileLindexCmd): Fixed. Moved the use of DefineLineInformation after all regular variable declarations, so that an empty statement (-UTIP_280) doesn't confuse c89 compilers.
* * 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>.
* Fix [Bug 2882561].dkf2009-10-211-3/+3
|
* fix typosdas2009-10-051-3/+3
|
* * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-284-16/+57
| | | | | | | * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclParse.c: 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 (Tcl_SubstObj): Pass 'length' values todgp2009-09-181-3/+3
| | | | | recursive parsing calls to convert O(N^2) operations of [subst] to O(N).
* silence compiler warningsdgp2009-08-262-4/+4
|
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-2510-326/+1038
| | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, ListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-22): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script's, to properly account for them while counting lines for #280, during direct and compiled execution.
* * generic/tclFileName.c: Correct result from [glob */test] when *dgp2009-08-171-3/+27
| | | | * tests/fileName.test: matches something like ~foo. [Bug 2837800]
* fix SunCC warningdas2009-07-231-2/+2
|
* Fix for [Bug 2820349]Joe Mistachkin2009-07-231-1/+3
|
* * generic/tclBasic.c (DeleteInterpProc,TclArgumentBCEnter,andreas_kupries2009-07-145-131/+127
| | | | | | | | | | | | | | | | | | | | | | TclArgumentBCRelease, TclArgumentGet): * generic/tclCompile.c (EnterCmdWordIndex, TclCleanupByteCode, TclInitCompileEnv, TclCompileScript): * generic/tclCompile.h (ExtCmdLoc): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclInt.h (ExtIndex, CFWordBC): * tests/info.test (info-39.0): Backport of some changes made to the Tcl head, to handle literal sharing better. The code here is much simpler (trimmed down) compared to the head as the 8.4 branch is not bytecode compiling whole files, and doesn't compile eval'd code either. Reworked the handling of literal command arguments in bytecode to be saved (compiler) and used (execution) per command (See the TCL_INVOKE_STK* instructions), and not per the whole bytecode. This removes the problems with location data caused by literal sharing in proc bodies. Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex).
* * generic/tclCompile.c: The value stashed in iPtr->compiledProcPtrdgp2009-06-132-7/+3
| | | | | | | | | | | | | * generic/tclProc.c: when compiling a proc survives too long. We * tests/execute.test: only need it there long enough for the right TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once that is done, the CompileEnv controls. If we let the value of iPtr->compiledProcPtr linger, though, then any other bytecode compile operation that takes place will also have its CompileEnv initialized with it, and that's not correct. The value is meant to control the compile of the proc body only, not other compile tasks that happen along. Thanks to Carlos Tasada for discovering and reporting the problem. [Bug 2802881].
* Backport fix for [Bug 1028264]: WSACleanup() too early. The fix introduces ↵ferrieux2009-04-272-8/+111
| | | | "late exit handlers" for similar late process-wide cleanups.
* * generic/tclStringObj.c (UpdateStringOfString): Added cast to fixandreas_kupries2009-04-221-2/+2
| | | | signed/unsigned mismatch breaking win32 symbol/debug build.
* UpdateStringOfString: matchup with core-8-5-branch changesdas2009-04-151-6/+6
|
* * generic/tclStringObj.c: AppendUnicodeToUnicodeRep faileddgp2009-04-151-1/+2
| | | | to set stringPtr->allocated to 0, leading to crashes.
* * generic/tclStringObj.c: Completed backports of fixes fordgp2009-04-071-66/+113
| | | | [Bug 2494093] and [Bug 2553906].
* * generic/tclStringObj.c: Added protections from invalid memorydgp2009-03-302-3/+97
| | | | | | | * generic/tclTestObj.c: accesses when we append (some part of) * tests/stringObj.test: a Tcl_Obj to itself. Added the appendself and appendself2 subcommands to the [teststringobj] testing command and added tests to the test suite. [Bug 2603158]
* * generic/tclStringObj.c: Test stringObj-6.9 checks thatdgp2009-03-211-2/+8
| | | | | * tests/stringObj.test: Tcl_AppendStringsToObj() no longer crashes when operating on a pure unicode value. [Bug 2597185]
* * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflowdgp2009-03-201-2/+8
| | | | the max length of a Tcl value. [Bug 2669109]
* * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType()dgp2009-02-201-1/+10
| | | | | | * tests/fileName.test: that assumed (not "absolute" => "relative"). This is a false assumption on Windows, where "volumerelative" is another possibility. [Bug 2571597].
* * generic/tcl.h (Darwin): workaround conflict between deprecated tcldas2009-02-061-1/+2
| | | | panic macro and panic() function declaration in <mach/mach.h> header.
* * generic/tclStringObj.c: Added overflow protections to thedgp2009-02-051-4/+29
| | | | | AppendUtfToUtfRep routine to either avoid invalid arguments and crashes, or to replace them with controlled panics. [Bug 2561794]
* * generic/tclStringObj.c (SetUnicodeObj): Corrected failure ofdgp2009-02-041-46/+34
| | | | | Tcl_SetUnicodeObj() to panic on a shared object. [Bug 2561488]. Also factored out common code to reduce duplication.
* * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limitdgp2009-01-091-4/+7
| | | | | memory allocation requests to the sizes that can be supported by Tcl's memory allocation routines. [Bug 2494093].
* * generic/tclStringObj.c (STRING_UALLOC): Added missing parensdgp2009-01-081-2/+2
| | | | | required to get correct results out of things like STRING_UALLOC(num + append). [Bug 2494093].
* * generic/tclIOUtil.c (Tcl_FSGetNormalizedPath): Added anotherdgp2008-12-041-11/+78
| | | | | flag value TCLPATH_NEEDNORM to mark those intreps which need more complete normalization attention for correct results. [Bug 2385549]
* * generic/tclFileName.c (TclDoGlob): One of thedgp2008-12-031-4/+4
| | | | | | | Tcl_FSMatchInDirectory() calls did not have its return code checked. Some VFS drivers can return TCL_ERROR, and when that's not checked, the error message gets converted into a list of matching files returned by [glob], with ridiculous results.
* * generic/tclIO.c (TclFinalizeIOSubsystem): Revised latest commit todgp2008-12-011-3/+3
| | | | something that doesn't crash the test suite.
* * generic/tclIO.c (TclFinalizeIOSubsystem): Applied backport ofandreas_kupries2008-11-251-2/+2
| | | | | | Alexandre Ferrieux's patch for [Bug 2270477] to prevent infinite looping during finalization of channels not bound to interpreters.
* * generic/tclIO.c: Backport of fix for [Bug 2333466].andreas_kupries2008-11-231-2/+4
|
* * generic/tclPort.h: remove the ../{win,unix}/ header dirs as thehobbs2008-11-041-3/+3
| | | | | build system already has it, and it confuses builds when used with private headers installed.
* * generic/tclCompile.h: add support for debug logging of DTracedas2008-08-142-3/+115
| | | | | * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does _not_ require a platform with DTrace).
* * generic/tclFileName.c: Fix for errors handling -types {}dgp2008-08-131-1/+5
| | | | | * tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin.
* * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggeredandreas_kupries2008-08-111-5/+24
| | | | | | * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. Added a test case demonstrating the leak before the fix. Fixed a few spelling errors in test descriptions as well.
* * generic/tclBasic.c: Added missing release of extended commandandreas_kupries2008-07-282-16/+28
| | | | | | | | | | | | | | | word index when deleting an interpreter (DeleteInterpProc). Added missing ref count when creating an empty string as path (EvalEx). * generic/tclCompile.c (TclInitCompileEnv): Made same change to control flow as in TclEvalObjEx. Not needed while uplevel and siblings go through the eval-direct code path, however if that changes (like it did in 8.5+) better to have this in place instead of re-searching why certain places are without absolute locations. * tests/info.test: Added tests 38.*, exactly testing the tracking of location for uplevel scripts, and made the testsuite fully usable with and without -singleproc 1.
* * generic/tclBasic.c: Modified TclArgumentGet to reject pure listsandreas_kupries2008-07-233-21/+30
| | | | | | | | | | * generic/tclCmdIL.c: immediately, without search. Reworked setup * generic/tclCompile.c: of eoFramePtr, doesn't need the line * tests/info.test: information, more sensible to have everything on line 1 when eval'ing a pure list. Updated the users of the line information to special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour.
* Fixed the failure to link in the default (non-TCL_TIP280) build.dgp2008-07-231-1/+3
|
* * generic/tclBasic.c: Added missing function comments.andreas_kupries2008-07-221-3/+42
|
* * generic/tclCompile.c: Made the new TclEnterCmdWordIndexandreas_kupries2008-07-222-11/+11
| | | | * generic/tclCompile.h: static.
* * generic/tclBasic.c: Reworked the handling of bytecode literalsandreas_kupries2008-07-225-59/+158
| | | | | | | | | | * generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear * generic/tclExecute.c: search through the whole stack with * generic/tclInt.h: another hashtable and simplified the data structure used by the compiler (array instead of hashtable). Incidentially this also fixes the memory leak reported via [Bug 2024937].
* * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-219-56/+379
| | | | | | | | | | | * generic/tclCmdAH.c: frame), added the ability to track the * generic/tclCompCmds.c: absolute location of literal procedure * generic/tclCompile.c: arguments, and making this information * generic/tclCompile.h: available to uplevel, eval, and * generic/tclInterp.c: siblings. This allows proper tracking of * generic/tclInt.h: absolute location through custom (Tcl-coded) * generic/tclNamesp.c: control structures based on uplevel, etc. * generic/tclProc.c:
* * generic/tclCmdIL.c (InfoFrameCmd): Fixed unsafe idiom of settingandreas_kupries2008-07-071-2/+2
| | | | the interp result found by Don Porter.
* UtfToUtfProc: Avoid unwanted sign extension when converting incomplete UTF-8jenglish2008-07-041-3/+3
| | | | sequences. See [Bug 1908443] for details.
* * generic/tclIOUtil.c: Plug memory leak in latest commit. Thanksdgp2008-06-281-3/+8
| | | | Rolf Ade for detecting and Dan Steffen for the fix [Bug 2004654].
* formattingdgp2008-06-231-2/+2
|
* * generic/tclIOUtil.c: Fixed bug in Tcl_GetTranslatedPath() whendgp2008-06-231-2/+11
| | | | | | | operating on the "Special path" variant of the "path" Tcl_ObjType intrep. A full normalization was getting done, in particular, coercing relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879].
* * generic/tclParseExpr.c: Disabled attempts to support [expr]dgp2008-06-181-1/+7
| | | | | functions named eq(...) or ne(...). Any attempts to use such functions were panicking. [Bug 1971879].
* * generic/tclCmdIL.c (InfoFrameCmd): Backport of fix made on theandreas_kupries2008-06-161-26/+30
| | | | | | | | | * tests/info.test: head branch :: Moved the code looking up the information for key 'proc' out of the TCL_LOCATION_BC branch to after the switch, this is common to all frame types. Updated the testsuite to match. This was exposed by the 2008-06-08 commit (Miguel), switching uplevel from direct eval to compilation. Fixes [Bug 1987851].