summaryrefslogtreecommitdiffstats
path: root/generic
Commit message (Collapse)AuthorAgeFilesLines
* bugs 1090413, 1092789 fixedKevin B Kenny2004-12-292-103/+107
|
* Avoid sharing cmdName literals accross namespaces, and generalise usage ofMiguel Sofer2004-12-246-37/+74
| | | | the TclRegisterNewLiteral macro [Patch 1090905]
* fix for last commit; thanks dgp and tclguy for catch/classify/throwMiguel Sofer2004-12-201-3/+3
|
* * generic/tclCompile.c: moved TclInitCompiledLocals to tclProc.cMiguel Sofer2004-12-202-170/+235
| | | | | | | | * generic/tclProc.c: new static InitCompiledLocals to allow for a single pass over the proc's arguments at proc load time (instead of two as previously). TclObjInterpProc() now allocates the compiledLocals on the tcl execution stack, using the new TclStackAlloc/Free functions.
* Upgrade the capabilities of time limits by allowing them to fire in the midstdkf2004-12-164-19/+145
| | | | of the processing of the event loop or during a blocking [after]. [Bug 1085023]
* * generic/tclTest.c: Added two new functions to allocate memoryMiguel Sofer2004-12-158-33/+229
| | | | | | | | | | from the execution stack (TclStackAlloc, TclStackFree). Added functions TclPushStackFrame and TclPopStackFrame that do the work of Tcl_PushCallFrame and Tcl_PopCallFrame, but using frames allocated in the execution stack - i.e., heap instead of C-stack. The core uses these two new functions exclusively; the old ones remain for backwards compat, as at least two popular extensions (itcl, xotcl) are known to use them.
* changing the isProcCallFrame field of the CallFrame struct from a 0/1 fieldMiguel Sofer2004-12-144-23/+27
| | | | to flags. Should be perfectly backwards compatible.
* * generic/tcl.h: Restored extern "C" guards so that C++ codedgp2004-12-131-1/+17
| | | | | sees function pointer typedef linkage consistent with earlier Tcl releases. [Bug 1082349].
* * generic/tclEncoding.c: Plugged some memory leaks. Thanks todgp2004-12-132-3/+5
| | | | * generic/tclUtil.c: Rolf Ade for reports and testing [Bug 1083082]
* * generic/tclVar.c (TclArrayObjCmd - ARRAY_NAMES): leaking an object [BugMiguel Sofer2004-12-131-1/+2
| | | | 1084111] - thanks to Rolf Ade.
* * generic/tclObj.c (TclSetCmdNameObj): special handling for fully qualifiedMiguel Sofer2004-12-121-1/+19
| | | | command names (as in fix [Patch 456668]).
* converting the static function GetNamespaceFromObj() to MODULE_SCOPEMiguel Sofer2004-12-112-13/+14
| | | | TclGetNamespaceFromObj().
* Bump to a3 to prevent confusion with a2 release.dkf2004-12-101-3/+3
|
* optimised loops that initialise a proc's arguments and compiled localMiguel Sofer2004-12-104-114/+162
| | | | variables, removing tests from inner loops.
* Make ensemble API available to rest of Tcl core.dkf2004-12-102-36/+36
|
* Provide an internal API for manipulating ensembles.dkf2004-12-091-133/+635
|
* * generic/tclEncoding.c: Different fix for [Bug 1077005].dgp2004-12-043-4/+6
| | | | | | | | | * generic/tclEvent.c: Broke apart TclpSetInitialEncodings() on * generic/tclInt.h: Windows into TclpSetInterfaces(), that is * unix/tclUnixInit.c: fundamentally essential, and the initialization * win/tclWinInit.c: of the system encoding, which is not. Made the TclpSetInterfaces call part of TclInitSubsystems so it cannot be overlooked.
* * generic/tclUtil.c (TclSetProcessGlobalValue): Handle the casedgp2004-12-022-6/+7
| | | | | | | | where a ProcessGlobalValue might be assigned to itself. * generic/tclEncoding.c (MakeFileMap): Correct refcounting errors managing values returned by TclPathPart (with refCount of 1!) that led to a memory leak. [Bug 1077474].
* filesystem, glob, tilde fixvincentdarley2004-12-021-1/+17
|
* Remove a global mutex/state by using lists instead of hashtables to store thedkf2004-12-021-49/+51
| | | | collection of aliases that refer to an interpreter. [FRQ 1077210]
* Convert mutex-protected global state into thread-local state. [FRQ 1077210]dkf2004-12-021-9/+18
|
* * generic/tclUtil.c (TclGetProcessGlobalValue): Narrowed the scopedgp2004-12-021-50/+58
| | | | of mutex locks.
* * generic/tclUtil.c: Updated Tcl_GetNameOfExecutable() todgp2004-12-018-120/+130
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c: make use of a ProcessGlobalValue for * generic/tclEvent.c: storing the executable name. Added internal routines Tcl(Get|Set)ObjNameOfExecutable() to access that storage in Tcl_Obj, rather than string format. * unix/tclUnixFile.c: Rewrote TclpFindExecutable() to use * win/tclWinFile.c: TclSetObjNameOfExecutable to store the executable name it computes. * generic/tclInt.h: Added internal stub entries for * generic/tclInt.decls: TclpFindExecutable and Tcl(Get|Set)ObjNameOfExecutable. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclCmdIL.c: Retrieve executable name in Tcl_Obj form * win/tclWinPipe.c: instead of string form. * unix/tclUnixTest.c: Update [testfindexecutable] command to use new internal interfaces.
* * generic/tclEncoding.c: Moved TclpSetInitialEncodings()dgp2004-12-011-3/+2
| | | | | | | | call from Tcl_FindExecutable() into TclInitEncodingSubsystem(). This is important on Windows where it establishes whether the "ascii" or "unicode" set of system routines will be used, and that needs to be done earlier to support filesystem operations. [Bug 1077005]
* Patch 976520 reworks several of the details involved withdgp2004-11-3012-559/+1006
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | startup/initialization of the Tcl library, focused on the activities of Tcl_FindExecutable(). * generic/tclIO.c: Removed bogus claim in comment that encoding "iso8859-1" is "built-in" to Tcl. * generic/tclInt.h: Created a new struct ProcessGlobalValue, * generic/tclUtil.c: routines Tcl(Get|Set)ProcessGlobalValue, and function type TclInitProcessGlobalValueProc. Together, these take care of the housekeeping for "values" (things that can be held in a Tcl_Obj) that are global across a whole process. That is, they are shared among multiple threads, and epoch and mutex protection must govern the validity of cached copies maintained in each thread. * generic/tclNotify.c: Modified TclInitNotifier() to tolerate being called multiple times in the same thread. * generic/tclEvent.c: Dropped the unused argv0 argument to TclInitSubsystems(). Removed machinery to unsure only one TclInitNotifier() call per thread, now that that is safe. Converted Tcl(Get|Set)LibraryPath to use a ProcessGlobalValue, and moved them to tclEncoding.c. * generic/tclBasic.c: Updated caller. * generic/tclInt.h: TclpFindExecutable now returns void. * unix/tclUnixFile.c: * win/tclWinFile.c: * win/tclWinPipe.c: * generic/tclEncoding.c: Built new encoding search initialization on a foundation of ProcessGlobalValues, exposing new routines Tcl(Get|Set)EncodingSearchPath. A cache of a map from encoding name to directory pathname keeps track of where encodings are available for loading. Tcl_FindExecutable greatly simplified into just three function calls. The "library path" is now misnamed, as its only remaining purpose is as a foundation for the default encoding search path. * generic/tclInterp.c: Inlined the initScript that is evaluated by Tcl_Init(). Added verification after initScript evaluation that Tcl can find its installed *.enc files, and that it has initialized [encoding system] in agreement with what the environment expects. [tclInit] no longer driven by the value of $::tcl_libPath; it largely constructs its own search path now, rather than attempt to share one with the encoding system. * unix/tclUnixInit.c: TclpSetInitialEncodings factored so that a new * win/tclWinInit.c: routine TclpGetEncodingNameFromEnvironment can reveal that Tcl thinks the [encoding system] should be, even when an incomplete encoding search path, or a missing *.enc file won't allow that initialization to succeed. TclpInitLibraryPath reworked as an initializer of a ProcessGlobalValue. * unix/tclUnixTest.c: Update implementations of [testfindexecutable], [testgetdefenc], and [testsetdefenc]. * tests/unixInit.test: Corrected tests to operate properly even when a value of TCL_LIBRARY is required to find encodings. * generic/tclInt.decls: New internal stubs: TclGetEncodingSearchPath, TclSetEncodingSearchPath, TclpGetEncodingNameFromEnvironment. These are candidates for public exposure by future TIPs. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclTest.c: Updated [testencoding] to use * tests/encoding.test: Tcl(Get|Set)EncodingSearchPath. Updated tests.
* Fix [Bug 1066837] without reopening other bugs... What a horrid hack! :^/dkf2004-11-252-4/+32
|
* * generic/tclPort.h: Relative include of tclWinPort.h returned as it was ↵davygrvy2004-11-241-2/+2
| | | | | | | requiring me set -I$(tcl_root)/win for my extensions that need to include tclInt.h and doesn't appear to serve any purpose on windows builds.
* * generic/tclCmdIL.c (InfoVarsCmd): Corrected segfault in newdgp2004-11-241-6/+8
| | | | * tests/info.test (info-19.6): trivial matching branch [Bug 1072654]
* Remove call to Tcl_GetStringResult to speed up processing of [$canv postscript]dkf2004-11-231-1/+13
| | | | and other repeated callers of Tcl_AppendResult(). [Patch 1041072]
* * generic/tclInterp.c: Restored several directories to the searchdgp2004-11-221-11/+29
| | | | | | | | * tests/unixInit.test: path used to locate init.tcl within [tclInit]. This change does not restore any directories to the encoding search path, so should still avoid the price of an unreasonably large number of filesystem accesses during encoding initialization at startup [Bug 976438]
* fix to windows file join bugvincentdarley2004-11-221-4/+12
|
* * tests/interp.test (interp-36.*): [interp bgerror] tests.dgp2004-11-181-5/+3
| | | | * generic/tclInterp.c: Corrected [interp bgerror] error messages.
* * generic/tclEvent.c (HandleBgErrors): Simplified program flow.dgp2004-11-181-14/+10
|
* * tests/basic.test: Updated functional (not testing) uses ofdgp2004-11-181-2/+2
| | | | | | | | * tests/io.test: [bgerror] to make use of [interp bgerror]. * tests/socket.test: * tests/timer.test: * generic/tclInterp.c: Corrected [interp bgerror] error message.
* * unix/configure.in: The change below reveals that the publicdgp2004-11-173-7/+9
| | | | | | | | | | | | | | data type Tcl_StatBuf relies on config information. For now, disabled the use of the tclConfig.h file until its full impact on Tcl's interface can be assessed. * unix/configure: autoconf-2.57 * generic/tcl.h: Moved the #include "tclConfig.h" out of * generic/tclInt.h: tcl.h. The config settings are not part of * generic/tclPort.: the public interface, and having it there breaks compiled against uninstalled Tcl and extensions using autoconf-2.5*.
* * generic/tclIOUtil.c (TclFSEpochOk): There were two code pathsdgp2004-11-171-8/+2
| | | | | | | via which the thread copy of filesystemEpoch could be synched with the master copy, but only one kept the filesystem list cache up to date. Fix routes everything through a single code path. [Bug 1035775].
* * generic/tcl.h:das2004-11-161-2/+2
| | | | | | * unix/configure.in: changed HAVE_CONFIG_H to HAVE_TCL_CONFIG_H. * unix/configure: autoconf-2.57
* * generic/tclInt.h: Added comment warning that the olddgp2004-11-152-88/+41
| | | | | | | | | | ERR_IN_PROGRESS and ERROR_CODE_SET flag values should not be re-used for the sake of those extensions that have accessed them. * generic/tclCmdMZ.c (Tcl_TraceObjCmd): Fixed Bug 1065378 which failed * tests/trace.test (trace-33.1): to permit a variable trace created with [trace variable] to be destroyed with [trace remove]. Thanks to Keith Vetter for the report.
* TIP #221 IMPLEMENTATIONdgp2004-11-1314-222/+481
| | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: Define [::tcl::Bgerror] in new interps. * generic/tclEvent.c: Update Tcl_BackgroundError to make use of the registered [interp bgerror] command. * generic/tclInterp.c: New [interp bgerror] subcommand. * tests/interp.test: syntax tests updated. TIP #226 IMPLEMENTATION * generic/tcl.decls: Stubs for Tcl_(Save|Restore|Discard)InterpState * generic/tcl.h: New public opaque type, Tcl_InterpState. * generic/tclInt.h: Drop old private declarations. Add Tcl(Get|Set)BgErrorHandler * generic/tclResult.c: Tcl_*InterpState implementations. * generic/tclDictObj.c: Update callers. * generic/tclIOGT.c: * generic/tclTrace.c: TIP #227 IMPLEMENTATION * generic/tcl.decls: Stubs for Tcl_(Get|Set)ReturnOptions. * generic/tclInt.h: Drop old private declarations. * generic/tclResult.c: Tcl_*ReturnOptions implementations. * generic/tclCmdAH.c: Update callers. * generic/tclMain.c:
* * generic/tclEncoding.c (TableFromUtfProc): correct crashhobbs2004-11-121-2/+13
| | | | condition when TCL_UTF_MAX == 6. [Bug 1004065]
* ChangeLog reformat.dgp2004-11-121-4/+1
| | | | Now that tcl.h takes care of tclConfig.h, tclPort.h no longer should.
* * generic/tcl.h:das2004-11-122-6/+6
| | | | | | | | | | * generic/tclInt.h: * unix/Makefile.in: include tclConfig.h from tcl.h and install it as a public header. Normalized compiler include path order to -I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR}. * unix/dltest/Makefile.in: add ${BUILD_DIR}/.. to include path to pick up tclConfig.h.
* * unix/Makefile.in: Be sure -I{BUILD_DIR} comes first so thatdgp2004-11-121-1/+4
| | | | | | | we #include the correct tclConfig.h file for the correct build. * generic/tclPort.h: Make sure tclConfig.h is #include'd so that its configuration values can guide portability support.
* * generic/tclInt.h: Moved verification of ptrdiff_t typedef fromdgp2004-11-123-15/+8
| | | | | * generic/tclExecute.c: multiple .c files into one common header where * generic/tclVar.c: it is verifiably after tclConfig.h inclusion.
* * unix/config.h.in:rmax2004-11-121-2/+2
| | | | | | | | | | | * unix/tclConfig.h.in: renamed * unix/Makefile.in: Completed support for config header, * unix/configure.in: fixed building outside of the unix dir, * unix/tclAppinit.c: and reflected the name change of config.h. * generic/tclInt.h: * unix/configure: generated
* Adapt Tcl so it uses a config.h header instead of stuffing all #defs on thedkf2004-11-121-1/+5
| | | | | command line. Third parties using generic/tclInt.h, unix/tclAppInit.c or unix/tcl.m4 should be unaffected. Part of the general TIP#34 project.
* * generic/tclListObj.c (Tcl_ListObjReplace): use memmove() insteaddas2004-11-112-17/+12
| | | | | | | | | | | of manual copy loop to shift list elements. Decreases time spent in Tcl_ListObjReplace() from 5.2% to 1.7% of overall runtime of tclbench on a ppc 7455 (i.e. 200% speed increase). [Patch 1064243] * generic/tclHash.c: hoisted some constant pointer dereferences out of loops to eliminate redundant loads that the gcc optimizer didn't deal with. Decreases time spend in Tcl_FindHashEntry() by 10% over a full run of the tcl testuite on a ppc 7455. [Patch 1064243]
* Janitorial whitespace/style fixes.dkf2004-11-091-1423/+1455
|
* * generic/tclCompile.h: Removed extrainious reset ofdavygrvy2004-11-031-4/+1
| | | | TCL_STORAGE_CLASS missed in last edit.
* * generic/tcl.h: Moved the preprocessor logicdavygrvy2004-11-036-29/+66
| | | | | | | | | | | * generic/tclDecls.h: from tclInt.h of setting the * generic/tclInt.h: TCL_STORAGE_CLASS macro to the * generic/tclIntDecls.h: tcl*Decls.h files now that no * generic/tclIntPlatDecls.h: use of EXTERN is left in tclInt.h. * generic/tclPlatDecls.h: Proto for Tcl_Main moved in tcl.h * win/tclWinPort.h: to prior the inclusion of the Stubs headers as they are now resetting TCL_STORAGE_CLASS. Removed extrainious reset from tclWinPort.h. [Patch 1055668]