summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
Commit message (Collapse)AuthorAgeFilesLines
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-3/+4
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclCompile (tclInstructionTable): fixed bugs inMiguel Sofer2007-04-081-6/+9
| | | | description of dict instructions
* * generic/tclCompile (tclInstructionTable): fixed bug inMiguel Sofer2007-04-071-2/+2
| | | | description of INST_START_COMMAND.
* * generic/tclBasic.c: Added bytecode compilers for theMiguel Sofer2007-04-031-1/+10
| | | | | | | | * 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:
* Ensure that the count of commands commenced by bytecode is correct at all timesdkf2007-04-011-8/+26
| | | | | | even though INST_START_CMD is now issued more efficiently. Changes definition of I_S_C, but that's an 8.5 opcode so that shouldn't matter; tbcload doesn't work with 8.5 at the moment anyway.
* * generic/tclCompile.c:dgp2007-03-301-7/+9
| | | | | | | * generic/tclCompExpr.c: * generic/tclCompCmds.c: Replace arrays on the C stack and ckalloc calls with TclStackAlloc calls to use memory on Tcl's evaluation stack
* * generic/tclCompile.c: Revise the various expansion routines fordgp2007-03-201-67/+61
| | | | CompileEnv fields to use ckrealloc() where appropriate.
* Added a scheme to allow aux-data to be printed out for debugging. For this ↵dkf2007-03-021-16/+28
| | | | | | to work, immediate operands referring to aux-data must be identified as such in the instruction descriptor table using OPERAND_AUX4 (all are always 4 bytes). Rewrote the compiled [dict update] so that it stores critical non-varying data in an aux-data value instead of a (shimmerable) literal. [Bug 1671001]
* various "const" additions, in line with TIP #27nijtmans2007-02-201-16/+16
|
* More efficient issuing of INST_START_CMD instructions. See ChangeLog for ↵dkf2007-01-191-4/+7
| | | | discussion
* Code style improvementsdkf2007-01-181-125/+138
|
* Minor fix to make bytecodes print out properlydkf2007-01-181-2/+2
|
* Fix [Bug 1638414] and make bytecode of expansion betterdkf2007-01-181-71/+103
|
* fix warningsdas2006-12-011-3/+3
|
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-11/+383
| | | | | | | | | | | | | | | | | | | | | * 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:
* TIP#270 IMPLEMENTATIONdgp2006-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* Minor simplification of memcpy usagedkf2006-11-081-13/+12
|
* * generic/tclCompile.c:Miguel Sofer2006-09-301-1/+46
| | | | | | | | | * generic/tclHistory.c: * generic/tclInt.h: * generic/tclProc.c: made Tcl_RecordAndEvalObj not call "history" if it has been redefined to an empty proc, in order to reduce the noise when debugging [FR 1190441]. Moved TclCompileNoOp from tclProc.c to tclCompile.c
* add casts to make gcc2 happy with previous commit [Bug 1548330]das2006-08-291-6/+6
|
* fixed printf format warnings from gcc4 when TCL_COMPILE_STATS defineddas2006-08-281-3/+3
|
* * generic/tclCompile.c: Revised the new set of expressiondgp2006-08-171-1/+2
| | | | * generic/tclParseExpr.c: parse error messages.
* Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-8/+8
|
* New TEBC opcode, INST_JUMP_TABLE, for compiling the simple (and common) case ofdkf2005-11-301-5/+13
| | | | | [switch] into a jump-table. Much faster for long switches. Also compiler support for generating the new instruction where appropriate.
* Strip a few more pre-ANSI-ismsdkf2005-11-071-21/+20
|
* Remove _ANSI_ARGS_ and clean up a few commentsdkf2005-10-131-161/+160
|
* Compiler for [dict] and related changes.dkf2005-07-211-6/+57
|
* More minor tinkering with comments and code-layoutdkf2005-07-141-13/+14
|
* Style improvements to tclCompile.c, plus bytecode printing enhancements.dkf2005-07-141-917/+879
|
* typodkf2005-06-201-2/+2
|
* Add compilation for TIP#90-style [catch] requiring a new opcode [Bug1219112]dkf2005-06-201-20/+31
|
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
|
* * generic/tclCompCmds.c: Replaced all instance ofdgp2005-05-051-5/+4
| | | | | | | | * generic/tclCompile.c: TCL_OUT_LINE_COMPILE with TCL_ERROR. * generic/tclInt.h: Now that we've eradicated the mistaken * tests/appendComp.test: notion of a "compile-time error", we can use the TCL_ERROR return code to signal any failure to produce bytecode.
* * generic/tclCompile.c:Commented out the functionsMiguel Sofer2005-04-131-1/+7
| | | | | TclPrintInstruction(), TclPrintObject() and TclPrintSource() when not debugging the compiler, as they are never called in that case.
* * generic/tclCompile.c: fixed INST_RETURN's stack effect inMiguel Sofer2005-03-141-2/+2
| | | | tclInstructionTable (-1 instead of -2)
* Avoid sharing cmdName literals accross namespaces, and generalise usage ofMiguel Sofer2004-12-241-11/+12
| | | | the TclRegisterNewLiteral macro [Patch 1090905]
* * generic/tclCompile.c: moved TclInitCompiledLocals to tclProc.cMiguel Sofer2004-12-201-139/+1
| | | | | | | | * generic/tclProc.c: new static InitCompiledLocals to allow for a single pass over the proc's arguments at proc load time (instead of two as previously). TclObjInterpProc() now allocates the compiledLocals on the tcl execution stack, using the new TclStackAlloc/Free functions.
* optimised loops that initialise a proc's arguments and compiled localMiguel Sofer2004-12-101-59/+88
| | | | variables, removing tests from inner loops.
* Core of implementation of TIP#201 ('in' and 'ni' operators)dkf2004-10-081-1/+6
|
* Convert string to stringPtrdkf2004-10-061-12/+12
|
* Factorize out the code for freeing an object's internal rep.dkf2004-09-291-5/+2
|
* Report compilation errors at runtime, [Patch 103368] by dgp.Miguel Sofer2004-09-261-184/+80
|
* Corrected the base for the errorline calculationdgp2004-09-231-2/+2
|
* * generic/tclCmdMZ.c (TclProcessReturn): Support the -errorlinedgp2004-09-221-25/+43
| | | | | | | * generic/tclCompile.c (TclCompileScript): option to [return]. * tests/compile.test (16.23.*): Use that capability to defer reporting * tests/misc.test (1.2): of parse errors until runtime. Updated tests to reflect change. [Bug 1032805]
* * generic/tclBasic.c: Reworked management of the interpdgp2004-09-211-10/+1
| | | | | | | | | | | | | | * generic/tclCompile.c: flag ERR_ALREADY_LOGGED, to reduce * generic/tclExecute.c: its exposure. Still left several * generic/tclNamesp.c: references that are just too nice on performace to do away with. These changes also resolve an inconsistency in the ::errorInfo values produced by [namespace eval x error foo bar] and [namespace eval x {error foo bar}]. * generic/tclExecute.c (TclCompEvalObj): Simplified the TclCompEvalObj routine. Much housekeeping now reliably happens elsewhere. [Patch 1031949]
* * generic/tclCompile.c (TclCompileScript):Miguel Sofer2004-07-151-3/+8
| | | | | | | | | * generic/tclLiteral.c (TclReleaseLiteral): fix for [Bug 467523], which resurfaced with the latest changes. The previous strategy was to have special code in TclReleaseLiteral to handle the self-references generated by empty scripts. The new approach avoids the self-reference altogether, by having empty scripts return an unshared literal.
* Modified the logic of literal table cleanup at interp deletion time,Miguel Sofer2004-07-081-13/+15
| | | | | insuring that the fix of [Bug 983660] does not have a negative perf impact.
* * generic/tclCompile.c (TclCompileScript): fix for [Bug 458361].Miguel Sofer2004-07-071-1/+10
| | | | | Single-word scripts are compiled with an unshared cmdName to avoid shimmering between bytecode and cmdName reps.
* * tests/cmdMZ.test (cmdMZ-return-2.17): Added a test that a worddgp2004-07-061-4/+5
| | | | | | | | | containing backslash-quoted value is treated correctly. * generic/tclCompile.c (TclWordKnownAtCompileTime): [Bug 986196] Corrected flaw above and the flaw that caused TCL_TOKEN_SIMPLE_WORDs to have their original word value copied ( "{a b}" ) rather than the actual value ( "a b" ). Thanks to Kevin Kenny for report and tests.
* * generic/tclCompile.c:Miguel Sofer2004-06-081-2/+6
| | | | * generic/tclExecute.c: handle warning [Bug 969066]
* * generic/tclCompile.h:Miguel Sofer2004-05-161-63/+37
| | | | | | | | | | | * generic/tclCompile.c: * generic/tclExecute.c: changed implementation of {expand}, last chance while in alpha as ... ***POTENTIAL INCOMPATIBILITY*** Scripts precompiled with ProComp under previous tcl8.5a versions may malfunction due to changed instruction numbers for INST_LIST_INDEX_IMM, INST_LIST_RANGE_IMM and INST_START_CMD.