summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
Commit message (Collapse)AuthorAgeFilesLines
* Alternate fix for[Bug 2251175]: missing backslash substitution on expanded ↵ferrieux2008-11-271-28/+3
| | | | literals.
* Simplification of expanded-literals handling after analysis of dead branchesferrieux2008-11-191-29/+5
|
* Fix [Bug 2251175]: missing backslash substitution on expanded literals.ferrieux2008-11-171-5/+54
|
* Style improvements - invoking callbacks without visual junk.dkf2008-10-261-9/+9
|
* Add "const" to many internalnijtmans2008-10-151-4/+4
| | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
* * generic/tclCompile.c: fix bug in srcDelta encoding withinMiguel Sofer2008-10-121-3/+3
| | | | | | ByteCodes. The bug can only be triggered under conditions that cannot happen in Tcl, but were met during development of L. Thanks go to Robert Netzer for diagnose and fix.
* * generic/tclInt.decls: CONSTified the AuxDataType argumentnijtmans2008-10-051-12/+12
| | | | | | | | | | | * 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).
* * generic/tclCompile.c (TclCompileTokens):Miguel Sofer2008-09-081-14/+12
| | | | | | | * generic/tclExecute.c (CompileExprObj): fix a perf bug (found by Alex Ferrieux) where some variables in the LVT where not being accessed by index. Fix missing localCache management in compiled expressions found while analyzing the bug.
* Fix performance bug introduced by fix of [Bug 2037727]dkf2008-08-201-5/+6
|
* * tests/info.test: Tests 38.* added, exactly testing the trackingandreas_kupries2008-07-251-18/+26
| | | | | | | | | | | | | | | | | of location for uplevel scripts. Resolved merge conflict on info-37.0, switched !singleTestInterp constraint to glob matching instead. Ditto info-22.8, removed constraint, more glob matching, and reduced the depth of the stack we check. More is coming, right now I want to commit the bug fixes. * tests/oo.test: Updated oo-22.1 for expanded location tracking. * generic/tclCompile.c (TclInitCompileEnv): Reorganized the initialization of the #280 location information to match the flow in TclEvalObjEx to get more absolute contexts. * generic/tclBasic.c (TclEvalObjEx): Added missing cleanup of extended location information.
* * generic/tclBasic.c: Modified TclArgumentGet to reject pure listsandreas_kupries2008-07-231-3/+5
| | | | | | | | | | * generic/tclCmdIL.c: immediately, without search. Reworked setup * generic/tclCompile.c: of eoFramePtr, doesn't need the line * tests/info.test: information, more sensible to have everything on line 1 when eval'ing a pure list. Updated the users of the line information to special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour.
* * generic/tclCompile.c: Made the new TclEnterCmdWordIndexandreas_kupries2008-07-221-11/+14
| | | | * generic/tclCompile.h: static, and ansified.
* * generic/tclBasic.c: Reworked the handling of bytecode literalsandreas_kupries2008-07-221-16/+27
| | | | | | | | | | * generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear * generic/tclExecute.c: search through the whole stack with * generic/tclInt.h: another hashtable and simplified the data structure used by the compiler (array instead of hashtable). Incidentially this also fixes the memory leak reported via [Bug 2024937].
* * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-1/+46
| | | | | | | | | | | | * 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: * tests/info.test:
* * generic/tclBasic.c: Compilation of uplevel scripts, allowMiguel Sofer2008-06-081-4/+33
| | | | | | | | | * 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:
* Small clarifications that code a bit nicer to read.dkf2008-05-301-18/+19
|
* * generic/tclCompile.c: fix crash with tcl_traceExec. Found andMiguel Sofer2008-05-161-2/+2
| | | | fixed by Alexander Pasadyn [Bug 1964803].
* Reconcile coding style issues between branchesdgp2008-01-231-2/+3
|
* * generic/tclCompExpr.c: add an 'optimize' argument toMiguel Sofer2008-01-161-2/+2
| | | | | | * generic/tclCompile.c: TclCompileExpr() to profit from better * generic/tclCompile.h: literal management according to usage. * generic/tclExecute.c:
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* Minor fixes (e.g. comment readability)dkf2007-11-181-17/+17
|
* Greatly improved ensemble compiler. This one now can handle any ensemble.dkf2007-11-161-2/+5
| | | | | 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/+26
|
* Minor fixes (remove double blank lines, etc.)dkf2007-11-131-16/+18
|
* Fix a bug in disassembly of INST_START_CMD instructionsdkf2007-11-131-3/+4
|
* * generic/tclCompCmds.c, generic/tclCompile.c, generic/tclCompile.h:hobbs2007-11-121-1/+4
| | | | | | | | | * 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-2/+2
| | | | objTypes.
* * 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