summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
Commit message (Collapse)AuthorAgeFilesLines
* Backport fix for [Bug 2857044].dgp2011-04-271-0/+1
|
* Make sure SetFooFromAny routines react reasonably when passed a NULL interp.dgp2011-04-211-1/+5
|\
* | whitespace tidydgp2011-03-161-1/+1
| |
* | Rewrites to eliminate isspace() calls.dgp2011-03-161-6/+5
| |
* | Fix gcc warnings: variable set but not usedjan.nijtmans2011-03-081-0/+6
|\ \ | |/
| * Fix gcc warnings: variable set but not usedjan.nijtmans2011-03-081-0/+4
| |
* | 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.
| * [Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2,nijtmans2011-01-251-63/+63
| | | | | | | | backported strcpy->memcpy change but not change in any struct.
| * * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, ListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-22): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script's, to properly account for them while counting lines for #280, during direct and compiled execution.
| * * generic/tclCompile.c: The value stashed in iPtr->compiledProcPtrdgp2009-06-131-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclProc.c: when compiling a proc survives too long. We * tests/execute.test: only need it there long enough for the right TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once that is done, the CompileEnv controls. If we let the value of iPtr->compiledProcPtr linger, though, then any other bytecode compile operation that takes place will also have its CompileEnv initialized with it, and that's not correct. The value is meant to control the compile of the proc body only, not other compile tasks that happen along. Thanks to Carlos Tasada for discovering and reporting the problem. [Bug 2802881].
| * * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggeredandreas_kupries2008-08-111-5/+24
| | | | | | | | | | | | * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. Added a test case demonstrating the leak before the fix. Fixed a few spelling errors in test descriptions as well.
| * * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | * 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/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.h: tracing of proc and command entry & * generic/tclBasic.c: return, bytecode execution, object * generic/tclExecute.c: allocation and more; with essentially * generic/tclInt.h: zero cost when tracing is inactive; * generic/tclObj.c: enable with --enable-dtrace configure * generic/tclProc.c: arg (disabled by default, will only * unix/Makefile.in: enable if DTrace is present). * unix/configure.in: [Patch 1793984] * macosx/Makefile: enable DTrace support. * unix/configure: autoconf-2.13
| * * generic/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-3/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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:
| * Silence compiler warning.dgp2006-05-151-2/+3
| |
| * * generic/tclProc.c (ProcCompileProc): When a bump of the compiledgp2006-05-131-7/+87
| | | | | | | | | | | | | | | | epoch forces the re-compile of a proc body, take care not to overwrite any Proc struct that may be referred to on the active call stack. This fixes [Bug 148218]. Note that the fix will not be effective for code that calls the private routine TclProcCompileProc() directly.
| * * generic/tclBasic.c:Miguel Sofer2005-10-231-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclLink.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclScan.c: * generic/tclTest.c: * generic/tclVar.c: * mac/tclMacInit.c: * unix/tclUnixInit.c: * win/tclWinInit.c: Insure that the core never calls TclPtrSetVar, Tcl_SetVar2Ex, Tcl_ObjSetVar2 or Tcl_SetObjErrorCode with a 0-ref new value. It is not possible to handle error returns correctly in that case [Bug 1334947], one has the choice of leaking the object in some cases, or else risk crashing in some others.
| * * 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]
| * * generic/tclBasic.c: Corrected several instances of unsafedgp2003-07-181-1/+17
| | | | | | | | | | | | | | * generic/tclCompile.c: truncation of UTF-8 strings that might * generic/tclProc.c: break apart a multi-byte character. * library/init.tcl: [Bug 760872] * tests/init.test:
* | [Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2,nijtmans2011-01-251-17/+17
| | | | | | | | backported strcpy->memcpy change but not change in any struct.
* | * generic/tclProc.c (ProcWrongNumArgs): [Bug 3045010]: Make thedkf2010-08-151-5/+7
| | | | | | | | | | handling of passing the wrong number of arguments to [apply] somewhat less verbose when a lambda term is present.
* | * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* | * generic/tclCompile.c: The value stashed in iPtr->compiledProcPtrdgp2009-06-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclProc.c: when compiling a proc survives too long. We * tests/execute.test: only need it there long enough for the right TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once that is done, the CompileEnv controls. If we let the value of iPtr->compiledProcPtr linger, though, then any other bytecode compile operation that takes place will also have its CompileEnv initialized with it, and that's not correct. The value is meant to control the compile of the proc body only, not other compile tasks that happen along. Thanks to Carlos Tasada for discovering and reporting the problem. [Bug 2802881].
* | * generic/tclProc.c: Reset -level and -code values to defaultsdgp2008-10-191-1/+6
| | | | | | | | after they are used. [Bug 2152286].
* | * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggeredandreas_kupries2008-08-111-4/+24
| | | | | | | | | | | | * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. Added a test case demonstrating the leak before the fix. Fixed a few spelling errors in test descriptions as well.
* | * tests/info.test: Tests 38.* added, exactly testing the trackingandreas_kupries2008-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | of location for uplevel scripts. * generic/tclCompile.c (TclInitCompileEnv): Reorganized the initialization of the #280 location information to match the flow in TclEvalObjEx to get more absolute contexts. * generic/tclBasic.c (TclEvalObjEx): Moved the pure-list optimization out of the eval-direct code path to be done always, i.e. even when a compile is requested. This way we do not loose the association between #280 location information and the list elements, if any.
* | * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-2/+10
| | | | | | | | | | | | | | | | | | | | | | * 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:
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | RE: [Patch 1830184] TclResetResultMiguel Sofer2007-11-121-2/+1
| | | | | | | | | | | | THIS PATCH WAS REVERTED: initial (mis)measurements overstated the perfomance wins, which turn out to be tiny. Not worth the complication.
* | * generic/tclBasic.c: New macro TclResetResult, new iPtr flagMiguel Sofer2007-11-121-1/+2
| | | | | | | | | | | | | | | | | | * generic/tclExecute.c: bit INTERP_RESULT_UNCLEAN: shortcut for * generic/tclInt.h: Tcl_ResetResult for the "normal" case: * generic/tclProc.c: TCL_OK, no return options, no errorCode * generic/tclResult.c: nor errorInfo, return at normal level. * generic/tclStubLib.c: [Patch 1830184] * generic/tclUtil.c:
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-8/+8
| | | | | | | | objTypes.
* | Add a new command, ::tcl::unsupported::disassembledkf2007-09-251-2/+126
| |
* | * generic/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.h: tracing of proc and command entry & * generic/tclBasic.c: return, bytecode execution, object * generic/tclExecute.c: allocation and more; with essentially * generic/tclInt.h: zero cost when tracing is inactive; * generic/tclObj.c: enable with --enable-dtrace configure * generic/tclProc.c: arg (disabled by default, will only * unix/Makefile.in: enable if DTrace is present). * unix/configure.in: [Patch 1793984] * macosx/GNUmakefile: enable DTrace support. * macosx/Tcl-Common.xcconfig: * macosx/Tcl.xcodeproj/project.pbxproj: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* | * generic/tclInt.h: Removed the "nsName" Tcl_ObjType from thedgp2007-09-091-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: registered set. Revised the management of * generic/tclObj.c: the intrep of that Tcl_ObjType. Revised the * tests/obj.test: TclGetNamespaceFromObj() routine to return TCL_ERROR and write a consistent error message when a namespace is not found. [Bug 1588842. Patch 1686862] ***POTENTIAL INCOMPATIBILITY*** For callers of Tcl_GetObjType() on the name "nsName". * generic/tclExecute.c: Update TclGetNamespaceFromObj() callers. * generic/tclProc.c: * tests/apply.test: Updated tests to expect new consistent * tests/namespace-old.test: error message when a namespace is not * tests/namespace.test: found. * tests/upvar.test:
* | * generic/tclProc.c (TclInitCompiledLocals): the refCount ofMiguel Sofer2007-09-071-2/+4
| | | | | | | | | | resolved variables was being managed without checking if they were Var or VarInHash: itcl [Bug 1790184]
* | * generic/tclProc.c (TclCreateProc): better comments on theMiguel Sofer2007-08-101-10/+9
| | | | | | | | required varflag values when loading precompiled procs.
* | * generic/tclProc.c (InitLocalCache): reference firstLocalPtr viahobbs2007-08-081-8/+7
| | | | | | | | procPtr. codePtr->procPtr == NULL exposed by tbcload.
* | renamed InitCompiledLocals to InitResolvedLocals to make it clearer that itMiguel Sofer2007-08-081-8/+8
| | | | | | | | is not called in the normal case.
* | * generic/tclInt.h: remove comments refering to VAR_SCALAR, asMiguel Sofer2007-08-081-76/+59
| | | | | | | | | | | | that flag bit does not exist any longer. * generic/tclProc.c (InitCompiledLocals): removed optimisation for non-resolved case, as the function is never called in that case.
* | modifs to help itcl adapt to VarReformMiguel Sofer2007-08-041-1/+9
| |
* | VarReform [Patch 1750051]Miguel Sofer2007-07-311-216/+307
| | | | | | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* | * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclCmdIL.c (InfoFrameCmd):Miguel Sofer2007-06-181-28/+36
| | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * generic/tclCompile.c (TclInitCompileEnv): * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Moved the CmdFrame off the C stack and onto the Tcl stack.
* | Fix [Bug 1738542]dkf2007-06-171-6/+7
| |
* | * generic/tclProc.c (TclObjInterpProcCore): Use switch instead of adkf2007-06-161-76/+81
| | | | | | | | chain of if's for a modest performance gain and a little more clarity.
* | * generic/tclInt.decls: Modif to the internals ofMiguel Sofer2007-06-141-212/+278
| | | | | | | | | | | | | | * generic/tclInt.h: TclObjInterpProc to reduce stack * generic/tclIntDecls.h: consumption and improve task * generic/tclProc.c: separation. Changes the interface of TclObjInterpProcCore (patching TclOO simultaneously).
* | * generic/tclProc.c (TclObjInterpProcCore): simplified objMiguel Sofer2007-06-141-10/+5
| | | | | | | | management in wrongNumArgs calls.
* | remove C99 var declarationhobbs2007-06-141-3/+4
| |
* | * generic/tclCompile.c: SetByteCodeFromAny() can no longer returndgp2007-06-141-35/+18
| | | | | | | | | | * generic/tclExecute.c: any code other than TCL_OK, so remove code * generic/tclProc.c: that formerly handled exceptional codes.