summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
Commit message (Collapse)AuthorAgeFilesLines
* - 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
|
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclCompCmds.c: Simplified [variable] compiler andMiguel Sofer2007-06-151-11/+2
| | | | | * generic/tclExecute.c: executor. Missed updates to "there is always a valid frame".
* * generic/tclCompCmds.c (TclCompileUpvarCmd): Plugged a memoryKevin B Kenny2007-04-231-1/+4
| | | | | | | | leak in 'upvar' when compiling (a) upvar outside a proc, (b) upvar with a syntax error, or (c) upvar where the frame index is not known at compile time. * generic/tclParseExpr.c (ParseExpr): Plugged a memory leak when parsing expressions that contain syntax errors.
* * generic/tclCompCmds.c: added a cast to silence a compilerKevin B Kenny2007-04-151-2/+2
| | | | | | | | error on VC2005. * library/clock.tcl: Restored unique-prefix matching of keywords on the [clock] command. [Bug 1690041] * tests/clock.test: Added rudimentary test cases for unique-prefix matching of keywords.
* fixing commentsMiguel Sofer2007-04-111-4/+1
|
* * generic/tclCompCmds.c: moved all exceptDepth management to theMiguel Sofer2007-04-111-11/+15
| | | | macros - the decreasing half was managed by hand.
* * generic/tclBasic.c: Added bytecode compilers for theMiguel Sofer2007-04-031-69/+464
| | | | | | | | * generic/tclCompCmds.c: variable linking commands: 'global', * generic/tclCompile.h: 'variable', 'upvar', 'namespace upvar' * generic/tclExecute.c: [Patch 1688593] * generic/tclInt.h: * generic/tclVar.c:
* * generic/tclCompCmds.c: Replace arrays on the C stack anddgp2007-03-301-43/+31
| | | | | ckalloc calls with TclStackAlloc calls to use memory on Tcl's evaluation stack
* fix warningsdas2007-03-161-2/+2
|