summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclCompile.c: Fix comments.Miguel Sofer2007-10-201-3/+3
| | | | * generic/tclExecute.c:
* Fix my silly blunder with an undeclared variable.dkf2007-10-091-2/+3
|
* Add a new command, ::tcl::unsupported::disassembledkf2007-09-251-130/+224
|
* * generic/tclCompCmds.c (TclCompileDictCmd-update):Miguel Sofer2007-09-111-2/+2
| | | | | | * generic/tclCompile.c (tclInstructionTable): * generic/tclExecute.c (INST_DICT_UPDATE_END): fix stack management in [dict update] [Bug 1786481].
* * generic/tclCompile.c: fix tclInstructionTable entry forMiguel Sofer2007-09-101-2/+2
| | | | | | | dictUpdateEnd * generic/tclExecute.c: remove unneeded setting of 'cleanup' variable before jumping to checkForCatch.
* Correct stack effect value in table.dgp2007-09-091-2/+2
|
* * generic/tclCompCmds.c: Use the new INST_REVERSE instructiondgp2007-09-091-1/+3
| | | | | | | | | * 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/tclCompile.c: Added fflush() calls following all callers ofdgp2007-08-301-1/+2
| | | | | | * generic/tclExecute.c: TclPrintByteCodeObj() so that tcl_traceCompile output is less likely to get mangled when writes to stdout interleave with other code.
* * generic/tclCompExpr.c: Call TclCompileSyntaxError() whendgp2007-08-271-59/+11
| | | | | | | | | | | | | | | | 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/tclCompile.c: Move the deallocation of local LiteralTabledgp2007-08-271-9/+5
| | | | | * generic/tclCompExpr.c: entries into TclFreeCompileEnv(). * generic/tclExecute.c: Update callers.
* * generic/tclCompile.c: replaced copy loop that tripped someMiguel Sofer2007-08-241-5/+5
| | | | compilers with memmove [Bug 1780870]
* VarReform [Patch 1750051]Miguel Sofer2007-07-311-9/+13
| | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* 2007-07-11 Miguel Sofer <msofer@users.sf.net>Miguel Sofer2007-07-111-14/+21
| | | | | | | | * 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].
* * generic/tclBasic.c: Move most instances of the Tcl_Parse structdgp2007-06-211-31/+35
| | | | | | * generic/tclCompExpr.c: off the C stack and onto the Tcl stack. * generic/tclCompile.c: This is a rather large struct (> 3kB). * generic/tclParse.c:
* Fix comments referring to {expand}. [Bug 1600859]dkf2007-06-211-2/+2
|
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclCmdIL.c (InfoFrameCmd):Miguel Sofer2007-06-181-9/+13
| | | | | | | * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * generic/tclCompile.c (TclInitCompileEnv): * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Moved the CmdFrame off the C stack and onto the Tcl stack.
* * generic/tclCompile.c: SetByteCodeFromAny() can no longer returndgp2007-06-141-2/+3
| | | | | * generic/tclExecute.c: any code other than TCL_OK, so remove code * generic/tclProc.c: that formerly handled exceptional codes.
* * generic/tclBasic.c: Removed code that dealt withdgp2007-05-301-153/+4
| | | | | | | | | | | | | | | | * generic/tclCompile.c: TCL_TOKEN_EXPAND_WORD tokens representing * generic/tclCompile.h: expanded literal words. These sections were mostly in place to enable [info frame] to discover line information in expanded literals. Since the parser now generates a token for each post-expansion word referring to the right location in the original script string, [info frame] gets all the data it needs. * generic/tclInt.h: Revised the parser so that it never produces * generic/tclParse.c: TCL_TOKEN_EXPAND_WORD tokens when parsing an * tests/parse.test: expanded literal word; that is, something like {*}{x y z}. Instead, generate the series of TCL_TOKEN_SIMPLE_WORD tokens to represent the words that expansion of the literal string produces. [RFE 1725186]
* * generic/tclCkalloc.c: fix warnings from gcc build configured withdas2007-04-231-6/+5
| | | | | * generic/tclCompile.c: --enable-64bit --enable-symbols=all. * generic/tclExecute.c:
* * generic/tclCompile.c (TclFreeCompileEnv): Tip 280's new fieldMiguel Sofer2007-04-231-1/+4
| | | | extCmdMapPtr was not being freed [Bug 1705778, leak #1].
* 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
|