summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* 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:
* fix warningsdas2006-12-011-3/+3
|
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-5/+106
| | | | | | | | | | | | | | | | | | | | | * 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 (TclIncrObj): Correct failure to detectdgp2006-11-271-2/+2
| | | | floating-point increment values. Thanks to William Coleda [Bug 1602991]
* * generic/tclExecute.c (INST_EXPON): Corrected crash ondgp2006-11-171-1/+6
| | | | [expr 2**(1<<63)]. Was operating on cleared bignum Tcl_Obj.
* TIP#270 IMPLEMENTATIONdgp2006-11-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclCompExpr.c: fix gcc warnings about 'cast to/fromdas2006-11-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c: pointer from/to integer of different * generic/tclEvent.c: size' on 64-bit platforms by casting to * generic/tclExecute.c: intermediate types intptr_t/uintptr_t * generic/tclHash.c: via new PTR2INT(), INT2PTR(), * generic/tclIO.c: PTR2UINT() and UINT2PTR() macros. * generic/tclInt.h: [Patch 1592791] * generic/tclProc.c: * generic/tclTest.c: * generic/tclThreadStorage.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/configure.in: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * unix/tclUnixPort.h: * unix/tclUnixTest.c: * unix/tclUnixThrd.c: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-7/+4
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclExecute.c (INST_MOD): Corrected improper testing ofdgp2006-10-301-3/+3
| | | | | * tests/expr.test: the sign of bignums when applying Tcl's division rules. Thanks to Peter Spjuth. [Bug 1585704]
* * generic/tclExecute.c: Corrected error in INST_LSHIFT in thedgp2006-09-281-2/+2
| | | | | | | | * tests/expr.test: calculation done to determine whether a shift in the (long int) type is possible. The calculation had literal value "1" where it needed a value "1L" to compute the correct result. Error detected via testing with the math::bigfloat package [Bug 1567222]
* * generic/tclExecute.c (INST_EXPON): Native type overflow detectiondgp2006-09-191-46/+6
| | | | | | | * tests/expr.test: was completely broken. Falling back on use of bignums for all non-trivial ** calculations until native-type-constrained special cases can be done carefully and correctly. [Bug 1561260].
* * generic/tclExecute.c: Corrected INST_EXPON flaw that treateddgp2006-09-111-1/+4
| | | | * tests/expr.test: $x**1 as $x**3. [Bug 1555371]
* add casts to make gcc2 happy with previous commit [Bug 1548330]das2006-08-291-25/+25
|
* fixed printf format warnings from gcc4 when TCL_COMPILE_STATS defineddas2006-08-281-7/+7
|
* Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-5/+5
|
* * generic/tclExecute.c: Corrected flawed overflow detection indgp2006-07-261-2/+5
| | | | | * tests/expr.test: INST_EXPON that caused [expr 2**64] to return 0 instead of the same value as [expr 1<<64].
* * generic/tclExecute.c:Miguel Sofer2006-07-211-4/+9
| | | | * tests/execute.test (execute-9.1): dgp's fix for [Bug 1522803].
* * generic/regc_locale.c (cclass):das2006-07-201-5/+5
| | | | | | | | | | | | | * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOCmd.c (Tcl_ExecObjCmd): * generic/tclListObj.c (NewListIntRep): * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, FreeBignum, Tcl_SetBignumObj): * generic/tclParseExpr.c (Tcl_ParseExpr): * generic/tclStrToD.c (TclParseNumber): * generic/tclStringObj.c (TclAppendFormattedObjs): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
* * generic/tclIOUtil.c: Changed default configuration todgp2006-06-211-3/+1
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: #undef USE_OBSOLETE_FS_HOOKS which disables * generic/tclTest.c: access to the Tcl 8.3 internal routines for hooking into filesystem operations. Everyone ought to have migrated to Tcl_Filesystems by now. ***POTENTIAL INCOMPATIBILITY*** for any code still stuck in the pre-Tcl_Filesystem era. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclStrToD.c: Removed dead code that permitted disabling of recognition of the new 0b and 0o numeric formats. * generic/tclExecute.c: Removed dead code that implemented alternative * generic/tclObj.c: design where numeric values did not automatically narrow to the smallest Tcl_ObjType required to hold them.
* * generic/tclExecute.c: remove unused var and silence gcc warningMiguel Sofer2006-03-301-3/+6
|
* * generic/tclExecute.c: Revised INST_MOD implementation to dodgp2006-03-291-28/+154
| | | | | calculations in native types as much as possible, moving to mp_ints only when necessary.
* * generic/tclExecute.c: Merge INST_MOD computation in with thedgp2006-03-271-2/+2
| | | | | | | | INST_?SHIFT instructions, which also operate only on two integral values. Also corrected flaw that made INST_BITNOT of wide values require mp_int calculations. Also corrected type that missed optimized handling of the tclBooleanType by the TclGetBooleanFromObj macro.
* * generic/tclExecute.c: Merge INST_MOD computation in with thedgp2006-03-271-431/+64
| | | | | | INST_?SHIFT instructions, which also operate only on two integral values. Also corrected flaw that made INST_BITNOT of wide values require mp_int calculations.
* * generic/tclExecute.c: Corrections to INST_EXPON detection ofdgp2006-03-251-4/+8
| | | | overflow to use mp_int calculations.
* add missing casts to int that were making VC6 complainKevin B Kenny2006-03-241-3/+3
|
* * generic/tclExecute.c: Revised INST_EXPON implementation to dodgp2006-03-241-190/+122
| | | | | calculations in native types as much as possible, moving to mp_ints only when necessary.
* avoid unused var compiler warningdas2006-03-241-2/+2
|
* * generic/tclExecute.c: Merged INST_EXPON handling in with the otherdgp2006-03-231-91/+68
| | | | binary operators that operate on all number types (INST_ADD, etc.).
* * generic/tclExecute.c: Complete missing bit of TIP 215 implementationdgp2006-03-081-2/+2
| | | | * tests/incr.test:
* TIP#215 IMPLEMENTATIONdgp2006-02-091-2/+2
| | | | | | | | | | * doc/incr.n: Revised [incr] to auto-initialize when varName * generic/tclExecute.c: argument is unset. [Patch 1413115]. * generic/tclVar.c: * tests/compile.test: * tests/incr-old.test: * tests/incr.test: * tests/set.test:
* Export Tcl_InitBignumFromDoubleKevin B Kenny2005-12-271-3/+3
|
* A little bit of tidying up in INST_DICT_DONE (fewer type puns, faster).dkf2005-12-181-12/+19
|