summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* [e087812465] Trim back operatorStrings array to just the entries that aredgp2014-11-241-4/+2
| | | needed. Trims away the part of the array that was out of sync with the opcodes.
* Fix more corner-cases like ↵jan.nijtmans2014-05-011-5/+5
| | | | [0e92c404f19ede5b2eb06e6db27647d3138cc56|0e92c404f1]: The only place where a type of &tclByteArrayType can be trusted is when determining its length, because the character length of a (UTF-8) string is always equal to the byte length of the byte array.
* Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before ↵jan.nijtmans2014-01-311-3/+5
| | | | sanity check ?
* Suggested fix for [bdd91c7e43]: tclsh crashes in [interp delete]bug_bdd91c7e43jan.nijtmans2013-09-131-0/+1
|
* fix for perf bug detected by Kieran ↵mig2013-06-031-5/+6
| | | | (https://groups.google.com/forum/?fromgroups#!topic/comp.lang.tcl/vfpI3bc-DkQ)
* Don't #define VOID on VxWorks, as it is already typdef'd to void. Eliminate ↵jan.nijtmans2013-05-191-4/+4
|\ | | | | | | possibly conflicting LOCAL/OFFSET
| * Protect against multiple uses of a CompileEnv with only one initialization.dgp2013-02-211-18/+1
| | | | | | | | | | Make TclFreeCompileEnv smarter about cleanup so all callers do not have to be. Revise TclSetByteCodeFromAny() so that when hookProc raises an error, bytecode is not generated. This was rumored to cause crashes.
| * Silence some compiler warnings.dgp2013-01-241-0/+3
| |
| * More complete purge of things only present for supporting long-dead Mac 9 ↵dgp2012-11-151-1/+1
| | | | | | | | systems.
* | Tcl_InvalidateStringRep -> TclInvalidateStringRepjan.nijtmans2013-02-071-1/+1
| |
* | Use twoPtrValue.ptr1 in stead of otherValuePtr everywhere. This is exactly ↵jan.nijtmans2013-01-311-6/+5
| | | | | | | | the same field, but it allows twoPtrValue.ptr2 to be used for other purposes.
* | 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.