summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* wipunprovendgp2011-07-121-25/+25
|
* Type mismatches in *printf calls.dgp2011-07-111-7/+9
|
* 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:
* * generic/tclCompile.c (TclCompileExprWords): remove unusedMiguel Sofer2003-02-191-3/+1
| | | | | | | | | variable "range" [Bug 664743] * generic/tclExecute.c (ExprSrandFunc): remove unused variable "result" [Bug 664743] * generic/tclStringObj.c (UpdateStringOfString): remove unused variable "length" [Bug 664751] * tests/execute.test (execute-7.30): fix for [Bug 664775]
* * generic/tclExecute.c (TclExecuteByteCode INST_STR_MATCH):hobbs2003-02-181-3/+9
| | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_StringObjCmd STR_MATCH): * generic/tclUtf.c (TclUniCharMatch): * generic/tclInt.decls: add private TclUniCharMatch function that * generic/tclIntDecls.h: does string match on counted unicode * generic/tclStubInit.c: strings. Tcl_UniCharCaseMatch has the * tests/string.test: failing that it can't handle strings or * tests/stringComp.test: patterns with embedded NULLs. Added tests that actually try strings/pats with NULLs. TclUniCharMatch should be TIPed and made public in the next minor version rev.
* * generic/tclExecute.c (TclExecuteByteCode): When anmdejong2003-02-061-1/+2
| | | | | | | | | | | | | error is encountered reading the increment value during a compiled call to incr, add a "(reading increment)" error string to the errorInfo variable. This makes the errorInfo variable set by the compiled incr command match the value set by the non-compiled version. * tests/incr-old.test: Change errorInfo result for the compiled incr command case to match the modified implementation. * tests/incr.test: Add tests to make sure the compiled and non-compiled errorInfo messages are the same.
* * generic/tclExecute.c (TclExprFloatError): Use the IS_NAN macrodgp2003-01-081-2/+2
| | | | for greater clarity of code.
* * generic/tclExecute.c (TclExecuteByteCode): improve INST_STR_CMPhobbs2002-11-121-10/+19
| | | | | to use memcmp in the one-byte/char case, also use direct index for INST_STR_INDEX in that case.
* Removing more CONST-related warnings.dkf2002-09-241-11/+12
|
* * generic/tclExecute.c: bugfix (reading freed memory). TestsuiteMiguel Sofer2002-08-011-22/+18
| | | | passed on linux/i386, compile-13.1 hung on linux/alpha.
* * generic/tclInt.h (USE_THREAD_ALLOC): for unshared objects,Miguel Sofer2002-08-011-19/+73
|
* Comment formatting fixesdkf2002-07-311-46/+46
|
* * generic/tclExecute.c: fixed Tcl_Obj leak in code correspondingMiguel Sofer2002-07-271-2/+2
| | | | to the macro NEXT_INST_V(x, 0, 1) [Bug 587495].
* * generic/tclExecute.c:Miguel Sofer2002-07-261-6/+55
| | | | | * tests/expr-old.test: fix for erroneous error messages in [expr], [Bug 587140] reported by Martin Lemburg.
* * generic/tclExecute.c: restoring full TCL_COMPILE_DEBUGMiguel Sofer2002-07-241-239/+117
| | | | functionality.
* * generic/tclExecute.c: restoring the tcl_traceCompile functionalityMiguel Sofer2002-07-241-1/+7
| | | | | | while I repair tcl_traceExec. The core now compiles and runs also under TCL_COMPILE_DEBUG, but execution in the bytecode engine can still not be traced.
* Allowed parser to recognise 'Inf' as a floating-point number. [Bug 218000]dkf2002-07-221-2/+19
| | | | Also produce better error messages when this happens.
* Global symbols are now all either prefixed with 'tcl' (or 'Tcl' or ...) or ↵dkf2002-07-191-7/+6
| | | | have file-scope.