summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclVar.c (DisposeTraceResult, CallVarTraces): add properhobbs2002-11-121-3/+3
| | | | static declarations.
* * generic/tclVar.c: Fixed code that check for proper # of args todgp2002-10-171-2/+2
| | | | * tests/var.test: [array names]. Added test. [Bug 624755]
* * generic/tclVar.c (TclDeleteVars): Corrected logic for setting thedgp2002-09-051-2/+5
| | | | TCL_INTERP_DESTROYED flag when calling variable traces. [Tk Bug 605121]
* * generic/tclVar.c (DeleteArray): leak plug [Bug 604239]. ThanksMiguel Sofer2002-09-041-1/+14
| | | | to dkf and dgp for the long and difficult discussion in the chat.
* (Tcl_UpVar2): code cleanup to not use gotohobbs2002-09-031-9/+6
|
* * generic/tclVar.c (Tcl_UpVar2): a Tcl_Obj was being leaked onMiguel Sofer2002-09-031-2/+4
| | | | error return from TclGetFrame.
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-47/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * generic/tclVar.c (TclObjLookupVar): leak fix and improvedMiguel Sofer2002-07-271-19/+26
| | | | comments.
* * generic/tclVar.c (TclLookupVar): removed early returns thathobbs2002-07-261-15/+11
| | | | | prevented the parens from being restored. also removed goto label as it was not necessary.
* * generic/tclVar.c (DupParsedVarName): nasty bug fixedMiguel Sofer2002-07-171-6/+7
|
* * generic/tclVar.c (TclPtrIncrVar): missing CONST in declarations,Miguel Sofer2002-07-171-3/+3
| | | | inconsistent with tclInt.h
* removing the now redundant functions Tcl(Get|Set|Incr)IndexedScalar()Miguel Sofer2002-07-171-1002/+1
| | | | and Tcl(Get|Set|Incr)ElementOfIndexedArray()
* variable access optimisationsMiguel Sofer2002-07-171-1012/+1004
|
* style guide fixesdgp2002-07-161-72/+103
|
* * generic/tclVar.c: inaccurate comment fixedMiguel Sofer2002-07-161-3/+4
|
* * generic/tclVar.c: refactorisation to reuse already looked-up VarMiguel Sofer2002-07-151-491/+1281
| | | | | | | | | | | | | | | | | | pointers; definition of three new Tcl_Obj types to cache variable name parsing and lookup for later reuse; modification of internal functions to profit from the caching. * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclNamesp.c: adding CONST qualifiers to variable names passed to Tcl_FindNamespaceVar and to variable resolvers; adding CONST qualifier to the 'msg' argument to TclLookupVar. Needed to avoid code duplication in the new tclVar.c code. * tests/set-old.test: * tests/var.test: slight modification of error messages due to the modifications in the tclVar.c code.
* * doc/CrtTrace.3: Added TIP#62 implementation of commandhobbs2002-06-171-32/+32
| | | | | | | | | | | | | | | * 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:
* consolidated opcodes in the bytecode engine, eliminating duplicatedMiguel Sofer2002-06-131-13/+17
| | | | | code. Added the new (but pre-existent in tcl.h) possible flag bit TCL_TRACE_READS to Tcl_(Obj)?SetVar.*
* * Refactored CallTraces to collect repeateddgp2002-03-291-257/+124
| | | | handling of its returned value into CallTraces itself.
* * Updated interfaces of generic/tclVar.c accordingdgp2002-03-201-21/+25
| | | | to TIP 27. In particular, the "part2" arguments were CONSTified.
* * generic/tclVar.c (Tcl_ArrayObjCmd): removed extra obj allocation.hobbs2002-02-271-10/+8
|
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-29/+89
| | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.
* * [Patch 505630] Updated interfaces of generic/tclBasic.cc (TIP 27).dgp2002-01-251-3/+3
| | | | | | | * [Patch 506818] Updated interfaces of generic/tclHash.c (TIP 27). * [Patch 506807] Updated interfaces of generic/tclObj.c (TIP 27). * [Patch 507304] Updated interfaces of win/tclWin32.c (TIP 27). * Update all callers.
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-7/+7
| | | | | | | | | | | 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.
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-3/+3
| | | | | | | overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines.
* restored consistency in refCount accounting by array traces [Bug #4484339]Miguel Sofer2001-12-071-2/+4
|
* new algorithm for [array get], safe when there are traces that modify the ↵Miguel Sofer2001-12-051-8/+67
| | | | array [Bug #449893].
* Tcl_Preserve'ing VarTrace structures to avoid memory corruption [Bug: 484334]Miguel Sofer2001-11-301-6/+14
|
* Changes due to TIP#68; memory handling in variable traces is now correct!dkf2001-11-191-34/+219
|
* Reference implementation of TIP's #22, #33 and #45. Adds thehobbs2001-11-141-2/+3
| | | | | | ability of the [lindex] command to have multiple index arguments, and adds the [lset] command. Both commands are byte-code compiled. [Patch #471874] (work by Kenny, commited by Hobbs)
* * tests/var.test:dgp2001-11-091-2/+2
| | | | | * generic/tclVar.c: Corrected bug in [global] when dealing with variable names matching :*. [Bug 480176]
* * Updated APIs indgp2001-09-271-7/+7
| | | | | generic/tclProc.c and generic/tclVar.c according to the guidelines of TIP 27. [Patch 465442]
* * generic/tclVar.c: removed comments referring to unused flag TCL_PARSE_PART1.Miguel Sofer2001-09-251-6/+4
|
* insure that [array] traces work for undefined vars [bug: 449094]Miguel Sofer2001-08-101-8/+14
|
* * tests/var.test:hobbs2001-07-041-1/+6
| | | | | * generic/tclVar.c (Tcl_VariableObjCmd): added patch to check for number of args. [Patch #426038]
* * generic/tclVar.c (Tcl_GetVar2Ex): added ability to recognizehobbs2001-07-031-17/+64
| | | | | | | | | | | TCL_TRACE_READS flags to cause creation of part1 in TclLookupVar to make sure newly created array will get read traces triggered appropriately. This is called by Tcl_ObjGetVar2, Tcl_GetVar, and Tcl_GetVar2. (TclSetIndexedScalar, TclSetElementOfIndexedArray): added read trace triggering for lappend case. (Tcl_LappendObjCmd): pass TCL_TRACE_READS to Tcl_ObjGetVar2 to trigger possible read traces for new arrays.
* [Patch #424851]: Faster array searching & obj cleanupMiguel Sofer2001-05-261-27/+116
|
* * generic/tclBasic.c: added new CompileProc invocations to basichobbs2001-05-171-82/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command initialization. * generic/tclCompCmds.c: added new compile commands for append, lappend, lindex and llength. Refactored set and incr compile commands to use new TclPushVarName function for handling the varname component during compilation (also used by append and lappend). Changed string compile command to compile toplevel code as well (when possible). * generic/tclCompile.c: added new instruction enums * generic/tclCompile.h: added debug info for new instructions * generic/tclExecute.c (TclExecuteByteCode): moved elemPtr to toplevel var (oft-used). Added definitions for new bytecode instructions INST_LIST_INDEX, INST_LIST_LENGTH, INST_APPEND_SCALAR1, INST_APPEND_SCALAR4, INST_APPEND_ARRAY1, INST_APPEND_ARRAY4, INST_APPEND_ARRAY_STK, INST_APPEND_STK, INST_LAPPEND_SCALAR1, INST_LAPPEND_SCALAR4, INST_LAPPEND_ARRAY1, INST_LAPPEND_ARRAY4, INST_LAPPEND_ARRAY_STK, INST_LAPPEND_STK. Refactored repititious code for reuse with INST_LOAD_STK (same as INST_LOAD_SCALAR_STK), INST_STORE_STK (same as INST_STORE_SCALAR_STK). Updated INST_STR_CMP with style of fix of 2001-04-06 Fellows [Bug #219201] as that fix only affected the runtime eval'ed "string" (string compare is normally byte-compiled now). We may want to back these out for speed in the future, noting the problems with \x00 comparisons in the docs. * generic/tclInt.h: declarations for new compile commands. * generic/tclVar.c: change TclGetIndexedScalar, TclGetElementOfIndexedArray, TclSetElementOfIndexedArray and TclSetIndexedScalar to use flags. The Set functions now support TCL_APPEND_ELEMENT and TCL_LIST_ELEMENT as well. * generic/tclInt.decls: * generic/tclIntDecls.h: minor signature changes for above.
* Added several missing CONSTs in calls to TclGetNamespaceForQualNameKevin B Kenny2001-04-271-3/+3
|
* * generic/tclVar.c (Tcl_ArrayObjCmd): Corrected retrieval ofhobbs2001-03-241-2/+9
| | | | resultPtr to prevent possible corruption.
* Made [unset] command behave as documented when no arguments present.dkf2001-03-131-2/+8
|
* Fixed two faults with [unset -nocomplain]; one with a possible overrundkf2001-03-061-11/+17
| | | | of the argument array, and another with the documentation.
* Finally fixed bug 119192. This was a real nasty that was hidden bydkf2000-11-171-24/+15
| | | | | | | the fact that it never caused a crash and was blocked most of the time from coming into play by the way the compiler handles array variable references. (Yes, the test suite does pass now on this machine at least...)
* * generic/tclVar.c (TclLookupVar): reverted fix below as it brokehobbs2000-11-151-9/+9
| | | | all other array unset error reporting. Bug-119192 is still open.
* Fixed bug 119192 which was causing variable names to be reporteddkf2000-11-151-9/+9
| | | | incorrectly in some circumstances.
* * generic/tclVar.c (TclVarTraceExists): Corrected excessive memhobbs2000-11-011-18/+17
| | | | | use when info exists was called on a non-existent array element. [BUG: 119213, 119336]
* * tests/trace.test: Extended array tracing tests.ericm2000-08-251-2/+3
| | | | | | | | | | * doc/trace.n: Clarified information about when array traces will be fired. * generic/tclVar.c (Tcl_ArrayObjCmd): Corrected call to CallTraces (for TCL_TRACE_ARRAY) to only be called when the variable is either an array or is undefined, to ensure that array traces do not fire for scalar variables.
* * doc/trace.n: Updated documentation for new syntax; flagged oldericm2000-08-251-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | syntax as deprecated; added documentation for command rename/delete traces and variable array traces. * tests/trace.test: Updated tests for new trace syntax; new tests for command rename/delete traces; new tests for array traces. * generic/tclVar.c: Support for new trace syntax; support for TCL_TRACE_ARRAY. * generic/tclStubInit.c: * generic/tclDecls.h: * generic/tcl.decls: Stub functions for command rename/delete traces. * generic/tcl.h: * generic/tclInt.h: * generic/tclBasic.c: Support for command traces. * generic/tclCmdMZ.c (TclTraceVariableObjCmd): Patched to support new [trace] syntax: trace {add|remove|list} {variable|command} name ops command Added support for command traces (rename, delete operations). Added support for TCL_TRACE_ARRAY at Tcl level (array operation for variable traces).
* Added check for non-arrays for [array statistics].ericm2000-08-211-1/+6
|
* * generic/tclVar.c (CallTraces): Added check for VAR_TRACE_ACTIVEericm2000-07-251-2/+2
| | | | | | | on the array containing the variable before executing traces on that array, to conform with normal variable traces and the documentation, which states that while executing a trace, other traces on that variable are disabled. [Bug: 6049].