summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclBasic.c: Removed dead code, including thedgp2007-06-281-237/+1
| | | | | | | | | | | | | * generic/tclExecute.c: entire file tclMathOp.c. * generic/tclInt.h: * generic/tclMathOp.c (removed): * generic/tclTestObj.c: * win/tclWinFile.c: * unix/Makefile.in: Updated to reflect deletion of tclMathOp.c. * win/Makefile.in: * win/makefile.bc: * win/makefile.vc:
* * generic/tclExecute.c: Safety checks to avoid crashes in thedgp2007-06-261-8/+7
| | | | | TclStack* routines when called with an incompletely initialized interp. [Bug 1743302]
* * generic/tclExecute.c: Revised TclStackRealloc() signature to betterdgp2007-06-221-6/+23
| | | | | | | * generic/tclInt.h: parallel (and fall back on) Tcl_Realloc. * generic/tclNamesp.c (TclResetShadowesCmdRefs): Replaced ckrealloc based allocations with TclStackRealloc allocations.
* * generic/tclBasic.c (TEOvI): Made sure that leaveMiguel Sofer2007-06-211-4/+16
| | | | | | | * generic/tclExecute.c (INST_INVOKE): traces that were created * tests/trace.test (trace-36.2): during execution of an originally untraced command do not fire [Bug 1740962], partial fix.
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* improve comments on Tcl stack managementMiguel Sofer2007-06-191-1/+12
|
* adding comments to GrowEvaluationStackMiguel Sofer2007-06-191-1/+13
|
* * generic/tclCmdIL.c (InfoFrameCmd):Miguel Sofer2007-06-181-3/+3
| | | | | | | * 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/tclExecute.c (TEBC): Moved the CmdFrame off the C stackMiguel Sofer2007-06-181-19/+20
| | | | and onto the Tcl stack, between the catch and the execution stacks
* Fix [Bug 1738542]dkf2007-06-171-136/+173
|
* * generic/tclCompCmds.c: Simplified [variable] compiler andMiguel Sofer2007-06-151-36/+39
| | | | | * generic/tclExecute.c: executor. Missed updates to "there is always a valid frame".
* * generic/tclCompile.c: reverted TclEvalObjvInternal andMiguel Sofer2007-06-151-9/+3
| | | | | | | | | | | | * 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/tclCompile.c: SetByteCodeFromAny() can no longer returndgp2007-06-141-9/+4
| | | | | * generic/tclExecute.c: any code other than TCL_OK, so remove code * generic/tclProc.c: that formerly handled exceptional codes.
* * generic/tclExecute.c (TclCompEvalObj): missed update to "thereMiguel Sofer2007-06-141-6/+2
| | | | | | | | | is always a valid frame". * generic/tclProc.c (TclObjInterpProcCore): call TEBC directly instead of going through TclCompEvalObj - no need to check the compilation's freshness, this has already been done. This improves speed and should also provide some relief to [Bug 1066755].
* * generic/tclExecute.c: comments added to explain iPtr->numLevelsMiguel Sofer2007-06-111-2/+5
| | | | management.
* * generic/tclBasic.c: Further TEOvI split, creating a newMiguel Sofer2007-06-101-14/+3
| | | | | | | * 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/tclExecute.c (TclExecuteByteCode): restore support forhobbs2007-06-101-9/+140
| | | | | INST_CALL_BUILTIN_FUNC1 and INST_CALL_FUNC1 bytecodes to support 8.4- precompiled sources (math functions). [Bug 1720895]
* * generic/tclExecute.c (INST_INVOKE): isolated two vars to theMiguel Sofer2007-06-091-3/+3
| | | | small block where they are actually used.
* * generic/tclBasic.c: Split TEOv in two, by separating aMiguel Sofer2007-06-091-42/+3
| | | | | | | | | | | | | | | | | | | | | | processor for non-TCL_OK returns. Also spli TEOvI in a full version that handles non-existing and traced commands, and a separate shorter version for the regular case. * generic/tclBasic.c: Moved the generation of command strings for * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in TclCheck[Interp|Execution]Traces(). Also insured that the strings are properly nul terminated at the correct length [Bug 1693986] * generic/tclBasic.c: Extend usage of TclLimitReady() and * generic/tclExecute.c: (new) TclLimitExceeded() macros. * generic/tclInt.h: * generic/tclInterp.c: * generic/tclInt.h: New TclCleanupCommandMacro for core usage. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclObj.c:
* * generic/tclInt.h:Miguel Sofer2007-06-051-182/+278
| | | | * generic/tclExecute.c: Tcl-stack reform, [Patch 1701202]
* suppress compiler warnings about values computed and not useddgp2007-05-171-3/+3
|
* Added macro version of Tcl_LimitReady.dkf2007-05-171-65/+94
|
* Better const correctnessdkf2007-05-111-4/+4
|
* * generic/tclExecute.c (TclExecuteByteCode): Plugged six memoryKevin B Kenny2007-04-241-1/+7
| | | | leaks in bignum arithmetic.
* * generic/tclCkalloc.c: fix warnings from gcc build configured withdas2007-04-231-21/+20
| | | | | * generic/tclCompile.c: --enable-64bit --enable-symbols=all. * generic/tclExecute.c:
* * generic/tclExecute.c (INST_LSHIFT): fixed a mistake introducedMiguel Sofer2007-04-191-2/+2
| | | | | | | in version 1.266 ('=' became '=='), which effectively turned the block that handles native shifts into dead code. This explains why the testsuite did not pick this mistake. Rewrote to make the intention clear.
* * generic/tclExecute.c: slight changes in Tcl_Obj management.Miguel Sofer2007-04-181-22/+28
|
* * generic/tclExecute.c: fixed checkInterp logic [Bug 1702212]Miguel Sofer2007-04-171-8/+11
|
* Always cast arg to ckfree to char*, not VOID*dkf2007-04-171-3/+3
|
* * generic/tclExecute.c: removed some code at INSTEXPAND_SKTOP thatMiguel Sofer2007-04-141-8/+6
| | | | duplicates functionality already present at checkForCatch.
* removed stray '//'Miguel Sofer2007-04-111-2/+2
|
* * generic/tclExecute.c: new macros OBJ_AT_TOS, OBJ_UNDER_TOS,Miguel Sofer2007-04-111-141/+145
| | | | | | OBJ_AT_DEPTH(n) and CURR_DEPTH that remove all direct references to tosPtr from TEBC (after initialisation and the code at the label cleanupV_pushObjResultPtr).
* Complete conversion to ANSI function definitionsdkf2007-04-101-3/+3
|
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+4
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclExecute.c (TEBC): small code reduction.Miguel Sofer2007-04-071-25/+2
|
* * generic/tclExecute.c (TEBC):Miguel Sofer2007-04-061-291/+308
| | | | | | | | * generic/tclNamespace.c (NsEnsembleImplementationCmd): * generic/tclProc.c (InitCompiledLocals, ObjInterpProcEx, TclObjInterpProcCore, ProcCompileProc): code reordering to reduce branching and improve branch prediction (assume that forward branches are typically not taken).
* * generic/tclExecute.c: INST_INVOKE optimisation [Patch 1693802]Miguel Sofer2007-04-031-6/+24
|
* * generic/tclBasic.c: Added bytecode compilers for theMiguel Sofer2007-04-031-1/+126
| | | | | | | | * 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/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-2/+1
| | | | | | | | | | | | * generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* Ensure that the count of commands commenced by bytecode is correct at all timesdkf2007-04-011-303/+543
| | | | | | 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/tclExecute.c: optimise the lookup of elements of indexedMiguel Sofer2007-03-301-11/+39
| | | | arrays.
* * generic/tclExecute.c: Revised GrowEvaluationStack to take andgp2007-03-221-30/+31
| | | | | | argument specifying the growth required by the caller, so that a single reallocation / copy is the most that will ever be needed even when required growth is large.
* * generic/tclExecute.c: More ckalloc -> ckrealloc conversions.dgp2007-03-211-20/+11
| | | | * generic/tclLiteral.c:
* Fix trivial error in comment.dkf2007-03-201-2/+2
|
* * generic/tclExecute.c (INST_FOREACH_STEP4): Make private copydgp2007-03-121-3/+5
| | | | | | * tests/foreach.test (foreach-10.1): of value list to be assigned to variables so that shimmering of that list doesn't lead to invalid pointers. [Bug 1671087]
* Added a scheme to allow aux-data to be printed out for debugging. For this ↵dkf2007-03-021-26/+23
| | | | | | 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-68/+69
|
* * generic/tclCompExpr.c: Revised implementation of TclInvertOpCmddgp2006-12-081-4/+2
| | | | | | | | | | * 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/tclCompCmds.c: Additional commits correct mostdgp2006-12-071-5/+16
| | | | | * generic/tclExecute.c: failing tests illustrating bugs uncovered * generic/tclMathOp.c: in [Path 1578137].
* TIP#298 IMPLEMENTATIONdgp2006-12-011-77/+17
| | | | | | | | | | | * generic/tcl.decls: Tcl_GetBignumAndClearObj -> Tcl_TakeBignumFromObj. * generic/tclObj.c: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclExecute.c: Update callers. * generic/tclMathOp.c: