summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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
|
* Fix [Bug 1379349]dkf2005-12-131-4/+7
|
* New TEBC opcode, INST_JUMP_TABLE, for compiling the simple (and common) case ofdkf2005-11-301-17/+41
| | | | | [switch] into a jump-table. Much faster for long switches. Also compiler support for generating the new instruction where appropriate.
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
* * generic/tclBinary.c:Miguel Sofer2005-11-041-7/+1
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* ANSIfy (though only partially - function decls only - for tclExecute.c)dkf2005-11-021-184/+222
|
* * generic/tclExecute.c (INST_INCR_*): fixed [Bug 1334570]. ObjMiguel Sofer2005-10-221-4/+4
| | | | leak detection and patch by Eric Melbardis.
* * generic/tclClock.c: Removed some dead code.dgp2005-10-191-31/+1
| | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclLiteral.c: * generic/tclParseExpr.c: * generic/tclScan.c: * generic/tclUtil.c: * generic/tclVar.c:
* * generic/tclExecute.c (INST_DICT_APPEND, INST_DICT_LAPPEND):Miguel Sofer2005-10-191-2/+2
| | | | | fixed faulty peephole optimisation that can cause crashes [Bug 1331475]
* * generic/tclExecute.c: Added optimization for I32L64 systems todgp2005-10-181-2/+22
| | | | | avoid using bignums to perform int multiplies. The improvement shows up most dramatically in tclbench's matrix.bench.
* * generic/tclExecute.c: Restored some optimizations of thedgp2005-10-151-25/+103
| | | | INST_INCR_SCALAR1_IMM opcode.
* more revisions to TclIncrObjdgp2005-10-141-23/+39
|
* removed another do {} while(0)Kevin B Kenny2005-10-141-11/+10
|
* Tidied up do {...} while(0)Kevin B Kenny2005-10-141-67/+21
|
* * generic/tclExecute.c: Removed obsolete use of NO_ERRNO_H.dgp2005-10-131-11/+3
| | | | | | | | | | * tools/man2tcl.c: * unix/tcl.m4: * unix/tclConfig.h.in: * win/configure.in: * unix/configure: autoconf-2.59 * win/configure:
* * generic/tclExecute.c (GetNumberFromObj): Restored some lostdgp2005-10-121-1/+7
| | | | | optimizations for empty string values. We avoid cost of a call to TclParseNumber just to tell us an empty string isn't a number.