summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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].
* | * generic/tclCompCmds.c: Use the new INST_REVERSE instructiondgp2007-09-091-59/+48
| | | | | | | | | | | | | | | | | | * tests/mathop.test: to correct the compiled versions of math operator commands. [Bug 1724437]. * generic/tclCompile.c: New bytecode instruction INST_REVERSE to * generic/tclCompile.h: reverse the order of N items at the top of * generic/tclExecute.c: stack.
* | * generic/tclCompCmds.c (TclCompilePowOpCmd): Make a separatedgp2007-09-091-7/+16
| | | | | | | | routine to compile ** to account for its different associativity.
* | * generic/tclCompExpr.c: Call TclCompileSyntaxError() whendgp2007-08-271-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression syntax errors are found when compiling expressions. With this in place, convert TclCompileExpr to return void, since there's no longer any need to report TCL_ERROR. * generic/tclCompile.c: Update callers. * generic/tclExecute.c: * generic/tclCompCmds.c: New routine TclCompileSyntaxError() * generic/tclCompile.h: to directly compile bytecodes that report a * generic/tclCompile.c: syntax error, rather than (ab)use a call to TclCompileReturnCmd. Also, undo the most recent commit that papered over some issues with that (ab)use. New routine produces a new opcode INST_SYNTAX, which is a minor variation of INST_RETURN_IMM. Also a bit of constification.
* | * generic/tclCompCmds.c (TclCompileReturnCmd): Added crash protectiondgp2007-08-231-2/+29
| | | | | | | | | | to handle callers other than TclCompileScript() failing to meet the initialization assumptions of the TIP 280 code in CompileWord().
* | VarReform [Patch 1750051]Miguel Sofer2007-07-311-30/+18
| | | | | | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* | 2007-07-11 Miguel Sofer <msofer@users.sf.net>Miguel Sofer2007-07-111-1/+7
| | | | | | | | | | | | | | | | * generic/tclCompCmds.c (TclCompileWhileCmd): * generic/tclCompile.c (TclCompileScript): Corrected faulty avoidance of INST_START_CMD when the first opcode in a script is within a loop (as produced by 'while 1'), so that the corresponding command is properly counted [Bug 1752146].
* | Silence constness warnings for TclStackFree when building with msvc.patthoyts2007-06-281-2/+2
| |