summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* converting to using Tcl_Obj API for error message generation; part donedkf2012-08-031-18/+20
|
* * generic/tclExecute.c (INST_LIST_RANGE_IMM): Enhance implementationdkf2012-02-161-2/+23
| | | | so that shortening a (not multiply-referenced) list by lopping the end off with [lrange] or [lreplace] is efficient.
* Make some of the logic in TclCompileObj less heavily nested, to improve clarity.dkf2011-11-221-99/+98
|
* Fix a bug where global precompiled code (A) called from a precompiled andreask2011-11-211-7/+9
| | | | | | | | | | | | | | | | | | | | procedure causes the core to recompile (A), triggering the trap laid inside, i.e. 'error "called a copy of compiled code"'. <pre>Example ----------------------ex1.tcl proc init {} { source ex2.tcl } init ----------------------ex2.tcl puts a ----------------------</pre> When run as precompiled code the 'puts a' is not executed, only the trap. Fixed by enclosing the offending code into a guard which prevents its execution for precompiled code. The change passes the entire testsuite.
* Added support for having the dict var itself referenced by LVT index.dkf2011-10-031-13/+47
|
* Experimental compilation of the [dict with] subcommand. No tests yet, and notdkf2011-10-021-4/+41
| | | | yet certain that the added bytecode opcodes are correct; evaluation is still needed (but the test suite does pass...)
* [Bug 2919042] Restore "valgrindability" of Tcl that was lost by the ↵ferrieux2011-08-091-4/+8
| | | | streamlining of [exit], by conditionally forcing a full Finalize: use -DPURIFY or ::env(TCL_FINALIZE_ON_EXIT)
* platform portable type matching in debug printsdgp2011-07-121-1/+1
|
* Correct cast for CURR_DEPTH to silence compiler warning. [Bug 3339502]Joe Mistachkin2011-07-111-1/+1
|
* Reverted the fix for [Bug 3274728] committed on 2011-04-06 (rev ↵andreask2011-06-081-3/+3
| | | | [caf317ab68]) and replaced with one which is 64bit-safe. The existing fix crashed tclsh on Windows 64bit.
* TclFreeIntRep() cleanup.dgp2011-04-271-1/+0
|
* * generic/tclExecute.c (TclCompileObj): earlier return if Tip280 gymnastics ↵mig2011-04-071-1/+5
|\ | | | | | | not needed.
| * * generic/tclExecute.c (TclCompEvalObj): earlier return if Tip280 gymnastics ↵mig2011-04-071-39/+37
| | | | | | | | not needed
* | last bugfix was incompletemig2011-04-071-1/+1
| |
* | * generic/tclExecute.c: fix for [Bug 3274728], making *catchTop an unsigned ↵mig2011-04-061-2/+2
| | | | | | | | long.
* | Reduce the number of casts used to manage Tcl_Obj internal representations.dkf2011-03-261-78/+69
| |
* | remove TD->expanded, not needed nowmig2011-03-131-8/+1
| |
* | * generic/tclExecute.c: remove TEBCreturn()mig2011-03-131-27/+10
| |
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-10/+10
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | * generic/tclExecute.c (TclStackFree): insure that the execStack satisfiesMiguel Sofer2011-03-051-8/+17
| | | | | | | | "at most one free stack after the current one" when consecutive reallocs caused the creation of intervening stacks.
* | * generic/tclExecute.c: cleaner mem management for TEBCdataMiguel Sofer2011-03-051-4/+8
| |
* | Renamed BottomData to TEBCdata, so that the name refers to what it is rather ↵Miguel Sofer2011-03-051-52/+45
| | | | | | | | than to its storage location.
* | Renamed struct TEOV_callback to the more descriptive NRE_callback.Miguel Sofer2011-03-051-2/+2
| |
* | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ | |/ | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * generic/tclExecute.c: [Bug 3057639]. Applied patch by Jeff toandreas_kupries2010-09-011-7/+7
| | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c: make the behaviour of lappend in bytecompiled * tests/append.test: mode consistent with direct-eval and 'append' * tests/appendComp.test: generally. Added tests (append*-9.*) showing the difference.
| | * Fix [Bug 2954959] expr abs(-0.0) is -0.0nijtmans2010-02-221-1/+11
| | | | | | | | | | | | Added some test cases, adapted and backported from 8.5
| | * * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, ListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-22): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script's, to properly account for them while counting lines for #280, during direct and compiled execution.
| | * * generic/tclBasic.c (DeleteInterpProc,TclArgumentBCEnter,andreas_kupries2009-07-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TclArgumentBCRelease, TclArgumentGet): * generic/tclCompile.c (EnterCmdWordIndex, TclCleanupByteCode, TclInitCompileEnv, TclCompileScript): * generic/tclCompile.h (ExtCmdLoc): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclInt.h (ExtIndex, CFWordBC): * tests/info.test (info-39.0): Backport of some changes made to the Tcl head, to handle literal sharing better. The code here is much simpler (trimmed down) compared to the head as the 8.4 branch is not bytecode compiling whole files, and doesn't compile eval'd code either. Reworked the handling of literal command arguments in bytecode to be saved (compiler) and used (execution) per command (See the TCL_INVOKE_STK* instructions), and not per the whole bytecode. This removes the problems with location data caused by literal sharing in proc bodies. Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex).
| | * * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflowdgp2009-03-201-2/+8
| | | | | | | | | | | | the max length of a Tcl value. [Bug 2669109]
| | * Fixed the failure to link in the default (non-TCL_TIP280) build.dgp2008-07-231-1/+3
| | |
| | * * generic/tclBasic.c: Reworked the handling of bytecode literalsandreas_kupries2008-07-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclExecute.c: Plug memory leak introduced in thedgp2008-04-141-2/+3
| | | | | | | | | | | | 2008-03-07 commit. [Bug 1940433]
| | * typodgp2008-03-101-3/+3
| | |
| | * * generic/tclExecute.c (Tcl_ExprObj): Revised expression bytecodedgp2008-03-071-31/+103
| | | | | | | | | | | | | | | | | | compiling so that bytecodes invalid due to changing context or due to the difference between expressions and scripts are not reused. [Bug 1899164].
| | * * generic/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.h: tracing of proc and command entry & * generic/tclBasic.c: return, bytecode execution, object * generic/tclExecute.c: allocation and more; with essentially * generic/tclInt.h: zero cost when tracing is inactive; * generic/tclObj.c: enable with --enable-dtrace configure * generic/tclProc.c: arg (disabled by default, will only * unix/Makefile.in: enable if DTrace is present). * unix/configure.in: [Patch 1793984] * macosx/Makefile: enable DTrace support. * unix/configure: autoconf-2.13
| | * * generic/tclExecute.c (INST_FOREACH_STEP4): Re-fetch pointers fordgp2007-03-131-6/+13
| | | | | | | | | | | | | | | * tests/foreach.test (foreach-10.1): the value list each iteration of the loop as defense against shimmers. [Bug 1671087]
| | * * generic/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-3/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCL_TIP280. * 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:
| | * * generic/tclExecute.c (ExprSrandFunc): Restore acceptance of widedgp2006-05-041-11/+11
| | | | | | | | | | | | * tests/expr-old.test: integer values by srand() [Bug 1480509].
| | * * generic/tclExecute.c (ExprAbsFunc): fixed the abs(MIN_INT) casermax2005-12-121-3/+3
| | | | | | | | | | | | | | | so that it doesn't break on compilers that don't assume integers to wrap around (e.g. gcc-4.1.0).
| | * * generic/tclExecute.c (ExprRoundFunc):mdejong2005-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo where number before rounding is compared with smallest integer instead of number after rounding. This fix does not change the results of any tests. * tests/expr.test: Add round() tests for cases near the min and max int values. * tests/util.test: Remove pointless warning code about testobj command.
| | * * generic/tclBasic.c:Miguel Sofer2005-10-231-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclLink.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclScan.c: * generic/tclTest.c: * generic/tclVar.c: * mac/tclMacInit.c: * unix/tclUnixInit.c: * win/tclWinInit.c: Insure that the core never calls TclPtrSetVar, Tcl_SetVar2Ex, Tcl_ObjSetVar2 or Tcl_SetObjErrorCode with a 0-ref new value. It is not possible to handle error returns correctly in that case [Bug 1334947], one has the choice of leaking the object in some cases, or else risk crashing in some others.
| | * * generic/tclExecute.c (INST_CONCAT): disable the optimisation forMiguel Sofer2005-10-221-3/+5
| | | | | | | | | | | | wide integers, [Bug 1251791].
| | * Bug 1275043Kevin B Kenny2005-08-291-10/+23
| | |
| | * fix abs(MIN_INT) [Bug 1241572]Kevin B Kenny2005-08-051-4/+14
| | |
| | * * generic/tclExecute.c (ExprSrandFunc): Replaced incursions into thedgp2005-04-051-6/+2
| | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c (TclGetIntForIndex): intreps of numeric types with simpler calls of Tcl_GetIntFromObj and Tcl_GetLongFromObj, now that those routines are better behaved wrt shimmering. [Patch 1177219]
| | * * generic/tclExecute.c (TclCompEvalObj): Removed stray statementdgp2005-02-011-2/+1
| | | | | | | | | | | | left behind in prior code reorganization.
| | * Final fix for NaN != NaN bug. Thanks to Miguel Sofer for his improved patch.dkf2004-11-021-13/+54
| | | | | | | | | | | | [Bug 761471]
| | * Make sure large shifts shift for real. [Bug 868467]dkf2004-09-181-7/+76
| | |