summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
Commit message (Collapse)AuthorAgeFilesLines
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-19/+18
| | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* Turn namespace into an ensemble. Not yet on trunk because of some mysterious ↵dkf2011-03-091-16/+7
| | | | failures that need resolving...
* 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/tclCompCmds.c: [Bug 2881263] (TclCompileForeachCmd,andreas_kupries2009-10-231-3/+4
| | | | | | | | | | | | | | | | | | TclCompileLindexCmd): Fixed. Moved the use of DefineLineInformation after all regular variable declarations, so that an empty statement (-UTIP_280) doesn't confuse c89 compilers.
| | * * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-265/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, ListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-22): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script's, to properly account for them while counting lines for #280, during direct and compiled execution.
| | * * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
| | * D'oh! Used an 8.5-ism...dkf2007-03-011-2/+2
| | |
| | * Fix [Bug 1671138]dkf2007-03-011-1/+13
| | |
| | * * generic/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-3/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/tclCompCmds.c (TclCompileIncrCmd): Corrected checksdgp2005-03-181-15/+11
| | | | | | | | | | | | | | | for immediate operand usage to permit leading space and sign characters. [Bug 1165671]
| | * * generic/tclCompCmds.c (TclCompileIfCmd): Prior fix of Bug 711371dgp2003-07-151-3/+6
| | | | | | | | | | | | on 2003-04-07 introduced a buffer overflow. Corrected. [Bug 771613]
| | * * generic/tclCompCmds.c (TclCompileIfCmd): Corrected string limits ofdgp2003-04-071-4/+4
| | | | | | | | | | | | arguments interpolated in error messages. [Bug 711371]
| * | Various mismatches between Tcl_Panic format string and its arguments,nijtmans2011-01-181-7/+7
| | | | | | | | | | | | discovered thanks to [Bug 3159920]
| * | Backport dgp's fixes to comments and ChangeLog entryKevin B Kenny2010-11-051-2/+2
| | |
| * | * generic/tclCompCmds.c (TclCompileCatchCmd):Kevin B Kenny2010-11-031-70/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/compile.test (compile-3,6): Reworked the compilation of the [catch] command so as to avoid placing any code that might throw an exception (specifically, any initial substitutions or any stores to result or options variables) between the BEGIN_CATCH and END_CATCH but outside the exception range. Added a test case that panics on a stack smash if the change is not made. [Bug #3098302]
| * | * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-46/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * 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 parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script Tcl_Obj*'s, to properly account for them while counting lines for #280.
| * | Fix off-by-one error that caused crashes. Backport from HEAD.dkf2008-05-071-2/+2
| | |
* | | Various mismatches between Tcl_Panic format string and its arguments,nijtmans2011-01-181-3/+3
| | | | | | | | | | | | discovered thanks to [Bug 3159920]
* | | Correct typo and mistaken comment.dgp2010-11-041-2/+2
| | |
* | | * generic/tclCompCmds.c (TclCompileCatchCmd):Kevin B Kenny2010-11-031-67/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/compile.test (compile-3,6): Reworked the compilation of the [catch] command so as to avoid placing any code that might throw an exception (specifically, any initial substitutions or any stores to result or options variables) between the BEGIN_CATCH and END_CATCH but outside the exception range. Added a test case that panics on a stack smash if the change is not made. [Bug #3098302]
* | | [Patch 2995655] Report inner contexts in [info errorstack]ferrieux2010-10-201-1/+2
| | |
* | | * generic/tclCompCmds.c (TclCompileDictForCmd): Update the compilationdkf2010-10-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c (tclInstructionTable): of [dict for] so that * generic/tclExecute.c (TEBCresume): it no longer makes any use of INST_DICT_DONE now that's not needed, and make it clearer in the implementation of the instruction that it's just a deprecated form of unset operation. Followup to my commit of 2010-10-16.
* | | * generic/tclCompCmds.c (TclCompileVariableCmd): Slightly tighterdkf2010-04-301-2/+8
| | | | | | | | | | | | issuing of instructions.
* | | 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
|/ /