summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* remove stray calls to Tcl_Alloc and friends: the core should only use ↵mig2013-01-021-3/+3
| | | | ckalloc to allow MEM_DEBUG to work properly
* make some more internal tables constjan.nijtmans2012-04-231-2/+2
|\
| * make some more internal tables constjan.nijtmans2012-04-231-1/+1
| | | | | | On cygwin, install dll's in /usr/bin, not in /usr/lib
| * make some more internal tables CONSTjan.nijtmans2012-04-181-4/+4
| | | | | | fix compilation with -DNO_CONST
* | some formatting (*.decls)jan.nijtmans2012-04-041-1/+1
|\ \ | |/ | | | | | | move up #undef, for macro which is conflicting with later stuff. remove some unused cygwin-related code some minor gcc warnings
| * wipunprovendgp2011-07-121-25/+25
| |
| * Type mismatches in *printf calls.dgp2011-07-111-7/+9
| |
* | * generic/tclExecute.c (TclCompEvalObj): earlier return if Tip280 gymnastics ↵mig2011-04-071-39/+37
| | | | | | | | not needed
* | 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
| |
| * * generic/tclExecute.c (INST_CONCAT1): added a peepholeMiguel Sofer2004-09-101-1/+15
| | | | | | | | | | | | optimisation for concatting an empty string. This enables replacing the idiom 'K $x [set x {}]' by '$x[set x {}]' for fastest execution.
| * added support for wide integers to round(); [Bug 908375], reported byMiguel Sofer2004-07-031-39/+37
| | | | | | | | Hemang Lavana.
| * * generic/tclExecute.c (VerifyExprObjType): use GET_WIDE_OR_INT tohobbs2004-05-251-2/+3
| | | | | | | | | | | | properly have tclIntType used for smaller values. This corrects TclX bug 896727 and any other 3rd party extension that created math functions but was not yet WIDE_INT aware in them.
| * * generic/tclExecute.c: adding (DE)CACHE_STACK_INFO() pairs toMiguel Sofer2003-09-191-17/+75
| | | | | | | | | | protect all calls that may cause traces on ::errorInfo or ::errorCode to corrupt the stack [Bug 804681]
| * * generic/tclExecute.c (INST_INVOKE, INST_EVAL, INST_PUSH_RESULT):Miguel Sofer2003-08-051-4/+30
| | | | | | | | | | | | | | | | added a Tcl_ResetResult(interp) at each point where the interp's result is pushed onto the stack, to avoid keeping an extra reference that may cause costly Tcl_Obj duplication [Bug 781585] Detected by Franco Violi, analyzed by Peter Spjuth and Donal Fellows.
| * * generic/tclBasic.c:Miguel Sofer2003-06-101-3/+6
| | | | | | | | | | | | | | * generic/tclExecute.c: let TclExecuteObjvInternal call TclInterpReady instead of relying on its callers to do so; fix for the part of [Bug 495830] that is new in 8.4. * tests/interp.test: Added tests 18.9 (knownbug) and 18.10
| * * generic/tclExecute.c (ExprCallMathFunc): remove incorrecthobbs2003-04-181-2/+2
| | | | | | | | extraneous cast from Tcl_WideAsDouble.
| * * generic/tcl.h Made changes so that the "wideInt" Tcl_ObjTypedgp2003-04-161-190/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclObj.c is defined on all platforms, even those where * generic/tclPort.h TCL_WIDE_INT_IS_LONG is defined. Also made the Tcl_Value struct have a wideValue field on all platforms. This is a ***POTENTIAL INCOMPATIBILITY*** for TCL_WIDE_INT_IS_LONG platforms because that struct changes size. This is the same TIP 72 incompatibility that was seen on other platforms at the 8.4.0 release, when this change should have happened as well. [Bug 713562] * generic/tclInt.h: New internal macros TclGetWide() and TclGetLongFromWide() to deal with both forms of the "wideInt" Tcl_ObjType, so that conditional TCL_WIDE_INT_IS_LONG code is confined to the header file. * generic/tclCmdAH.c: Replaced most coding that was conditional * generic/tclCmdIL.c: on TCL_WIDE_INT_IS_LONG with code that * generic/tclExecute.c: works across platforms, sometimes using * generic/tclTest.c: the new macros above to do it. * generic/tclUtil.c: * generic/tclVar.c:
* | Backport of Miguel's 2010-09-22 fix on 8.6 branch (decache stack info ↵ferrieux2011-01-191-1/+39
| | | | | | | | wherever ::errorInfo may be updated, for trace sanity). [Bug 3138178]
* | * generic/tclExecute.c (GrowEvaluationStack): Off-by-one error inMiguel Sofer2011-01-131-4/+4
| | | | | | | | | | | | sizing the new allocation - was ok in comment but wrong in the code. Triggered by [Bug 3142026] which happened to require exactly one more than what was in existence. BACKPORT.
* | * doc/interp.n: [3081184] TIP #378.andreas_kupries2010-11-151-5/+9
| | | | | | | | | | | | | | | | | | | | * doc/tclvars.n: Performance fix for TIP #280. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclInterp.c: * tests/info.test: * tests/interp.test:
* | * generic/tclExecute.c: fix overallocation of exec stack in TEBCMiguel Sofer2010-10-091-3/+3
| | | | | | | | (mixing numwords and numbytes)
* | correct evalstats to use %#lx for %p for Tcl_AppendPrintfToObjhobbs2010-10-041-2/+2
| |
* | * generic/tclExecute.c (EvalStatsCmd): change 'evalstats' tohobbs2010-10-021-92/+112
| | | | | | | | | | | | | | | | | | return data to interp by default, or if given an arg, use that as filename to output to (accepts 'stdout' and 'stderr'). Fix output to print used inst count data. * generic/tclCkalloc.c: change TclDumpMemoryInfo sig to allow * generic/tclInt.decls: objPtr as well as FILE* as output. * generic/tclIntDecls.h:
* | * 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.
* | * generic/tclExecute.c (IllegalExprOperandType): [Bug 3024379]: Madedkf2010-07-021-1/+2
| | | | | | | | | | | | sure that errors caused by an argument to an operator being outside the domain of the operator all result in ::errorCode being ARITH DOMAIN and not NONE.