summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclBasic.c (Tcl_CloneInterp): Added code to propagateandreas_kupries2003-04-151-13/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error messages generated when cloning fails from the clone to the master, for perusal by the code which activated the cloning process. This is especially important to track syntax errors in procedures to clone down. The code was provided by Greg Thompson <gst@cisco.com>. * generic/tclBasic.c (CloneNamespace): Fixed potential memory leak due to a missing call of "Tcl_DStringFree". Reported by Greg Thompson <gst@cisco.com>. * generic/tclBasic.c (CloneCommand): Moved code adding the clone to its command table to the end of the command. This makes cleanup in case of a failure easier, there is less to roll back. Added code to release the command strcuture if cloning the procedure structures fails. changed from void to int, returning a TCL_ result code. (CloneNamespace): Changed from void to int, returning a TCL_ result code. Now reacting to the result of CloneCommand (and itself), aborts operation in case of a failure. (Tcl_CloneInterp): Now reacting to a failure reported by 'CloneNamespace'. Frees the fixup information accumulated so far (via new CloneFixupFree), then deletes the partially created interpreter via the standard 'Tcl_DeleteInterp'. (CloneFixupFree): New function, freeing the fixup information.
* * generic/tclBasic.c (Tcl_CloneInterp): Moved 'TclCreateExecEnv'andreas_kupries2002-11-261-10/+10
| | | | | | | | behind 'CloneNamespace'. This fixes the last leak found. The function creates a variable 'tcl_traceExec', and links a C variable to it. Running 'CloneNamespace' afterward overwrites the pointer, leaking the structure created by 'TclCreateExecEnv'.
* * tclBasic.c (CloneVariable): The initialization of the refCountandreas_kupries2002-11-261-2/+5
| | | | | | | | for the cloned variable assumed that all variables are namespace variables. This is not true. Globals are not marked as in a namespace. This caused the system to skip freeing all global variables in a cloned interpreter. Changed to explicitly check the variable if it is namespace'd.
* * generic/tclProc.c (TclCloneProc): Helper for Tcl_CloneInterp.andreas_kupries2002-11-261-2/+801
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: Line 3843ff: New Tcl_CloneInterp public API. * generic/tclProc.c (TclCloneProc): See below. New function. * generic/tclBasic.c: Tcl_Clone... functions. New. Tcl_CloneInterp is main entry into this. * Part of work on more sharing of bytecode information between structurally equivalent interpreters. * generic/tclCompile.c (EncodeCmdLocMap): Operate on ByteCodeData instead of ByteCode. (TclCleanupByteCode): Deref to ByteCodeData in numerous places. (TclInitByteCodeObj): s.a. (TclPrintByteCodeObj): s.a. (TclPrintInstruction): s.a. (RecordByteCodeStats): s.a. * generic/tclLiteral.c (TclReleaseLiteral): s.a. * generic/tclCompile.h: Split struct ByteCode into two structures. The new structure carries the shareable bytrecode information and is named 'ByteCodeData'. * generic/tclExecute.c (GetExceptRangeForPc): s.a. (TclExecuteByteCode): s.a. (PrintByteCodeInfo): s.a. (ValidatePcAndStackTop): s.a. (GetSrcInfoForPc): s.a.
* * generic/tclCompile.h:hobbs2002-11-071-2/+9
| | | | | | | | | | * generic/tclCompile.c (TclCleanupByteCode, RecordByteCodeStats): * generic/tclLiteral.c: * generic/tclInt.h: * generic/tclBasic.c (Tcl_CreateInterp, DeleteInterpProc): add TCL_THREAD_LITERALS conditional support for making global literals be thread-global instead of interp-global. This adjusts the placement and management of the LiteralTable and ByteCodeStats.
* * generic/tclBasic.c (Tcl_CreateInterp): simplify ByteCodeStatshobbs2002-11-051-29/+2
| | | | initialization with one memset.
* NRE1 patch by Miguel Sofer. Several new controllingandreas_kupries2001-12-031-471/+16
| | | | | macros for information on the stack. Parser information on the stack can now be switched to allocation on the heap.
* * NOTES: New file. Read here about the new modularization macros,andreas_kupries2001-11-281-2/+61
| | | | | | | | | | | | | | | | | | interdependencies, implications, etc. * static.sizes.html: New file. Report on the cuts achieved so far. Regarding the object files only the files which did change in size are reported. Usage of the MODULAR_TCL macro currently cuts about 17 % of the code (measured using strip'ped object files and libraries). * Changed files so far .. [cut, see changelog for full list] * Working on modularization of the tcl core. *************************** **** mod-8-3-4-branch **** ***************************
* * generic/tclBasic.c (Tcl_GetVersion): adjusted use of major/minorhobbs2000-04-151-11/+11
| | | | to not conflict with global decl on some systems [Bug: 2882]
* * generic/tclBasic.c (Tcl_SetCommandInfo): comment fixhobbs2000-04-101-2/+2
|
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Added commentshobbs2000-03-311-3/+13
| | | | | | | | | | noting the need to pair ckalloc with ckfree. [Bug: 4262] * generic/tclInt.decls: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: * win/tclWin32Dll.c: removed TclWinSynchSpawn (vestige of Win32s support).
* * generic/tclCmdIL.c (InfoBodyCmd): made [info body] return ahobbs2000-01-211-1/+12
| | | | | | | | | | | string if the body has been bytecompiled. * generic/tclBasic.c (Tcl_EvalObjEx): added pedantic check for originating proc body of bytecompiled code, #def'd out as the change for [info body] should make it unnecessary * tests/set.test: added test for complex array elem name compiling * generic/tclCompCmds.c (TclCompileSetCmd): Fixed parsing of array elements during compiling, and slightly optimised same [Bug: 3889]
* * tests/var.test:hobbs1999-12-121-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: fixed problem where setting to {} array would intermittently not work. (Fontaine) [Bug: 3339] * generic/tclCmdMZ.c: * generic/tclExecute.c: optimized INST_TRY_CVT_TO_NUMERIC to recognize boolean objects. (Spjuth) [Bug: 2815] * tests/info.test: * tests/parseOld.test: * generic/tclCmdAH.c: * generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg case as well, to take advantage of potential pure list input optimization. This means that it won't get byte compiled though, which should be acceptable. * generic/tclBasic.c: made Tcl_EvalObjEx pure list object aware in the TCL_EVAL_DIRECT case for efficiency. * generic/tclUtil.c: made Tcl_ConcatObj pure list object aware, and return a list object in that case [Bug: 2098 2257] * generic/tclMain.c: changed Tcl_Main to not constantly reuse the commandPtr object (interactive case) as it could be shared. (Fellows)
* * generic/tclProc.c: corrected error reporting for default casehobbs1999-11-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | at the global level for uplevel command. * generic/tclIOSock.c: changed int to size_t type for len in TclSockMinimumBuffers. * generic/tclCkalloc.c: fixed Tcl_DbCkfree to return a value on NULL input. [Bug: 3400] * generic/tclStringObj.c: fixed support for passing in negative length to Tcl_SetUnicodeObj, et al handling routines. [Bug: 3380] * doc/scan.n: * tests/scan.test: * generic/tclScan.c: finished support for inline scan by supporting XPG identifiers. * doc/http.n: * library/http2.1/http.tcl: added register and unregister commands to http:: package (better support for tls/SSL), as well as -type argument to http::geturl. [RFE: 2617] * generic/tclBasic.c: removed extra decr of numLevels in Tcl_EvalObjEx that could cause seg fault. (mjansen@wendt.de) * generic/tclEvent.c: fixed possible lack of MutexUnlock in Tcl_DeleteExitHandler [Bug: 3545]
* added intospection variable to determine if the interp was compiled with ↵surles1999-05-141-1/+14
| | | | threads enabled
* * tests/regexp.test:stanton1999-05-131-15/+1
| | | | | | | | | | | | * generic/tclInt.h: * generic/tclBasic.c: * generic/tclRegexp.h: * generic/tclRegexp.c: Replaced the per-interpreter regexp cache with a per-thread cache. Changed the Regexp object to take advantage of this extra cache. Added a reference count to the TclRegexp type so regexps can be shared by multiple objects. Removed the per-interp regexp cache from the interpreter. Now regexps can be used with no need for an interpreter. [Bug: 1063]
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-676/+702
|
* * generic/tclAlloc.c: Changed TCL_NATIVE_MALLOC to USE_TCLALLOC sostanton1999-03-111-2/+2
| | | | | | | | | | | | | | it matches 8.1. * generic/tclBasic.c: * generic/tcl.h: * generic/tcl.decls: Changed Tcl_ReleaseType from an enum to macros so it can be used in .rc files. Added Tcl_GetString. * unix/Makefile.in: Added compat binaries to the stub library. Changed compat binaries to always compile with shared flags since they need to be shared for the stub library.
* Add Tcl_GetVersion C APIredman1999-03-101-1/+40
|
* Merged stubs changes into mainline for 8.0stanton1999-03-101-9/+75
|
* * generic/tclProc.c:stanton1999-02-031-18/+13
| | | | | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: * generic/tclInt.h: * generic/tclCmdIL.c: * generic/tclBasic.c: * generic/tclVar.c: Applied patch from Viktor Dukhovni to rationalize TCL_LEAVE_ERR_MSG behavior when creating variables. * generic/tclVar.c: Fixed bug in namespace tail computation. Fixed bug where upvar could resurrect a namespace variable whose namespace had been deleted. * generic/tclCompile.c (TclCompileExprCmd): Eliminated yet another bogus optimization in expression compilation. * generic/tclCompile.c (CompileExprWord): Fixed exception stack overflow bug caused by missing statement. [Bug: 928] * generic/tclIOCmd.c: * generic/tclBasic.c: Objectified the "open" command. [Bug: 1113]
* * generic/tclIOCmd.c:stanton1999-02-021-2/+2
| | | | * generic/tclBasic.c: Objectified the "open" command. [Bug: 1113]
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* updated copyright info & sccs idsrjohnson1998-08-101-1/+2
|
* fixed style problemsrjohnson1998-08-101-13/+19
|
* Fixed to handle import links when redefining commandswelch1998-08-101-3/+55
|
* Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" andwelch1998-07-201-3/+23
| | | | parent workspace "/home/welch/ws/tcl8.0.3".
* Added check for precompiled ByteCodes, to avoid recompilation if the epochescoffon1998-07-151-4/+25
| | | | has changed in the interpreter. Instead, reset the epoch in the ByteCode.
* *** empty log message ***welch1998-07-061-2/+2
|
* Undid the change to Tcl_EvalObjwelch1998-07-061-3/+2
|
* Merged changes between child workspace "/home/escoffon/ws/tcl8.0" andescoffon1998-07-011-3/+3
| | | | parent workspace "/ws/tcl8.0".
* Added Jans compatibility patchwelch1998-06-291-3/+6
|
* replaced the SCCS id string in header to display idsescoffon1998-06-101-1/+1
|
* modified the check for no source string in Tcl_EvalObj to account forescoffon1998-06-101-1/+1
|
* Initial revisionrjohnson1998-03-261-0/+3992