summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclCmdMZ.c (TryPostBody, TryPostHandler): Make sure that thedkf2010-03-241-5/+31
| | | | [try] command does not trap unwinding due to limits.
* * generic/tclCmdMZ.c: [Bug 2973361] Revised fix for computingdgp2010-03-231-24/+29
| | | | indices of script arguments to [try].
* Make error message in "try" implementationnijtmans2010-03-231-8/+10
| | | | exactly the same as the one in "return"
* * generic/tclCmdMZ.c: [Bug 2973361]: Compute the correct integerdgp2010-03-221-6/+11
| | | | | values to identify the argument indices of the various script arguments to [try]. Passing in -1 led to invalid memory reads.
* Quell a warning in Kevin Kenny's build environmentdkf2010-03-051-2/+3
|
* Code Audit results:dkf2010-03-051-4/+4
| | | | | | | | * 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
* Use a less hacky way of using a char as a hash keydkf2010-03-021-3/+3
|
* Only look for the needle when it fits in the haystack. [Bug 2960021]dkf2010-02-271-3/+13
|
* More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-18/+15
|
* Remove unnecessary EXTERN's, which alreadynijtmans2010-02-221-2/+2
| | | | | | | | are in the global stub table. Use @EXEEXT@ in stead of @EXT_SUFFIX@ Use -DBUILD_tcl in Makefile for CYGWIN Use EXTERN to control CYGWIN exported symbols Remove some unnecessary type casts.
* Tcl Bug 2826551 regexp bugs related to -all -line and -start and newlinesdkf2010-02-111-20/+29
|
* CONST -> constnijtmans2009-12-251-3/+3
|
* 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
|