summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix [Bug 1066837] without reopening other bugs... What a horrid hack! :^/dkf2004-11-251-1/+11
|
* Cleaning up; mostly whitespace and comment fixes.dkf2004-11-011-242/+236
|
* Allow ensembles to rewrite their subcommands' error messages to be moredkf2004-10-291-30/+22
| | | | | | relevant to users. [Patch 1056864] Also patches to core to take advantage of this Also other general cleaning up of Tcl_WrongNumArgs usage
* Standardize way of calling object freeIntRepProcs...dkf2004-10-221-15/+15
|
* * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp):dgp2004-10-181-23/+10
| | | | | | | | | | | | * generic/tclCmdAH.c (Tcl_CatchObjCmd): * generic/tclCmdMZ.c (TclMergeReturnOptions,TclProcessReturn): * generic/tclCompCmds.c (TclCompileReturnCmd): * generic/tclExecute.c (TclCompEvalObj): * generic/tclInt.h (Interp): * generic/tclProc.c (TclUpdateReturnInfo): Place primary storage of the -level and -code information in private fields of the Interp struct, rather than in a DictObj. This should significantly improve performance of TclUpdateReturnInfo.
* * generic/tclCmdMZ.c (TclProcessReturn): Now that primarydgp2004-10-151-15/+1
| | | | | | | * generic/tclProc.c (TclUpdateReturnInfo): storage for the errorInfo and errorCode values are internal fields, we can set them at the time of the [return] command, and not have to wait until the specified number of "-level"s have popped.
* * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp,dgp2004-10-151-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove useless panic-ing implementations of methods in tclProcBodyTypedkf2004-10-061-97/+30
| | | | | (NULL implies that and produces a better error message). Also converted to using Tcl_AppendResult()
* Style fixes and Tcl_GetString -> TclGetStringdkf2004-10-061-81/+79
|
* Speed up [upvar] and [uplevel] by not forcing level references to be parseddkf2004-10-011-13/+139
| | | | as strings every time through. [Patch 1037357]
* Report compilation errors at runtime, [Patch 103368] by dgp.Miguel Sofer2004-09-261-6/+3
|
* * generic/tclBasic.c (Tcl_AddObjErrorInfo, Tcl_LogCommandInfo):dgp2004-09-171-8/+3
| | | | | | | | | | | | * generic/tclCmdAH.c ([catch], [error]): * generic/tclCmdMZ.c ([return]): * generic/tclProc.c (TclUpdateReturnInfo): * generic/tclResult.c (Tcl_SetErrorCodeVA, Tcl_SetObjErrorCode TclTransferResult): Refactored so that all errorCode setting flows through Tcl_SetObjErrorCode(). This greatly reduces the number of different places in the code that need to know details about an internal bitflag field of the Interp struct. Also places errorCode setting in one place for easier future mods.
* * generic/tclProc.c: The routine TclProcInterpProc was a ↵dgp2004-08-251-125/+5
| | | | | | | | | | | | specific * generic/tclTestProcBodyObj.c: instance of the general service already provided by TclObjInvokeProc. Removed TclProcInterpProc and TclGetInterpProc from the code... * generic/tclInt.decls ...and from the internal stubs table. * generic/tclIntDecls.h * generic/tclStubInit.c
* update out of date commentdgp2004-08-241-2/+2
|
* * generic/tclProc.c (TclCreateProc): comments corrected.Miguel Sofer2004-05-041-22/+12
|
* * generic/tclProc.c (TclObjInvokeProc):Miguel Sofer2004-05-021-4/+22
| | | | | * tests/proc.test (proc-3.6): fix for bad quoting of multi-word proc names in error messages [Bug 942757]
* fixed typos in documentation and commentsvincentdarley2004-03-091-2/+2
|
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-10/+10
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* Removed variables that are no longer used.dgp2003-10-211-4/+1
|
* * generic/tclBasic.c (TclAppendObjToErrorInfo): New internal routinedgp2003-10-141-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | that appends a Tcl_Obj to the errorInfo, saving the caller the trouble of extracting the string rep. * generic/tclStringObj.c (TclAppendLimitedToObj): New internal routine that supports truncated appends with optional ellipsis marking. This single routine supports UTF-8-safe truncated appends needed in several places throughout the Tcl source code, mostly for error and stack messages. Clean fix for [Bug 760872]. * generic/tclInt.h: Declarations for new internal routines. * generic/tclCmdMZ.c: Updated callers to use the new routines. * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclProc.c: * generic/tclStringObj.c: * mac/tclMacResource.c: * library/init.tcl: Updated ::errorInfo cleanup in [unknown] to reflect slight modifications to Tcl_LogCommandInfo(). Corrects failing init-4.* tests.
* stop compiler warnings about unused variablesdgp2003-05-081-3/+1
|
* * generic/tclBasic.c: Implementation of TIP 90, whichdgp2003-05-051-14/+38
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: extends the [catch] and [return] * generic/tclCompCmds.c: commands to enable creation of a * generic/tclExecute.c: proc that is a replacement for * generic/tclInt.h: [return]. [Patch 531640] * generic/tclProc.c: * generic/tclResult.c: * tests/cmdAH.test: * tests/cmdMZ.test: * tests/error.test: * tests/proc-old.test: * library/tcltest/tcltest.tcl: The -returnCodes option to [test] failed to recognize the symbolic name "ok" for return code 0.
* * generic/tclProc.c (ProcessProcResultCode): Fix failure todgp2002-12-111-2/+2
| | | | | propagate negative return codes up the call stack. [Bug 647307] * tests/proc.test (proc-6.1): Test for Bug 647307
* * generic/tclProc.c (TclCreateProc): mask out VAR_UNDEFINED forhobbs2002-10-021-34/+33
| | | | | precompiled locals to support 8.3 precompiled code. (Tcl_ProcObjCmd): correct 2002-09-26 fix to look for tclProcBodyType.
* * generic/tclProc.c (Tcl_ProcObjCmd): correct overeagerhobbs2002-09-271-5/+14
| | | | optimization of noop proc to handle the precompiled case. (sofer)
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Concat.3: all remaining public interfaces of Tcl. * doc/CrtCommand.3: Notably, the parser no longer writes on * doc/CrtSlave.3: the string it is parsing, so it is no * doc/CrtTrace.3: longer necessary for Tcl_Eval() to be * doc/Eval.3: given a writable string. Also, the * doc/ExprLong.3: refactoring of the Tcl_*Var* routines * doc/LinkVar.3: by Miguel Sofer is included, so that the * doc/ParseCmd.3: "part1" argument for them no longer needs * doc/SetVar.3: to be writable either. * doc/TraceVar.3: * doc/UpVar.3: Compatibility support has been enhanced so * generic/tcl.decls that a #define of USE_NON_CONST will remove * generic/tcl.h all possible source incompatibilities with * generic/tclBasic.c the 8.3 version of the header file(s). * generic/tclCmdMZ.c The new #define of USE_COMPAT_CONST now does * generic/tclCompCmds.c what USE_NON_CONST used to do -- disable * generic/tclCompExpr.c only those new CONST's that introduce * generic/tclCompile.c irreconcilable incompatibilities. * generic/tclCompile.h * generic/tclDecls.h Several bugs are also fixed by this patch. * generic/tclEnv.c [Bugs 584051,580433] [Patches 585105,582429] * generic/tclEvent.c * generic/tclInt.decls * generic/tclInt.h * generic/tclIntDecls.h * generic/tclInterp.c * generic/tclLink.c * generic/tclObj.c * generic/tclParse.c * generic/tclParseExpr.c * generic/tclProc.c * generic/tclTest.c * generic/tclUtf.c * generic/tclUtil.c * generic/tclVar.c * mac/tclMacTest.c * tests/expr-old.test * tests/parseExpr.test * unix/tclUnixTest.c * unix/tclXtTest.c * win/tclWinTest.c
* Fix for Tk Bug #219218 "error handling with bgerror in Tk"jenglish2002-07-251-2/+2
|
* using the new variable name caching possibilities when setting errorMiguel Sofer2002-07-161-5/+8
| | | | results in (Tcl_AddObjErrorInfo) and (TclUpdateReturnInfo)
* tclCompile.c and tclProc.c: small changes in the usage of the VAR_UNDEFINED ↵Miguel Sofer2002-07-111-4/+4
| | | | flag.
* Improved stack trace for TCL_BREAK and TCL_CONTINUE returns from procs. [Bug ↵Miguel Sofer2002-04-151-24/+23
| | | | 536955].
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-5/+5
| | | | | | | | | | | generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
* fixed the calculation of the maximal stack depth required by bytecodes [Bug ↵Miguel Sofer2001-12-101-5/+5
| | | | 483611].
* Replace isspace(char) with isspace(UCHAR(char)) for safety...dkf2001-11-271-2/+2
|
* restoring the computations of iPtr->numLevels to the original logic ↵Miguel Sofer2001-11-201-10/+1
| | | | (previous to buggy modifs on 2001-11-16).
* Code reordering; execution levels made consistent [Bug 480896].Miguel Sofer2001-11-161-1/+10
|
* Doh ... strncmp, not strcmp needed in last commit.Miguel Sofer2001-10-151-2/+2
|
* generic/tclProc.c: changing a memcmp to strcmp to avoid a memory errorMiguel Sofer2001-10-151-33/+32
| | | | | detected by purify (thanks Jeff); modify style to agrre with the style guide.
* * Updated APIs indgp2001-09-271-3/+3
| | | | | generic/tclProc.c and generic/tclVar.c according to the guidelines of TIP 27. [Patch 465442]
* Disabled all compile and execution tracing functionality in standardMiguel Sofer2001-09-171-5/+5
| | | | builds [Bug 451858].
* Bytecompiling noops [FQ #451441]Miguel Sofer2001-09-101-1/+105
|
* made [proc] check that formal args have simple names [Bug: 458548]Miguel Sofer2001-09-041-1/+9
|
* Added several missing CONSTs in calls to TclGetNamespaceForQualNameKevin B Kenny2001-04-271-3/+4
|
* * tests/compile.test:hobbs2000-05-031-10/+23
| | | | | | | | | | * tests/init.test: * tests/proc.test: * tests/proc-old.test: * tests/rename.test: * generic/tclProc.c: reworked error return for procedures with incorrect args to be like the C Tcl_WrongNumArgs, where a "wrong # args: ..." message is printed out with the args list.
* * tests/var.test:hobbs1999-12-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * 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: backed out change from 1999-11-18 as ithobbs1999-11-191-4/+4
| | | | could affect return string from upvar as well.
* * generic/tclProc.c: corrected error reporting for default casehobbs1999-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* 1999-09-01 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-09-021-8/+17
| | | | | | | | | | | | | * generic/tclParseExpr.c: changed '"' to '\"' to make FreeBSD happy [Bug: 2625] * generic/tclProc.c: moved static buf to better location and changed static msg that would overflow in ProcessProcResultCode [Bug: 2483] and added Tcl_DStringFree to Tcl_ProcObjCmd. Also reworked size of static buffers. * tests/stringObj.test: added test 9.11 * generic/tclStringObj.c: changed Tcl_AppendObjToObj to properly handle the 1-byte dest and mixed src case where both had had Unicode string len checks made on them. [Bug: 2678]
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-76/+109
|
* Merged stubs changes into mainline for 8.0stanton1999-03-101-2/+2
|
* * generic/tclProc.c:stanton1999-02-031-8/+4
| | | | | | | | | | | | | | | | | | | | | | * 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]