summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
Commit message (Collapse)AuthorAgeFilesLines
* Systematizing the formattingdkf2005-07-211-269/+298
|
* * generic/tclInt.h: Reduced the Tcl_ObjTypes "index",dgp2005-06-071-5/+5
| | | | | | | * generic/tclIndexObj.c: "enembleCmd", "localVarName", and * generic/tclNamesp.c: "levelReference" to file static scope. * generic/tclProc.c: * generic/tclVar.c:
* This close to a release, simple is better.dgp2005-06-021-3/+1
|
* * generic/tclProc.c: Revised fix for [Bug 1209759] is more complex,dgp2005-06-011-2/+4
| | | | * generic/tclResult.c: but should have less performance impact.
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
|
* * generic/tclProc.c (TclInitCompiledLocals):mdejong2005-02-021-3/+9
| | | | | | | | | | Add check for type of the framePtr->procPtr->bodyPtr passed to TclInitCompiledLocals and panic if it is not the correct type. If the body of the proc is not of the compiled byte code type then the code will crash. This was discovered while tracking down a crash in Itcl, that crash is fixed by Itcl patch 1115085.
* Avoid sharing cmdName literals accross namespaces, and generalise usage ofMiguel Sofer2004-12-241-2/+2
| | | | 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-201-31/+234
| | | | | | | | * 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.
* * generic/tclTest.c: Added two new functions to allocate memoryMiguel Sofer2004-12-151-8/+8
| | | | | | | | | | 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-141-2/+2
| | | | to flags. Should be perfectly backwards compatible.
* optimised loops that initialise a proc's arguments and compiled localMiguel Sofer2004-12-101-53/+63
| | | | variables, removing tests from inner loops.
* 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]