summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | * generic/tclVar.c: improved localVarNameType caching to leverageMiguel Sofer2007-08-171-9/+42
| | | | | | | | | | the new availability of Tcl_Obj in variable names, avoiding string comparisons to verify that the cached value is usable.
* | modifs to help itcl adapt to VarReformMiguel Sofer2007-08-041-2/+19
| |
* | Tidying up.dkf2007-08-031-207/+258
| |
* | Abstracted the 'offsetof' to a TclOffset macro as per Tk_Offset to permitpatthoyts2007-08-011-2/+2
| | | | | | | | compilation with MSVC6 and anything else that may not define this macro.
* | * generic/tclVar.c (TclCleanupVar): fix [Bug 1765225], thx LarryMiguel Sofer2007-08-011-2/+2
| | | | | | | | Virden.
* | VarReform [Patch 1750051]Miguel Sofer2007-07-311-777/+1550
| | | | | | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* | * generic/tclVar.c (UnsetVarStruct): fix possible segfault withMiguel Sofer2007-06-281-5/+6
| | | | | | | | recent streamlining.
* | * generic/tclVar.c (UnsetVarStruct): more streamlining.Miguel Sofer2007-06-261-10/+8
| |
* | * generic/tclVar.c (UnsetVarStruct): fixing incomplete change,Miguel Sofer2007-06-251-24/+25
| | | | | | | | more streamlining.
* | * generic/tclVar.c (UnsetVarStruct): fixing incomplete changeMiguel Sofer2007-06-251-2/+2
| |
* | * generic/tclVar.c (TclDeleteCompiledLocalVars): removed inliningMiguel Sofer2007-06-241-57/+62
| | | | | | | | | | | | that ended up not really optimising (limited benchmarks). Now calling UnsetVarStruct (streamlined old code is #ifdef'ed out, in case better benchmarks do show a difference).
* | * generic/tclVar.c (UnsetVarStruct): fixed a leak introduced inMiguel Sofer2007-06-241-1/+8
| | | | | | | | last commit.
* | * generic/tclVar.c (UnsetVarStruct, TclDeleteVars): made the logicMiguel Sofer2007-06-231-177/+90
| | | | | | | | | | | | | | | | | | slightly clearer, eliminated some duplicated code. *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and Var struct users) The core never builds VAR_LINK variable to have traces. Such a "monster", should one exist, will now have its unset traces called *before* it is unlinked.
* | * generic/tclVar.c: streamline namespace vars deletion: onlyMiguel Sofer2007-06-201-11/+46
| | | | | | | | compute the variable's full name if the variable is traced.
* | * generic/tclInt.h:Miguel Sofer2007-06-101-3/+3
| | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclvar.c: new macros TclGetCurrentNamespace() and TclGetGlobalNamespace(); Tcl_GetCommandFromObj and TclGetNamespaceFromObj rewritten to make the logic clearer; slightly faster too.
* | Minor whitespace cleanupdkf2007-05-111-1/+6
| |
* | [Tcl Bug 1706140]dgp2007-05-071-48/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclLink.c (LinkTraceProc): Update Tcl_VarTraceProcs so that * generic/tclNamesp.c (Error*Read): they call Tcl_InterpDeleted() * generic/tclTrace.c (Trace*Proc): for themselves, and do not rely * generic/tclUtil.c (TclPrecTraceProc): on (frequently buggy) setting of the TCL_INTERP_DESTROYED flag by the trace core. * generic/tclVar.c: Update callers of TclCallVarTraces to not pass in the TCL_INTERP_DESTROYED flag. Also apply filters so that public routines only pass documented flag values down to lower level routines. * generic/tclTrace.c (TclCallVarTraces): The setting of the TCL_INTERP_DESTROYED flag is now done entirely within the TclCallVarTraces routine, the only place it can be done right.
* | * generic/tclVar.c (TclPtrSetVar): fixed leak whenever newvaluePtrMiguel Sofer2007-05-021-2/+7
| | | | | | | | | | had refCount 0 and was used for appending (but not lappending). [Bug 1710710], thanks to mistachkin and kbk.
* | * generic/tclVar.c (UnsetVarStruct): Make sure thedgp2007-04-231-2/+2
| | | | | | | | | | TCL_INTERP_DESTROYED flags gets passed to unset trace routines so they can respond appropriately. [Bug 1705778, leak #9]
* | * generic/tclVar.c (TclDeleteNamespaceVars): fixed access to freedMiguel Sofer2007-04-231-3/+2
| | | | | | | | memory detected by valgrind.
* | Replaced commas in varargs with string concatenation where possible [Patch ↵Kevin B Kenny2007-04-201-3/+3
| | | | | | | | 1515234]
* | * generic/tclBasic.c: Added bytecode compilers for theMiguel Sofer2007-04-031-2/+3
| | | | | | | | | | | | | | | | * generic/tclCompCmds.c: variable linking commands: 'global', * generic/tclCompile.h: 'variable', 'upvar', 'namespace upvar' * generic/tclExecute.c: [Patch 1688593] * generic/tclInt.h: * generic/tclVar.c:
* | * generic/tclVar.c (TclArraySet): Make efficient private copy ofdgp2007-03-121-3/+6
| | | | | | | | | | * tests/var.test (var-17.1): the "list" argument to [array set] to avoid crash due to shimmering invalidating pointers. [Bug 1669489].
* | various "const" additions, in line with TIP #27nijtmans2007-02-201-105/+105
| |
* | Cleaning up of various bits in tclVar.c to make code clearer to understand.dkf2006-10-271-38/+41
| |
* | * generic/tcl.h: Modified the Tcl call stack soMiguel Sofer2006-10-231-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: there is always a valid CallFrame, even * generic/tclCmdIL.c: at level 0 [Patch 1577278]. Most of the * generic/tclInt.h: changes involve removing tests for * generic/tclNamesp.c: iPtr->(var)framePtr==NULL. There is now a * generic/tclObj.c: CallFrame pushed at interp creation * generic/tclProc.c: with a pointer to it stored in * generic/tclTrace.c: iPtr->rootFramePtr. A second unused * generic/tclVar.c: field in Interp is hijacked to enable further functionality, currently unused (but with several FRQs depending on it).
* | Undo mistaken commit to wrong branch caused by CVS fumble... :-}dkf2006-10-201-17/+12
| |
* | Consolidated TIP#257 patch applied to HEAD to allow for experimentation bydkf2006-10-201-12/+17
| | | | | | | | other developers
* | * generic/tclVar.c (Tcl_LappendObjCmd):Miguel Sofer2006-10-051-2/+7
| | | | | | | | | | * tests/append.test(4.21-22): fix for longstanding [Bug 1570718], lappending nothing to non-list. Reported by lvirden
* | Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-10/+6
| |
* | TIP#215 IMPLEMENTATIONdgp2006-02-091-5/+5
| | | | | | | | | | | | | | | | | | | | * doc/incr.n: Revised [incr] to auto-initialize when varName * generic/tclExecute.c: argument is unset. [Patch 1413115]. * generic/tclVar.c: * tests/compile.test: * tests/incr-old.test: * tests/incr.test: * tests/set.test:
* | Minor style fixesdkf2006-02-021-16/+15
| |
* | TIP#250 IMPLEMENTATIONdgp2006-02-011-20/+62
| | | | | | | | | | | | | | | | | | * doc/namespace.n: New command [namespace upvar]. [Patch 1275435] * generic/tclInt.h: * generic/tclNamesp.c: * generic/tclVar.c: * tests/namespace.test: * tests/upvar.test:
* | * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
* | Tidy updkf2005-11-071-41/+47
| |
* | * generic/tclBinary.c:Miguel Sofer2005-11-041-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* | * generic/tclInt.h:Miguel Sofer2005-11-041-70/+191
| | | | | | | | | | | | | | | | * generic/tclNamesp.c: * generic/tclVar.c: * tests/trace.test: fix for [Bugs 1338280/1337229]; changed to use the same approach as the 8.4 patch in the ticket (i.e., removed the patch committed on 2005-31-10).
* | ANSIfy (though only partially - function decls only - for tclExecute.c)dkf2005-11-021-190/+194
| |
* | Partial ANSIfydkf2005-11-021-213/+209
| |
* | * generic/tclClock.c: Removed some dead code.dgp2005-10-191-325/+1
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclLiteral.c: * generic/tclParseExpr.c: * generic/tclScan.c: * generic/tclUtil.c: * generic/tclVar.c:
* | TIP#237 IMPLEMENTATIONdgp2005-10-081-1/+130
| | | | | | | | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* | Getting more systematic about styledkf2005-07-231-18/+28
| |
* | Style-guide reformat and get rid of gcc warningdkf2005-07-051-1360/+1355
| |
* | * generic/tclInt.h: Reduced the Tcl_ObjTypes "index",dgp2005-06-071-6/+6
| | | | | | | | | | | | | | * generic/tclIndexObj.c: "enembleCmd", "localVarName", and * generic/tclNamesp.c: "levelReference" to file static scope. * generic/tclProc.c: * generic/tclVar.c:
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * generic/tclInt.decls: Converted TclMatchIsTrivial to a macro.dgp2005-05-051-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: * generic/tclUtil.c: * generic/tclIntDecls.h: `make genstubs` * generic/tclStubInit.c: * generic/tclBasic.c: Added callers of TclMatchIsTrivial where * generic/tclCmdIL.c: a search can be done more efficiently * generic/tclCompCmds.c:when it is recognized that a pattern match * generic/tclDictObj.c: is really an exact match. [Patch 1076088] * generic/tclIO.c: * generic/tclNamesp.c: * generic/tclVar.c:
* | * generic/Var.c (Tcl_ArrayObjCmd - ARRAY_NAMES): fix Tcl_Obj leakMiguel Sofer2005-04-161-2/+2
| | | | | | | | [Bug 1084111]
* | * generic/tclVar.c: converted a few function calls to macros.Miguel Sofer2005-04-031-23/+23
| |
* | Changed the internal representation of lists to (a) reduce the malloc/freeMiguel Sofer2005-04-021-54/+12
| | | | | | | | | | | | | | | | calls at list creation (from 2 to 1), (b) reduce the cost of handling empty lists (we now never create a list internal rep for them), (c) allow refcounting of the list internal rep. The latter permits insuring that the pointers returned by Tcl_ListObjGetElements remain valid even if the object shimmers away from its original list type. This is [Patch 1158008]
* | changing the isProcCallFrame field of the CallFrame struct from a 0/1 fieldMiguel Sofer2004-12-141-10/+11
| | | | | | | | to flags. Should be perfectly backwards compatible.