summaryrefslogtreecommitdiffstats
path: root/generic/tclInterp.c
Commit message (Collapse)AuthorAgeFilesLines
* Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
|\ | | | | more harm than good. Purged them.
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | more harm than good. Purged them.
| * * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | * 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/tclInterp.c (Tcl_GetAlias): fix for [Bug 1882373]Miguel Sofer2008-01-301-2/+2
| |
| * * generic/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCL_TIP280. * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: * tests/compile.test: * tests/info.test: * tests/platform.test: * tests/safe.test:
| * * generic/tclInterp.c: (AliasObjCmd): Added refCounting of the wordsdgp2003-05-121-2/+8
| | | | | | | | | | * tests/interp.test (interp-33.1): of the target of an interp alias during its execution. Also added test. [Bug 730244].
| * * generic/tclInterp.c (Tcl_InterpObjCmd): Corrected optiondgp2003-03-121-2/+4
| | | | | | | | | | parsing beyond objc for [interp create --]. Thanks to Marco Maggi. [Bug 702383]
* | fix gcc warning: passing argument 3 of 'Tcl_GetIndexFromObj' discards ↵nijtmans2010-11-191-2/+2
| | | | | | | | qualifiers from pointer target type
* | * doc/interp.n: [3081184] TIP #378.andreas_kupries2010-11-151-5/+104
| | | | | | | | | | | | | | | | | | | | * doc/tclvars.n: Performance fix for TIP #280. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclInterp.c: * tests/info.test: * tests/interp.test:
* | [Bug 2895741]: Make min() and max() supported in safe interpreters.dkf2009-12-291-1/+18
| |
* | [Bug 2891362]: Make time limits work better with the event loop.dkf2009-12-281-2/+12
| |
* | * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | * 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/tclInterp.c: Fixed completely boneheaded mistake thatdgp2008-06-201-3/+3
| | | | | | | | | | | | | | | | | | * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] would always act like [interp bgerror {}]. [Bug 1999035]. * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 * tests/event.test: -singleproc 1 test suite run. * tests/io.test:
* | * generic/tclInterp.c (Tcl_GetAlias): fix for [Bug 1882373]Miguel Sofer2008-01-301-2/+2
| |
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | Reduce cast count.dkf2007-11-191-40/+40
| |
* | General cleanliness improvements (reduced usage of casts, assume C89)dkf2007-11-181-139/+123
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-33/+33
| | | | | | | | objTypes.
* | * generic/tclInterp.c (Tcl_Init): Removed constraint on abilitydgp2007-09-061-3/+3
| | | | | | | | | | to define a custom [tclInit] before calling Tcl_Init(). Until now the custom command had to be a proc. Now it can be any command.
* | * generic/tclInt.decls: New internal routine TclBackgroundException()dgp2007-09-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEvent.c: that for the first time permits non-TCL_ERROR exceptions to trigger [interp bgerror] handling. Closes a gap in TIP 221. When falling back to [bgerror] (which is designed only to handle TCL_ERROR), convert exceptions into errors complaining about the exception. * generic/tclInterp.c: Convert Tcl_BackgroundError() callers to call * generic/tclIO.c: TclBackgroundException(). * generic/tclIOCmd.c: * generic/tclTimer.c: * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c:
* | * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them easier for callers to use (or more precisely, harder to misuse). TclStackFree now takes a (void *) argument which is the pointer intended to be freed. TclStackFree will panic if that's not actually the memory the call will free. TSA/TSF also now tolerate receiving (interp == NULL), in which case they simply fall back to be calls to Tcl_Alloc/Tcl_Free. * generic/tclIntDecls.h: make genstubs * generic/tclBasic.c: Updated callers * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclProc.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* | * generic/tclBasic.c: Split TEOv in two, by separating aMiguel Sofer2007-06-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | processor for non-TCL_OK returns. Also spli TEOvI in a full version that handles non-existing and traced commands, and a separate shorter version for the regular case. * generic/tclBasic.c: Moved the generation of command strings for * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in TclCheck[Interp|Execution]Traces(). Also insured that the strings are properly nul terminated at the correct length [Bug 1693986] * generic/tclBasic.c: Extend usage of TclLimitReady() and * generic/tclExecute.c: (new) TclLimitExceeded() macros. * generic/tclInt.h: * generic/tclInterp.c: * generic/tclInt.h: New TclCleanupCommandMacro for core usage. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclObj.c:
* | Added macro version of Tcl_LimitReady.dkf2007-05-171-7/+11
| |
* | Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-7/+7
| | | | | | | | catenation, and fixed an oversight in the fix for NZA time zones.
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-3/+4
| | | | | | | | efficient). After [Patch 1529526] (afredd)
* | * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* | * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: * tests/compile.test: * tests/info.test: * tests/platform.test: * tests/safe.test:
* | Silence compiler grumbles.dkf2006-11-021-8/+5
| |
* | Added explanations, cleaned up whitespace.dkf2006-11-021-12/+30
| |
* | * generic/tclBasic.c:Miguel Sofer2006-10-311-5/+3
| | | | | | | | | | | | | | | | * generic/tcl.h: * generic/tclInterp.c: * generic/tclNamesp.c: removing the flag bit TCL_EVAL_NOREWRITE, the last remnant of the callObjc/v fiasco. It is not needed, as it is now always set and checked or'ed with TCL_EVAL_INVOKE.
* | * generic/tclInterp.c (ApplyObjCmd):aMiguel Sofer2006-10-261-3/+4
| | | | | | | | | | * generic/tclNamesp.c (EnsembleImplementationCmd): replaced ckalloc (heap) with TclStackAlloc (execution stack).
* | * generic/tclProc.c (ApplyObjCmd): fix wrong#args for apply byMiguel Sofer2006-10-241-3/+5
| | | | | | | | | | | | using the ensemble rewrite engine, [Bug 1574835]. * generic/tclInterp.c (AliasObjCmd): previous commit missed usage of TCL_EVAL_NOREWRITE for aliases.
* | * generic/tclInterp.c (ApplyObjCmd): fixed bad error in 2006-10-12Miguel Sofer2006-10-171-2/+5
| | | | | | | | commit: interp released too early. Spotted by mistachkin.
* | * generic/tclInterp.c (ApplyObjCmd):Miguel Sofer2006-10-121-5/+26
| | | | | | | | | | | | * tests/interp.test (interp-14.5-10): made [interp alias] use the ensemble rewrite machinery to produce better error messages [Bug 1576006]
* | change "procedure" to "function" for (slightly) greater claritydkf2005-12-121-8/+8
| |
* | Fix two bugs in limits, one a crash and the other a failed flag reset.dkf2005-10-101-380/+376
| |
* | Getting more systematic about styledkf2005-07-171-1023/+999
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * generic/tclBasic.c: Added unsupported commanddgp2005-04-191-66/+2
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: [::tcl::unsupported::EncodingDirs] to permit * generic/tclInt.h: query/set of the encoding search path at * generic/tclInterp.c: the script level. Updated init.tcl to make * library/init.tcl: use of the new command. Also updated several coding practices in init.tcl ("eq" for [string equal], etc.)
* | * tests/unixInit.test: Disabled obsolete tests and removed codedgp2005-04-151-45/+41
| | | | | | | | | | * tests/encoding.test: that supported them. * generic/tclInterp.c:
* | * generic/tclInterp.c: Corrected bad syntax of Tcl_Panic() call.dgp2005-04-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c (TclGetProcessGlobalValue): More robust handling of bad TclInitProcessGlobalValueProc behavior; an immediate panic rather than a mysterious crash later. * generic/tclEncoding.c: Several changes to the way the encodingFileMap cache is maintained. Previously, it was attempted to keep the file map filled and up to date with changes in the encoding search path. This contributed to slow startup times since it required an expensive "glob" operation to fill the cache. Now the validity of items in the cache are checked at the time they are used, so the cache is permitted to fall out of sync with the encoding search path. Only [encoding names] and Tcl_GetEncodingNames() now pay the full expense. [Bug 1177363]
* | Upgrade the capabilities of time limits by allowing them to fire in the midstdkf2004-12-161-3/+60
| | | | | | | | of the processing of the event loop or during a blocking [after]. [Bug 1085023]
* | 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]
* | Patch 976520 reworks several of the details involved withdgp2004-11-301-105/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * 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]
* | * tests/interp.test (interp-36.*): [interp bgerror] tests.dgp2004-11-181-5/+3
| | | | | | | | * generic/tclInterp.c: Corrected [interp bgerror] error messages.
* | * 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.
* | TIP #221 IMPLEMENTATIONdgp2004-11-131-17/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* | * library/auto.tcl Purged Tcl's script library of alldgp2004-10-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | * library/clock.tcl remaining references to global vars * library/init.tcl ::errorInfo and ::errorCode. * generic/tclMain.c (Tcl_Main): Updated to make use of TclGetReturnOptions instead of ::errorInfo variable. * generic/tclInterp.c (tclInit): Bug fix. Access dict variables with [dict get], not array syntax.
* | * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp,dgp2004-10-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TclEvalObjvInternal,Tcl_LogCommandInfo,TclAddObjErrorInfo): * generic/tclCmdAH.c (Tcl_CatchObjCmd): * generic/tclEvent.c (BgError,ErrAssocData,Tcl_BackgroundError, HandleBgErrors,BgErrorDeleteProc): * generic/tclExecute.c (TclCreateExecEnv,TclDeleteExecEnv): * generic/tclIOUtil.c (comments only): * generic/tclInt.h (ExecEnv,Interp, ERR_IN_PROGRESS): * generic/tclInterp.c ([tclInit]): * generic/tclMain.c (comments only): * generic/tclNamesp.c (Tcl_CreateNamespace,Tcl_DeleteNamespace,TclTeardownNamespace): * generic/tclProc.c (TclUpdateReturnInfo): * generic/tclResult.c (Tcl_ResetResult,TclTransferResult): * generic/tclTrace.c (CallVarTraces): Reworked management of the "errorInfo" data of an interp. That information is now primarily stored in a new private (Tcl_Obj *) field of the Interp struct, rather than using a global variable ::errorInfo as the primary storage. The ERR_IN_PROGRESS flag bit value is no longer required to manage the value in its new location, and is removed. Variable traces are established to support compatibility for any code expecting the ::errorInfo variable to hold the information. ***POTENTIAL INCOMPATIBILITY*** Code that sets traces on the ::errorInfo variable may notice a difference in timing of the firing of those traces. Code that uses the value ERR_IN_PROGRESS.