summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclBasic.c: Modified TclArgumentGet to reject pure listsandreas_kupries2008-07-231-16/+21
| | | | | | | | | | * generic/tclCmdIL.c: immediately, without search. Reworked setup * generic/tclCompile.c: of eoFramePtr, doesn't need the line * tests/info.test: information, more sensible to have everything on line 1 when eval'ing a pure list. Updated the users of the line information to special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour.
* * generic/tclBasic.c: Added missing function comments.andreas_kupries2008-07-221-3/+42
|
* * generic/tclBasic.c: Reworked the handling of bytecode literalsandreas_kupries2008-07-221-35/+102
| | | | | | | | | | * generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear * generic/tclExecute.c: search through the whole stack with * generic/tclInt.h: another hashtable and simplified the data structure used by the compiler (array instead of hashtable). Incidentially this also fixes the memory leak reported via [Bug 2024937].
* * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-33/+249
| | | | | | | | | | | * 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:
* whitespacedas2007-09-131-2/+2
|
* * generic/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-1/+78
| | | | | | | | | | | | | | | * 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-14/+534
| | | | | | | | | | | | | | | | | | | | | | | 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/tclBasic.c (TEOVI): fix por possible leak of a CommandMiguel Sofer2006-11-041-12/+17
| | | | | | | | | in the presence of execution traces that delete it. * generic/tclBasic.c (TEOVI): * tests/trace.test (trace-21.11): fix for [Bug 1590232], execution traces may cause a second command resolution in the wrong namespace.
* * generic/tclBasic.c: Reverted exposure of patchlevel inandreas_kupries2006-09-251-6/+6
| | | | | | registered core version when TIP#268 features are activated. Better compatibility with existing packages. Like Tk.
* * generic/tcl.decls: Implemented TIP #268, conditionally.andreas_kupries2006-09-221-2/+15
| | | | | | | | | | | | | | | * generic/tclBasic.c: Define TCL_TIP268 to activate the new * generic/tclDecls.h: features. * generic/tclInt.h: * generic/tclPkg.c: * generic/tclStubInit.c: * generic/tclTest.c: * library/init.tcl * library/package.tcl: * tests/pkg.test: * tests/platform.test: * tests/safe.test: * doc/PkgRequire.3:
* * generic/tclBasic.c (Tcl_CreateInterp): init iPtr->threadIdhobbs2006-08-301-1/+2
|
* * generic/tclBasic.c: Revised handling of TCL_EVAL_* flags todgp2006-03-061-28/+19
| | | | | * tests/parse.test: simplify TclEvalObjvInternal and to correct the auto-loading of alias targets (parse-8.12). [Bug 1444291].
* * generic/tclBasic.c: Corrections to be sure that TCL_EVAL_GLOBALdgp2006-02-281-2/+13
| | | | | | * tests/parse.test: evaluations act the same as [uplevel #0] * tests/trace.test: evaluations, even when execution traces or invocations of [::unknown] are present. [Bug 1439836].
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken):Miguel Sofer2005-11-181-8/+8
| | | | | | | | * generic/tclCmdMZ.c (TraceCommandProc): * generic/tclInt.h (NS_KILLED): * generic/tclNamesp.c (Tcl_DeleteNamespace * tests/namespace.test (namespace-7.3-6): * tests/trace.test (trace-20.13-16): fix [Bugs 1355942/1355342].
* * generic/tclBasic.c:Miguel Sofer2005-10-231-8/+14
| | | | | | | | | | | | | | | | | | | | | * 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/tclBasic.c (Tcl_CallWhenDeleted): Converted to usedgp2005-07-261-9/+6
| | | | | per-thread counter, rather than a process global one that required mutex protection. [RFE 1077194]
* * generic/tclBasic.c: Made the walk of the active trace list awaredgp2005-06-211-3/+10
| | | | | | * generic/tclCmdMZ.c: of the direction of trace scanning, so the * generic/tclInt.h: proper correction can be made. [Bug 1224585] * tests/trace.test (trace-34.2,3):
* * generic/tclBasic.c (Tcl_DeleteTrace): Added missing walk of thedgp2005-06-211-1/+15
| | | | | * tests/trace.test (trace-34.1): list of active traces to cleanup references to traces being deleted. [Bug 1201035]
* * generic/tclBasic.c (Tcl_EvalEx,TclEvalTokensStandard):dgp2005-03-181-14/+21
| | | | | | | | | * generic/tclCmdMZ.c (Tcl_SubstObj): * tests/basic.test (basic-46.4): Restored recursion limit * tests/parse.test (parse-19.*): testing in nested command substitutions within direct script evaluation (Tcl_EvalEx) that got lost in the parser reforms of Tcl 8.1. Added tests for correct behavior. [Bug 1115904]
* added commentsMiguel Sofer2005-02-101-1/+6
|
* * generic/tclBasic.c (Tcl_EvalObjEx):Miguel Sofer2005-02-101-3/+20
| | | | | | * tests/basic.test (basic-26.2): preserve the arguments passed to TEOV in the pure-list branch, in case the list shimmers away. Fix for [Bug 1119369], reported by Peter MacDonald.
* * generic/tclBasic.c (Tcl_ExprBoolean, Tcl_ExprDouble)hobbs2005-01-281-4/+46
| | | | (Tcl_ExprLong): Fix to recognize Tcl_WideInt type. [Bug 1109484]
* fix for buffer overflow in [subst], [Bug 1036649]Miguel Sofer2004-09-291-1/+11
|
* * generic/tclMain.c (Tcl_Main, StdinProc): Append newline onlydgp2004-07-281-3/+5
| | | | | | * tests/basic.test (basic-46.1): to incomplete scripts as part of multi-line script construction. Do not add an extra trailing newline to the complete script. [Bug 833150]
* * generic/tclBasic.c: Save and restore the iPtr->flag bits thatdgp2003-10-081-1/+6
| | | | | | | control the state of errorCode and errorInfo management when calling "leave" execution traces, so that all error information of the traced command is still available whether traced or not. [Bug 760947] Thanks to Yahalom Emet.
* * generic/tclBasic.c: Fixed error in ref count management of commanddgp2003-10-031-6/+4
| | | | | * generic/tclCmdMZ.c: and execution traces that caused access to freed memory in trace-32.1. [Bug 811483].
* * generic/tclBasic.c (CallCommandTraces): Added safety bitdgp2003-09-291-4/+9
| | | | | | | | * tests/trace.test: masking to prevent any of the bit values TCL_TRACE_*_EXEC from leaking into the flags field of any Command struct. This does not fix [Bug 811483] but helps to contain some of its worst symptoms. Also backported the corrections to test trace-28.4 from Vince Darley.
* * generic/tclBasic.c: Corrected several instances of unsafedgp2003-07-181-20/+39
| | | | | | | * 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:
* * generic/tclBasic.c:Miguel Sofer2003-06-101-22/+14
| | | | | | | * generic/tclExecute.c: let TclExecuteObjvInternal call TclInterpReady instead of relying on its callers to do so; fix for the part of [Bug 495830] that is new in 8.4. * tests/interp.test: Added tests 18.9 (knownbug) and 18.10
* * generic/tclBasic.c (TclInvokeObjectCommand): objv[argc] is nodgp2003-05-121-4/+3
| | | | | longer set to NULL (Tcl_CreateObjCommand docs already say that it should not be accessed).
* Corrected error message for grammar and spelling.dkf2003-05-051-3/+3
|
* * generic/tclBasic.c: Tcl_EvalObjv() failed to honor thedgp2003-04-251-4/+8
| | | | | | TCL_EVAL_GLOBAL flag when resolving command names. Tcl_EvalEx passed a string rep including leading whitespace and comments to TclEvalObjvInternal().
* * generic/tclBasic.c (TclRenameCommand): fixing error in previousMiguel Sofer2003-02-181-2/+1
| | | | commit.
* * generic/tclBasic.c (TclRenameCommand): 'oldFullName' object wasMiguel Sofer2003-02-181-7/+13
| | | | | not being freed on all function exits, causing a memory leak [Bug 684756]
* Don Porter's fix for bad parsing of nested scripts [Bug 681841].Miguel Sofer2003-02-161-68/+92
|
* * generic/tclBasic.c: Changed [trace add command] so that 'rename' Kevin B Kenny2003-02-031-4/+25
| | | | | | | | | | callbacks get fully qualified names of the command. [Bug 651271]. ***POTENTIAL INCOMPATIBILITY*** * tests/trace.test: Modified the test cases for [trace add command] to expect fully qualified names on the 'rename' callbacks. Added a case for renaming a proc within a namespace. * doc/trace.n: Added language about use of fully qualified names in trace callbacks.
* execution trace, command trace and stringObj bug fixesvincentdarley2003-01-171-21/+27
|
* * generic/tclBasic.c (TclRenameCommand,CallCommandTraces):dgp2002-09-061-6/+21
| | | | | | * tests/trace.test (trace-27.1): Corrected memory leak when a rename trace deleted the command being traced. Test added. Thanks to Hemang Lavana for the fix. [Bug 604609]
* * generic/tclBasic.c:Miguel Sofer2002-08-221-3/+2
| | | | | * generic/tclCmdMZ.c: fix for freed memory r/w in delete traces [Bug 589863], patch by Hemang Lavana.
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* bugfix, new tests for new [interp alias] codeMiguel Sofer2002-07-291-6/+12
|
* Fix for [Bug 582522] - aliases now fire execution traces on the targetMiguel Sofer2002-07-291-5/+5
| | | | command. Optimisation of alias invocation.
* Global symbols are now all either prefixed with 'tcl' (or 'Tcl' or ...) or ↵dkf2002-07-191-2/+2
| | | | have file-scope.
* * generic/tclBasic.c (CallCommandTraces): delete traces now receiveMiguel Sofer2002-07-181-3/+17
| | | | the FQ old name of the command. [Bug 582532] (Don Porter)
* using the new variable name caching possibilities when setting errorMiguel Sofer2002-07-161-9/+9
| | | | results in (Tcl_AddObjErrorInfo) and (TclUpdateReturnInfo)
* fix for [Bug 571385]Miguel Sofer2002-06-201-9/+12
|
* Added parens for claritydgp2002-06-201-3/+4
|
* * doc/CrtTrace.3: Added TIP#62 implementation of commandhobbs2002-06-171-98/+99
| | | | | | | | | | | | | | | * doc/trace.n: execution tracing [FR #462580] (lavana). * generic/tcl.h: This includes enter/leave tracing as well * generic/tclBasic.c: as inter-procedure stepping. * generic/tclCmdMZ.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclVar.c: * tests/trace.test:
* fixed [Bug 568123]Miguel Sofer2002-06-121-2/+2
|
* optimised read access to local variables created at run-timeMiguel Sofer2002-06-111-4/+4
|