summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Split tclCompCmds.c into two pieces to improve developer sanity.dkf2010-02-261-3541/+375
|
* Correct silly error with missing semicolonsdkf2010-02-251-3/+3
|
* Remove unnecessary EXTERN's, which alreadynijtmans2010-02-221-3/+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.
* Make [string length] compiler handle more trivial cases.dkf2010-02-201-108/+105
|
* Fix error in stack depth calculation for [dict update], correct misleadingdkf2010-02-171-1/+4
| | | | comment in description of opcode.
* Hive off the ensemble code into its own file.dkf2010-02-131-683/+364
| | | | Split the [switch] compiler for sanity's sake.
* Small cleanups of formatting issuesdkf2010-02-091-72/+88
|
* Compilation of [try] now enabled!dkf2010-02-091-1/+640
|
* Added basic compilation of [error] (the most common case only).dkf2010-02-051-1/+46
|
* Make the [unset] command be bytecode compiled.dkf2010-01-301-15/+113
|
* * generic/tclBasic.c: Completed the NR-enabling of [subst].dgp2009-09-111-12/+25
| | | | | | | | | * generic/tclCmdMZ.c: [Bug 2314561]. * generic/tclCompCmds.c: * generic/tclCompile.c: * generic/tclInt.h: * tests/coroutine.test: * tests/parse.test:
* Fixed up error in stack requirement estimation that made debug buildsdgp2009-09-041-1/+11
| | | | panic during execution of [subst] bytecode.
* Patched up flaw in option syntax checkingdgp2009-09-041-6/+3
|
* * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecodedgp2009-09-041-1/+270
| | | | | | | | | | | | | * 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-45/+68
| | | | | | | | | | | | | | | | | | | | | | | 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.
* - eliminate some unnessary type castsnijtmans2009-02-031-4/+4
| | | | | - some internal const decorations - spacing
* Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-6/+6
| | | | etc.)
* Simplification of expanded-literals handling after analysis of dead branchesferrieux2008-11-191-4/+4
|
* Fix [Bug 2251175]: missing backslash substitution on expanded literals.ferrieux2008-11-171-4/+4
|
* * generic/tclInt.decls: CONSTified the AuxDataType argumentnijtmans2008-10-051-4/+4
| | | | | | | | | | | * generic/tclCompCmds.c: of TclCreateAuxData and * generic/tclCompile.c TclRegisterAuxDataType and the return * generic/tclCompile.h values of TclGetAuxDataType and * generic/tclExecute.c TclGetInstructionTable * ChangeLog * generic/tclIntDecls.h: regenerated This change complies with TIP #27 (even though it only involves internal function, so this is not even necessary).
* Implement TIP 314. [Patch 1901783]dkf2008-09-281-1/+15
|
* * doc/Object.3 CONSTified 3 functions usingnijtmans2008-07-271-3/+3
| | | | | | | | | | | | | | | * doc/ObjectType.3 Tcl_ObjType which all are supposed * generic/tcl.decls to be a constant, but this was not * generic/tcl.h reflected in the API: * generic/tclDecls.h Tcl_ConvertToType * generic/tclObj.c Tcl_GetObjType * generic/tclCompCmds.c Tcl_RegisterObjType * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile against both Tcl 8.5 and Tcl 8.6 tclDecls.h is re-generated with "make genstubs" This change complies with TIP #24 ***POTENTIAL INCOMPATIBILITY***
* * generic/tclBasic.c: Compilation of uplevel scripts, allowMiguel Sofer2008-06-081-48/+80
| | | | | | | | | * generic/tclCompCmds.c: non-body compiled scripts to access the * generic/tclCompile.c: LVT (but not to extend it) and enable the * generic/tclCompile.h: canonical list opt to sidestep the * generic/tclExecute.c: compiler. This is [Patch 1973096] * generic/tclProc.c: * tests/uplevel.test:
* Fix off-by-one error that caused crashes. D'oh!dkf2008-05-071-2/+2
|
* Correct the handling of stack space calculation (the jump pattern used wasdkf2008-03-161-4/+5
| | | | confusing the simple-minded code doing the calculations). [Bug 1903325]
* * generic/tclCompCmds.c (TclCompileReturnCmd): The 2007-10-18 commitdgp2008-02-281-1/+2
| | | | | to optimize compiled [return -level 0 $x] [RFE 1794073] introduced a memory leak of the return options dictionary. Fixing that.
* Fix [Bug 1891827]dkf2008-02-121-5/+9
|
* * generic/tclInt.h: New macro TclGrowParseTokenArray() todgp2008-01-231-19/+16
| | | | | | | | | | | | | | * generic/tclCompCmds.c: simplify code that might need to grow * generic/tclCompExpr.c: an array of Tcl_Tokens in the parsePtr * generic/tclParse.c: field of a Tcl_Parse. Replaces the TclExpandTokenArray() routine via replacing: int needed = parsePtr->numTokens + growth; while (needed > parsePtr->tokensAvailable) { TclExpandTokenArray(parsePtr); } with: TclGrowParseTokenArray(parsePtr, growth); This revision merged over from dgp-refactor branch.
* * generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannothobbs2007-12-231-6/+5
| | | | | * tests/regexp.test (regexp-22.2): be used because it * tests/regexpComp.test: [Bug 1857126] disallows backrefs.
* * generic/tclCompCmds.c (TclCompileSwitchCmd): update switch -regexphobbs2007-12-191-2/+14
| | | | | | * tests/switch.test-14.*: compilation to pass the cflags to INST_REGEXP (changed on 12-07). Added tests for switch -regexp compilation (need more). [Bug 1854399]
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclExecute.c (TclExecuteByteCode INST_REGEXP):hobbs2007-12-071-2/+9
| | | | | * generic/tclCompCmds.c (TclCompileRegexpCmd): Pass correct RE compile flags at compile time, and use TCL_REG_NOSUB.
* Oops!dkf2007-12-061-2/+2
|
* Fix [Bug 1845320] and [Bug 1845397]dkf2007-12-061-8/+11
|
* Make two-arg switch work reliably (and actually as documented!) [Bug 1836519]dkf2007-12-031-14/+29
|
* Fix stack corruption in [dict append] compilerdkf2007-11-241-26/+31
|
* Turn the [string] command into a real compiled ensemble.dkf2007-11-231-152/+237
|
* Rebuild [dict] as a full compiled ensemble.dkf2007-11-221-410/+566
|
* Generalize the ensemble compiler further. Still doesn't precopile rewrites, ↵dkf2007-11-211-50/+138
| | | | | | but now handles many other things making the compiler at least useful.
* Greatly improved ensemble compiler. This one now can handle any ensemble.dkf2007-11-161-68/+287
| | | | | It is usually not enabled though; only worth it when a subcommand is actually expected to undergo bytecode compilation.
* Compile [info exists] into bytecode. Includes new instructions to support it.dkf2007-11-141-1/+147
|
* (TclCompileSwitchCmd): simplify TclReToGlob usage.hobbs2007-11-141-9/+6
|
* * generic/tclCompCmds.c (TclCompileRegexpCmd): clean up comments,hobbs2007-11-141-9/+12
| | | | only free dstring on OK from TclReToGlob.
* Extend [switch] compiler to handle regular expressions as long as things are notdkf2007-11-131-71/+115
| | | | | too complex. Fix [regexp] compiler so that non-trivial literal regexps get fed to INST_REGEXP.
* * generic/tclCompCmds.c, generic/tclCompile.c, generic/tclCompile.h:hobbs2007-11-121-91/+37
| | | | | | | | | * generic/tclExecute.c, generic/tclInt.decls, generic/tclIntDecls.h: * generic/tclRegexp.c, generic/tclRegexp.h: Add INST_REGEXP and fully * generic/tclStubInit.c, generic/tclUtil.c: compiled [regexp] for the * tests/regexpComp.test: [Bug 1830166] simple cases. Also added TclReToGlob function to convert RE to glob patterns and use these in the possible cases.
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-7/+7
| | | | objTypes.
* * generic/tclResult.c (TclMergeReturnOptions): Make sure any -codedgp2007-10-181-2/+8
| | | | | | | | values get pulled out of the dictionary, even if they are integer valued. * generic/tclCompCmds.c (TclCompileReturnCmd): Added code to more optimally compile [return -level 0 $x] to "push $x". [RFE 1794073]
* Add a new command, ::tcl::unsupported::disassembledkf2007-09-251-18/+28
|
* * generic/tclCompCmds.c (TclCompileDictCmd-update):Miguel Sofer2007-09-111-17/+33
| | | | | | * generic/tclCompile.c (tclInstructionTable): * generic/tclExecute.c (INST_DICT_UPDATE_END): fix stack management in [dict update] [Bug 1786481].