summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* Plug memory leak. [Bug 2910044]dkf2009-12-071-1/+9
|
* Eliminate various gcc warnings (in -Wextra mode)nijtmans2009-11-181-25/+25
|
* * generic/tclCmdMZ.c: Replaced TclProcessReturn() calls withdgp2009-09-281-17/+9
| | | | | | * tests/error.test: Tcl_SetReturnOptions() calls as a simple fix for [Bug 2855247]. Thanks to Anton Kovalenko for the report and fix. Additional fixes for other failures demonstrated by new tests.
* TIP #356 IMPLEMENTATIONdgp2009-09-241-2/+2
| | | | | | | | | | * generic/tcl.decls: Promote internal routine TclNRSubstObj() * generic/tclCmdMZ.c: to public Tcl_NRSubstObj(). Still needs docs. * generic/tclCompile.c: * generic/tclInt.h: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
* * generic/tclBasic.c: Completed the NR-enabling of [subst].dgp2009-09-111-10/+12
| | | | | | | | | * generic/tclCmdMZ.c: [Bug 2314561]. * generic/tclCompCmds.c: * generic/tclCompile.c: * generic/tclInt.h: * tests/coroutine.test: * tests/parse.test:
* * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecodedgp2009-09-041-21/+29
| | | | | | | | | | | | | * generic/tclBasic.c: compiler routine for the [subst] command. * generic/tclCmdMZ.c: This is a partial solution to the need to * generic/tclCompile.c: NR-enable [subst] since bytecode execution is * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new * generic/tclExecute.c: bytecode instructions, INST_NOP and * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is * tests/basic.test: likely to be useful in any future effort to * tests/info.test: add a bytecode compiler routine for [try]. * tests/parse.test:
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-7/+20
| | | | | | | | | | | | | | | | | | | | | | | Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript, TclCompileTokens): * 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 the parser, compiler, and execution engine with code and attendant data structures tracking the position of continuation lines which are not visible in the resulting script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* Small tweaksdkf2009-08-201-43/+39
|
* Formatting correctionsdkf2009-08-191-6/+5
|
* Performance boost for [string is].dkf2009-07-201-36/+67
|
* fix 64bit int <-> ptr cast warningsdas2009-07-141-5/+5
|
* * generic/tclInt.h (TclNRSwitchObjCmd):Kevin B Kenny2009-07-141-3/+36
| | | | | | | * generic/tclBasic.c (builtInCmds): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * tests/switch.test (switch-15.1): Make non-bytecoded [switch] command aware of NRE. [Bug 2821401]
* * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex,andreas_kupries2009-07-141-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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].
* Fix [Bug 2637173] by consolidating bytearray purity check.dkf2009-07-121-6/+6
|
* * generic/tclCmdMZ.c: Improve overflow error message fromdgp2009-05-061-2/+2
| | | | [string repeat]. [Bug 2582327]
* Fix [Bug 2688063]dkf2009-03-161-27/+34
|
* Move the implementation of [try] from Tcl to C. Not yet bytecoded.dkf2009-03-091-6/+497
|
* * generic/tclCmdMZ.c: Since Tcl_GetCharLength() has its owndgp2009-02-251-5/+4
| | | | | * generic/tclExecute.c: optimizations for the tclByteArrayType, stop having the callers do them.
* Simplify the implementation of some commands now that the underlying stringdkf2009-02-051-99/+59
| | | | API knows more about bytearrays.
* * generic/tclCmdMZ.c: Prevent crashes due to int overflow of thedgp2009-02-041-11/+14
| | | | length of the result of [string repeat]. [Bug 2561746]
* - eliminate some unnessary type castsnijtmans2009-02-031-14/+18
| | | | | - some internal const decorations - spacing
* Move [throw] implementation into C.dkf2009-01-131-1/+100
|
* Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-2/+2
| | | | etc.)
* Added a test, correct a dumb blunder.dkf2009-01-051-2/+2
|
* Make [source] NRE-aware to enable [yield]. [Bug 2412068]dkf2009-01-051-1/+11
|
* TIP #336 IMPLEMENTATIONdgp2008-12-021-2/+2
| | | | | | | | | | | | | | | | | | * generic/tcl.decls: New routines Tcl_(Get|Set)ErrorLine. * generic/tcl.h: Dropped default access to interp->errorLine. * generic/tclCmdAH.c: Restore it with -DUSE_INTERP_ERRORLINE. * generic/tclCmdMZ.c: Updated callers. * generic/tclDictObj.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclOOBasic.c: * generic/tclOODefinedCmds.c: * generic/tclOOMethod.c: * generic/tclProc.c: * generic/tclResult.c: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
* * generic/tclCmdAH.c: Fix minor compiler warnings when compilingnijtmans2008-10-141-9/+10
| | | | | | | | * generic/tclCmdMZ.c: with -Wwrite-strings * generic/tclIndexObj.c: * generic/tclProc.c: * generic/tclStubLib.c: * generic/tclUtil.c:
* Implement TIP 318.dkf2008-09-291-7/+15
|
* nr-enabling [for]; [while] made to reuse [for]'s infrastructure.Miguel Sofer2008-07-311-43/+7
|
* nr-enabling [while]Miguel Sofer2008-07-311-22/+47
|
* fix [2021443] inconsistant "wrong # args" messages (follow-up)nijtmans2008-07-211-4/+4
|
* fix [2021443] inconsistant "wrong # args" messages (follow-up)nijtmans2008-07-211-5/+5
|
* Small clarifications that code a bit nicer to read.dkf2008-05-301-3/+3
|
* Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-22/+22
|
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlobhobbs2007-12-111-10/+8
| | | | | | | | | | | | | * generic/tclIntDecls.h: to tclInt.h from stubs. * generic/tclStubInit.c: Add flags var to TclByteArrayMatch for * generic/tclInt.h: future extensibility * generic/tcl.h: define TCL_MATCH_EXACT doc for Tcl_StringCaseMatch. * doc/StrMatch.3: It is compatible with existing usage. * generic/tclExecute.c (INST_STR_MATCH): flag for TclByteArrayMatch * generic/tclUtil.c (TclByteArrayMatch, TclStringMatchObj): * generic/tclRegexp.c (Tcl_RegExpExecObj): * generic/tclCmdMZ.c (StringMatchCmd): Use TclStringMatchObj * tests/string.test (11.9.* 11.10.*): more tests
* Make two-arg switch work reliably (and actually as documented!) [Bug 1836519]dkf2007-12-031-35/+48
|
* Turn the [string] command into a real compiled ensemble.dkf2007-11-231-163/+175
|
* Rewrote the [string] and [dict] implementations to be ready for conversiondkf2007-11-221-1079/+1955
| | | | to ensembles.
* improvements to commentsdkf2007-11-191-2/+18
|
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-43/+44
| | | | objTypes.
* \u0000 is ASCII! [Bug 1808258]dkf2007-11-011-13/+11
|
* * generic/tclCmdMZ.c: Correct [string is (wide)integer] failuredgp2007-10-111-78/+39
| | | | | | | | | | | | | | | | | | * tests/string.test: to report correct failindex values for non-decimal integer strings. [Bug 1805887]. * compat/strtoll.c (removed): The routines strtoll() and strtoull() * compat/strtoull.c (removed): are no longer called by the Tcl source * generic/tcl.h: code. (Their functionality has been replaced * unix/Makefile.in: by TclParseNumber().) Remove outdated comments * unix/configure.in: and mountains of configury autogoo that * unix/tclUnixPort.h: allegedly support the mythical systems where * win/Makefile.in: these routines might not have been available. * win/makefile.bc: * win/makefile.vc: * win/tclWinPort.h: * unix/configure: autoconf-2.59
* * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macroMiguel Sofer2007-08-121-5/+5
| | | | instead of calling the function.
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-19/+21
| | | | | | | * 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.
* Make [string first] and [string last] clearerdkf2007-06-081-3/+4
|
* * generic/tclCmdMZ.c (STR_MAP): When [string map] has a pure dictdgp2007-05-011-1/+2
| | | | map, a missing Tcl_DictObjDone() call led to a memleak. [Bug 1710709]
* Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-5/+5
| | | | catenation, and fixed an oversight in the fix for NZA time zones.
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-4/+4
| | | | efficient). After [Patch 1529526] (afredd)