summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
Commit message (Collapse)AuthorAgeFilesLines
* [Bug 3508771] Wrong Tcl_StatBuf used on MinGWjan.nijtmans2012-03-271-1/+1
|\ | | | | | | [Bug 2015723] duplicate inodes from file stat on windows (but now for cygwin as well)
| * [Bug 3508771] Wrong Tcl_StatBuf used on MinGWjan.nijtmans2012-03-271-1/+1
| |\ | | | | | | | | | [Bug 2015723] duplicate inodes from file stat on windows (but now for cygwin as well)
| | * fix gcc warning signed<->unsigned warning for cygwinjan.nijtmans2012-03-261-1/+1
| | |
| | * [Bug 2935503]: Windows: file mtime sets wrong timejan.nijtmans2011-11-221-0/+5
| | |
| | * [Bug 3388350] mingw64 compiler warningsjan.nijtmans2011-08-161-0/+1
| | | | | | | | | | | | n mingw, sys/stat.h must be included before winsock2.h, so make sure of that
* | | 3479689 New internal routine TclJoinPath().dgp2012-01-271-1/+1
| | | | | | | | | | | | Refactor all the *Join*Path* routines to give them more useful interfaces that are easier to manage getting the refcounts right.
* | | Make [file] itself be safe, to reduce breakage in existing code. [Bug 3211758]dkf2011-09-261-0/+11
| | |
* | | Fix eval's faulty objProc, it was actually an nreProc [3399564|Bug 3399564]. ↵mig2011-08-291-0/+10
| | | | | | | | | | | | Thanks to Joe Mistachkin for detection and analysis.
* | | More generation of error codes (miscellaneous commands mostly already handled).dkf2011-04-041-0/+10
| | |
* | | Better error-message in case of errors related to setting a variablejan.nijtmans2011-04-041-8/+2
| | |
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-1/+1
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | 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.
| | * * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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:Miguel Sofer2005-10-231-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * Fix [Bug 1284178] and tweak tests to accommodate.dkf2005-10-131-2/+6
| | |
| | * * generic/tclCmdAH.c New "encoding" Tcl_ObjType (not registered)dgp2005-07-051-9/+6
| | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c that permits longer lifetimes of the * generic/tclInt.h Tcl_Encoding values kept as intreps of Tcl_Obj's. Reduces the need for repeated reading of encoding definition files from the filesystem. [Bug 1077262]
| | * Fix bug in [format %hx] handling on selected platforms. [Bug 1154163]dkf2005-06-171-16/+22
| | |
| | * removed erroneous comment [Bug 1029518]Miguel Sofer2004-10-301-7/+1
| | |
| | * * tests/socket.test (socket-13.1): Balanced [makeFile] anddgp2004-10-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | [removeFile] commands. * generic/tclCmdAH.c (Tcl_FormatObjCmd): Restored missing line from yesterdays' 868486 backport that caused failed alloc's on LP64 systems.
| | * backport fixes for 868489 and 1026125Kevin B Kenny2004-10-271-47/+13
| | |
| | * fix to 'file normalize ~nobody' crashvincentdarley2003-12-121-1/+4
| | |
| | * Changed FILE_ to FCMD_ to prevent symbol/#def collisions. [Bug 822528]dkf2003-10-221-45/+45
| | |
| | * Consequent fixes from [Bug 699060]; [format] should not be too eager to demotedkf2003-05-141-2/+9
| | | | | | | | | | | | wides to ints, and should throw errors when appropriate.
| | * * generic/tcl.h Made changes so that the "wideInt" Tcl_ObjTypedgp2003-04-161-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclObj.c is defined on all platforms, even those where * generic/tclPort.h TCL_WIDE_INT_IS_LONG is defined. Also made the Tcl_Value struct have a wideValue field on all platforms. This is a ***POTENTIAL INCOMPATIBILITY*** for TCL_WIDE_INT_IS_LONG platforms because that struct changes size. This is the same TIP 72 incompatibility that was seen on other platforms at the 8.4.0 release, when this change should have happened as well. [Bug 713562] * generic/tclInt.h: New internal macros TclGetWide() and TclGetLongFromWide() to deal with both forms of the "wideInt" Tcl_ObjType, so that conditional TCL_WIDE_INT_IS_LONG code is confined to the header file. * generic/tclCmdAH.c: Replaced most coding that was conditional * generic/tclCmdIL.c: on TCL_WIDE_INT_IS_LONG with code that * generic/tclExecute.c: works across platforms, sometimes using * generic/tclTest.c: the new macros above to do it. * generic/tclUtil.c: * generic/tclVar.c:
| | * Use correct test for the empty string in Tcl_ErrorObjCmddkf2003-04-081-2/+2
| | |
| | * Made format less keen on converting numeric types. [Bug #699060]dkf2003-03-141-9/+42
| | |
| | * Backport of fix for 698146 to remove assumption that time_t is a long...dkf2003-03-141-7/+9
| | |
| | * * generic/tclCmdAH.c (Tcl_FormatObjCmd): Only add the modifierdkf2003-03-141-149/+159
| | | | | | | | | | | | | | | | | | that indicates we've got a wide int when we're formatting in an integer style. Stops some libc's from going mad. [Bug #702622] Also tidied whitespace.
| * | * generic/tclCmdAH.c: Fix cases where value returned bydgp2010-09-231-1/+2
| | | | | | | | | | | | | | | | | | * generic/tclEvent.c: Tcl_GetReturnOptions() was leaked. * generic/tclMain.c: Thanks to Jeff Hobbs for discovery of the anti-pattern to seek and destroy.
| * | [Bug 942170]: Detect the st_blocks field of 'struct stat' correctly.dkf2009-12-281-8/+11
| | |
| * | * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* | | Fix gcc -Wextra warning: missing initializernijtmans2010-12-101-37/+37
| | |
* | | * generic/tclCmdAH.c (TclInitFileCmd, TclMakeFileCommandSafe, ...):dkf2010-12-091-665/+1120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break up [file] into an ensemble. Note that the ensemble is safe in itself, but the majority of its subcommands are not. * generic/tclFCmd.c (FileCopyRename,TclFileDeleteCmd,TclFileAttrsCmd) (TclFileMakeDirsCmd): Adjust these subcommand implementations to work inside an ensemble. (TclFileLinkCmd, TclFileReadLinkCmd, TclFileTemporaryCmd): Move these subcommand implementations from tclCmdAH.c, where they didn't really belong. * generic/tclIOCmd.c (TclChannelNamesCmd): Move to more appropriate source file. * generic/tclEnsemble.c (TclMakeEnsemble): Start of code to make partially-safe ensembles. Currently does not function as expected due to various shortcomings in how safe interpreters are constructed. * tests/cmdAH.test, tests/fCmd.test, tests/interp.test: Test updates to take into account systematization of error messages.
* | | * generic/tclCmdAH.c: Fix cases where value returned bydgp2010-09-231-1/+2
| | | | | | | | | | | | | | | | | | * generic/tclEvent.c: Tcl_GetReturnOptions() was leaked. * generic/tclMain.c: Thanks to Jeff Hobbs for discovery of the anti-pattern to seek and destroy.
* | | * generic/tclBasic.c: New implementation for [tailcall]:Miguel Sofer2010-08-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: it now schedules the command and returns * generic/tclCmdMZ.c: TCL_RETURN. This fixes all issues with * generic/tclExecute.c: [catch] and [try] - [Bug 3046594], * generic/tclInt.h: [Bug 3047235] and [Bug 3048771]. Thanks * generic/tclNamesp.c: dgp for exploring the dark corners. * tests/tailcall.test: More thorough testing is required.
* | | * generic/tclBasic.c: Redesign of [tailcall] toMiguel Sofer2010-08-181-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: (a) fix #3047235 * generic/tclCompile.h: (b) enable fix for #3046594 * generic/tclExecute.c: (c) enable recursive tailcalls * generic/tclInt.h: * generic/tclNamesp.c: * tests/tailcall.test:
* | | Code Audit results:dkf2010-03-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | | [Bug 942170]: Detect the st_blocks field of 'struct stat' correctly.dkf2009-12-281-3/+6
| | |
* | | Eliminate various gcc warnings (in -Wextra mode)nijtmans2009-11-181-2/+2
| | |
* | | Make interpreted [for] and [while] NRE-safe. [Bug 2823276]dkf2009-08-191-61/+121
| | |
* | | Change ForIterData, make it const-safe.nijtmans2009-08-161-2/+2
| | |
* | | TIP #353 IMPLEMENTATIONdgp2009-08-121-9/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/NRE.3: New public routine Tcl_NRExprObj() permits * generic/tcl.decls: extension commands to evaluate Tcl expressions * generic/tclBasic.c: in NR-enabled command procedures. * generic/tclCmdAH.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclObj.c: * tests/expr.test: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
* | | minor cleanupsdgp2009-07-241-2/+2
| | |
* | | * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex,andreas_kupries2009-07-141-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TclCleanupByteCode, TclCompileScript): * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): * tclCompile.h (ExtCmdLoc): * tclInt.h (ExtIndex, CFWordBC, CmdFrame): * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter, TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT, RESTORE_CONTEXT, NRCoroutineExitCallback, TclNRCoroutineObjCmd): * generic/tclCmdAH.c (TclNRForObjCmd, TclNRForIterCallback, ForNextCallback): * generic/tclCmdMZ.c (TclNRWhileObjCmd): Extended the bytecode compiler initialization to recognize the compilation of whole files (NRE enabled 'source' command) and switch to the counting of absolute lines in that case. Further extended the bytecode compiler to track the start line in the generated information, and modified the bytecode execution to recompile an object if the location as per the calling context doesn't match the location saved in the bytecode. This part could be optimized more by using more memory to keep all possibilities which occur around, or by just adjusting the location information instead of a total recompile. Reworked the handling of literal command arguments in bytecode to be saved (compiler) and used (execution) per command (See the TCL_INVOKE_STK* instructions), and not per the whole bytecode. This, and the previous change remove the problems with location data caused by literal sharing (across whole files, but also proc bodies). Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex). The last change causes the hashtable 'lineLABCPtr' to be state which has to be kept per coroutine, like the CmdFrame stack. Reworked the coroutine support code to create, delete and switch the information as needed. Further reworked the tailcall command as well, it has to pop its own arguments when run in a bytecode context to keep a proper stack in 'lineLABCPtr'. Fixed the mishandling of line information in the NRE-enabled 'for' and 'while' commands introduced when both were made to share their iteration callbacks without taking into account that the loop body is found in different words of the command. Introduced a separate data structure to hold all the callback information, as we went over the limit of 4 direct client-data values for NRE callbacks. The above fixes [Bug 1605269].
* | | * generic/tclBasic.c: Fix for (among others) [Bug 2699087]Miguel Sofer2009-03-211-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: Tailcalls now perform properly even from * generic/tclExecute.c: within [eval]ed scripts. * generic/tclInt.h: More tests missing, as well as proper exploration and testing of the interaction with "redirectors" like interp-alias (suspect that it does not happen in constant space) and pure-eval commands.
* | | - eliminate some unnessary type castsnijtmans2009-02-031-4/+4
| | | | | | | | | | | | | | | - some internal const decorations - spacing
* | | More coding style improvements.dkf2009-01-041-40/+40
| | |