summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix comments referring to {expand}. [Bug 1600859]dkf2007-06-211-2/+2
|
* * generic/tclCompile.c: reverted TclEvalObjvInternal andMiguel Sofer2007-06-151-4/+1
| | | | | | | | | | | | * generic/tclExecute.c: INST_INVOKE to essentially what they were * generic/tclBasic.c: previous to the commit of 2007-04-03 [Patch 1693802] and the subsequent optimisations, as they break the new trace tests described below. * generic/trace.test: added tests 36 to 38 for dynamic trace creation and addition. These tests expose a change in dynamics due to a recent round of optimisations. The "correct" behaviour is not described in docs nor TIP 62.
* * generic/tclBasic.c: Further TEOvI split, creating a newMiguel Sofer2007-06-101-3/+5
| | | | | | | * generic/tclCompile.h: TclEvalObjvKnownCommand() function to * generic/tclExecute.c: handle commands that are already known and are not traced. INST_INVOKE now calls into this function instead of inlining parts of TEOvI. Same perf, better isolation.
* * generic/tclBasic.c: Removed code that dealt withdgp2007-05-301-2/+1
| | | | | | | | | | | | | | | | * 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/tclBasic.c: Added bytecode compilers for theMiguel Sofer2007-04-031-4/+11
| | | | | | | | * 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:
* Added a scheme to allow aux-data to be printed out for debugging. For this ↵dkf2007-03-021-4/+31
| | | | | | 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]
* More efficient issuing of INST_START_CMD instructions. See ChangeLog for ↵dkf2007-01-191-5/+14
| | | | discussion
* Cleanup to follow engineering manual guidelinesdkf2006-12-131-27/+29
|
* * generic/tclBasic.c: Final step routing all direct evaluation formsdgp2006-12-121-1/+7
| | | | | | * generic/tclCompExpr.c: of the operator commands through TEBC, * generic/tclCompile.h: dropping all the routines in tclMathOp.c. * generic/tclMathOp.c: Still needs Engineering Manual attention.
* * generic/tclBasic.c: Another step with all sorting operator commandsdgp2006-12-111-1/+4
| | | | | * generic/tclCompExpr.c: now routing through TEBC via * generic/tclCompile.h: TclSortingOpCmd().
* * generic/tclBasic.c: Another step down the path of re-usingdgp2006-12-081-1/+14
| | | | | | | | * generic/tclCompExpr.c: TclExecuteByteCode to implement the TIP 174 * generic/tclCompile.h: commands instead of using a mass of code * generic/tclMathOp.c: duplication. Now all operator commands that * tests/mathop.test: demand exactly one operation are implemented via TclSingleOpCmd and a call to TEBC.
* * generic/tclCompExpr.c: Revised implementation of TclInvertOpCmddgp2006-12-081-1/+3
| | | | | | | | | | * generic/tclMathOp.c: to perform a bytecode compile / execute sequence. This demonstrates a path toward avoiding mountains of code duplication in tclMathOp.c and tclExecute.c. * generic/tclCompile.h: Change TclExecuteByteCode() from static to * generic/tclExecute.c: MODULE_SCOPE so all files including tclCompile.h may call it.
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-2/+35
| | | | | | | | | | | | | | | | | | | | | * 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:
* New TEBC opcode, INST_JUMP_TABLE, for compiling the simple (and common) case ofdkf2005-11-301-3/+23
| | | | | [switch] into a jump-table. Much faster for long switches. Also compiler support for generating the new instruction where appropriate.
* Scrap _ANSI_ARGS_ macro use, yay!dkf2005-10-121-97/+92
|
* Compiler for [dict] and related changes.dkf2005-07-211-3/+20
|
* Oopsdkf2005-07-141-2/+2
|
* Style improvements to tclCompile.c, plus bytecode printing enhancements.dkf2005-07-141-1/+6
|
* Add compilation for TIP#90-style [catch] requiring a new opcode [Bug1219112]dkf2005-06-201-294/+285
|
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-59/+1
|
* * generic/tclCompile.h: Move the TclInterpReady() declaration fromdgp2005-03-251-3/+1
| | | | | | | | | | * generic/tclInt.h: tclCompile.h to tclInt.h. Should have been done as part of the 1115904 bug fix on 2005-03-18. * generic/tclThreadTest.c: Stop providing the phony package "Thread 1.0" when the [::testthread] command is defined. It's never used by anything, and conflicts with loading the real "Thread" package.
* Avoid sharing cmdName literals accross namespaces, and generalise usage ofMiguel Sofer2004-12-241-5/+19
| | | | the TclRegisterNewLiteral macro [Patch 1090905]
* optimised loops that initialise a proc's arguments and compiled localMiguel Sofer2004-12-101-1/+9
| | | | variables, removing tests from inner loops.
* * generic/tclCompile.h: Removed extrainious reset ofdavygrvy2004-11-031-4/+1
| | | | TCL_STORAGE_CLASS missed in last edit.
* * generic/tclCompile.h: Exchanged use of the EXTERN macro to the new ↵davygrvy2004-11-031-71/+66
| | | | | | MODULE_SCOPE macro. Lowered exported internals count by 35.
* Core of implementation of TIP#201 ('in' and 'ni' operators)dkf2004-10-081-2/+5
|
* Report compilation errors at runtime, [Patch 103368] by dgp.Miguel Sofer2004-09-261-5/+5
|
* Moved declaration of TclCompEvalObj() from tclCompile.h to the internalMiguel Sofer2004-07-031-1/+5
| | | | stubs table, for compiler experimentation.
* * generic/tclCompile.h:Miguel Sofer2004-05-161-36/+27
| | | | | | | | | | | * 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.
* * generic/tclExecute.h:Miguel Sofer2004-05-141-2/+2
| | | | | | | * generic/tclCompile.h: the math functions receive a pointer to top of the stack (tosPtr) instead of the execution environment (eePtr). First step towards a change in the execution stack management - it is now only used within TEBC.
* * generic/tclCompile.h: removed redundant #ifdef _TCLINTMiguel Sofer2004-04-021-3/+1
| | | | [Bug 928415], reported by tauvan.
* * generic/tclCompile.c: New instruction code INST_START_CMDMiguel Sofer2004-03-301-2/+4
| | | | | | | | | * generic/tclCompile.h: that allows checking the bytecode's * generic/tclExecute.c: validity [Bug 729692] and the interp's * tests/interp.test (18.9): readyness [Bug 495830] before running * tests/proc.test (7.1): the command. It also changes the * tests/rename.test (6.1): mechanics of the async tests in TEBC, doing it now at command start instead of every 16 instructions.
* Whitespace minimisationdkf2004-01-201-76/+77
|
* Full bytecode compilation for [lassign]dkf2004-01-181-4/+20
|
* Patch 876451: restores performance of [return]. Also allows formsdgp2004-01-131-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | such as [return -code error $msg] to be bytecompiled. * generic/tclInt.h: Factored Tcl_ReturnObjCmd() into two pieces: * generic/tclCmdMZ.c: TclMergeReturnOptions(), which can parse the options to [return], check their validity, and create the corresponding return options dictionary, and TclProcessReturn(), which takes that return options dictionary and performs the [return] operation. * generic/tclCompCmds.c: Rewrote TclCompileReturnCmd() to call TclMergeReturnOptions() at compile time so the return options dictionary is computed at compile time (when it is fully known). The dictionary is pushed on the stack along with the result, and the code and level values are included in the bytecode as operands. Also supports optimized compilation of un-[catch]ed [return]s from procs with default options into the INST_DONE instruction. * generic/tclExecute.c: Rewrote INST_RETURN instruction to retrieve the code and level operands, pop the return options from the stack, and call TclProcessReturn() to perform the [return] operation. * generic/tclCompile.h: New utilities include TclEmitInt4 macro * generic/tclCompile.c: and TclWordKnownAtCompileTime().
* * doc/ParseCmd.3: Implementation of TIP 157. Adds recognitiondgp2003-11-141-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Tcl.n: of the new leading {expand} syntax on words. * generic/tcl.h: Parses such words as the new Tcl_Token type * generic/tclBasic.c: TCL_TOKEN_EXPAND_WORD. Updated Tcl_EvalEx * generic/tclCompile.c: and the bytecode compiler/execution engine * generic/tclCompile.h: to recognize the new token type. New opcodes * generic/tclExecute.c: INST_LIST_VERIFY and INST_INVOKE_EXP and a new * generic/tclParse.c: operand type OPERAND_ULIST1 are defined. Docs * generic/tclTest.c: and tests are included. * tests/basic.test: * tests/compile.test: * tests/parse.test: * library/auto.tcl: Replaced several [eval]s used to perform * library/package.tcl: argument expansion with the new syntax. * library/safe.tcl: In the test files lindex.test and lset.test, * tests/cmdInfo.test: replaced use of [eval] to force direct * tests/encoding.test: string evaluation with use of [testevalex] * tests/execute.test: which more directly and robustly serves the * tests/fCmd.test: same purpose. * tests/http.test: * tests/init.test: * tests/interp.test: * tests/io.test: * tests/ioUtil.test: * tests/iogt.test: * tests/lindex.test: * tests/lset.test: * tests/namespace-old.test: * tests/namespace.test: * tests/pkg.test: * tests/pkgMkIndex.test: * tests/proc.test: * tests/reg.test: * tests/trace.test: * tests/upvar.test: * tests/winConsole.test: * tests/winFCmd.test:
* Oops! Last checkin had wrong value for LAST_INST_OPCODE. D'oh!dkf2003-09-151-2/+2
|
* TIP#123 Implementation based on work by Arjen Markus. [Patch 655176]dkf2003-09-121-1/+3
|
* * generic/tclCompCmds.c (TclCompileReturnCmd): Alternative fix fordgp2003-03-191-2/+4
| | | | | | | * generic/tclCompile.c (INST_RETURN): [Bug 633204] that uses a new * generic/tclCompile.h (INST_RETURN): bytecode INST_RETURN to * generic/tclExecute.c (INST_RETURN): properly bytecode the [return] command to something that returns TCL_RETURN.
* * generic/tclBasic.c (Tcl_EvalTokensStandard):dgp2003-03-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_SubstObj): * generic/tclCompCmds.c (TclCompileSwitchCmd): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclCompile.c (TclSetByteCodeFromAny,TclCompileScript, TclCompileTokens,TclCompileCmdWord): * generic/tclCompile.h (TclCompileScript): * generic/tclExecute.c (TclCompEvalObj): * generic/tclInt.h (Interp,TCL_BRACKET_TERM,TclSubstTokens): * generic/tclParse.c (ParseTokens,Tcl_SubstObj,TclSubstTokens): * tests/subst.test (2.4, 8.7, 8.8, 11.4, 11.5): Substantial refactoring of Tcl_SubstObj to make use of the same parsing and substitution procedures as normal script evaluation. Tcl_SubstObj() moved to tclParse.c. New routine TclSubstTokens() created in tclParse.c which implements all substantial functioning of Tcl_EvalTokensStandard(). TclCompileScript() loses its "nested" argument, the Tcl_Interp struct loses its termOffset field and the TCL_BRACKET_TERM flag in the evalFlags field, all of which were only used (indirectly) by Tcl_SubstObj(). Tests subst-8.7,8.8,11.4,11.5 modified to accomodate the only behavior change: reporting of parse errors now takes precedence over [return] and [continue] exceptions. All other behavior should
* The [switch] command is now bytecode compiled, at least in the most commondkf2003-03-051-6/+15
| | | | | case. There's room for improvement in the future, of course. [Patch #644819] Also adds another macro to help with jump offset fixups.
* * generic/tclInt.decls: made TclSetPreInitScript() declarationdas2002-10-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generic as it is used on mac & aqua as well. * generic/tclIntDecls.h: * generic/tclStubInit.c: regen. * generic/tclCompile.h: added prototype for TclCompileVariableCmd. * mac/tclMacPort.h: removed incorrect <fcntl.h> definitions and obsolete <stat.h> definitions. * mac/tclMacChan.c: removed obsolete GetOpenMode() and replaced associated constants with the <fcntl.h> analogues (they existing defs were inconsistent with <fcntl.h> which was causing havoc when Tcl_GetOpenMode was used instead of private GetOpenMode). * mac/tclMacFCmd.c: removed GenerateUniqueName(), use equivalent (and identiaclly named) routine from MoreFiles instead. * mac/tclMacLoad.c: CONSTification, fixes to Vince's last changes. * mac/tclMacFile.c: * mac/tclMacTest.c: * mac/tclMacUnix.c: CONSTification. * mac/tclMacOSA.c: CONSTificcation, sprintf fixes, UH 3.4.x changes; fix for missing autoname token from TclOSACompileCmd. (bdesgraupes) * mac/AppleScript.html(AppleScript delete): doc fix. (bdesgraupes) * mac/tcltkMacBuildSupport.sea.hqx: updated MoreFiles to 1.5.3, updated build instructions for 8.4. * mac/tclMacProjects.sea.hqx: rebuilt archive.
* Removing more CONST-related warnings.dkf2002-09-241-2/+2
|
* * generic/tclCompile.h:Miguel Sofer2002-08-071-9/+1
| | | | | * generic/tclObj.c: making tclCmdNameType static ([Bug 584567], Don Porter).
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Concat.3: all remaining public interfaces of Tcl. * doc/CrtCommand.3: Notably, the parser no longer writes on * doc/CrtSlave.3: the string it is parsing, so it is no * doc/CrtTrace.3: longer necessary for Tcl_Eval() to be * doc/Eval.3: given a writable string. Also, the * doc/ExprLong.3: refactoring of the Tcl_*Var* routines * doc/LinkVar.3: by Miguel Sofer is included, so that the * doc/ParseCmd.3: "part1" argument for them no longer needs * doc/SetVar.3: to be writable either. * doc/TraceVar.3: * doc/UpVar.3: Compatibility support has been enhanced so * generic/tcl.decls that a #define of USE_NON_CONST will remove * generic/tcl.h all possible source incompatibilities with * generic/tclBasic.c the 8.3 version of the header file(s). * generic/tclCmdMZ.c The new #define of USE_COMPAT_CONST now does * generic/tclCompCmds.c what USE_NON_CONST used to do -- disable * generic/tclCompExpr.c only those new CONST's that introduce * generic/tclCompile.c irreconcilable incompatibilities. * generic/tclCompile.h * generic/tclDecls.h Several bugs are also fixed by this patch. * generic/tclEnv.c [Bugs 584051,580433] [Patches 585105,582429] * generic/tclEvent.c * generic/tclInt.decls * generic/tclInt.h * generic/tclIntDecls.h * generic/tclInterp.c * generic/tclLink.c * generic/tclObj.c * generic/tclParse.c * generic/tclParseExpr.c * generic/tclProc.c * generic/tclTest.c * generic/tclUtf.c * generic/tclUtil.c * generic/tclVar.c * mac/tclMacTest.c * tests/expr-old.test * tests/parseExpr.test * unix/tclUnixTest.c * unix/tclXtTest.c * win/tclWinTest.c
* Global symbols are now all either prefixed with 'tcl' (or 'Tcl' or ...) or ↵dkf2002-07-191-10/+10
| | | | have file-scope.
* * generic/tclCompile.h: modified the macro TclEmitPushMiguel Sofer2002-06-281-5/+8
|
* cleanup in [expr] compilerMiguel Sofer2002-05-301-13/+1
|
* * Corrected problems with Tcl_AllowExceptionsdgp2002-03-291-2/+2
| | | | | having influence over the wrong scope of Tcl_*Eval* calls. Patch from Miguel Sofer. Report from Jean-Claude Wippler. [Bug 219181]
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-2/+5
| | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.