summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* performance improvements to [incr]Kevin B Kenny2005-10-121-60/+65
|
* * generic/tclExecute.c: Corrections to the NO_WIDE_TYPE build. Alsodgp2005-10-101-1/+2
| | | | added missing "break" to a switch that broke wide XOR operations.
* * generic/tclExecute.c: Corrections to the NO_WIDE_TYPE build.dgp2005-10-101-4/+6
| | | | | | * generic/tclInt.h: Restored HEAD to the NO_WIDE_TYPE configuration until some breakage in the #undef NO_WIDE_TYPE configuration is corrected.
* removing wrong commentMiguel Sofer2005-10-101-2/+1
|
* * generic/tclExecute.c: fixing errors in last commit.Miguel Sofer2005-10-101-1/+3
|
* * generic/tclBasic.c:Miguel Sofer2005-10-091-51/+67
| | | | | | | * generic/tclExecute.c: * generic/tclStrToD.c: * generic/tclStringObj.c: initialise variables to avoid compiler warnings ([Bug 1320818] among others).
* TIP#237 IMPLEMENTATIONdgp2005-10-081-1009/+1656
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* * generic/tclBasic.c: More callers of TclObjPrintf anddgp2005-09-151-2/+3
| | | | | | | | | | | | | | * generic/tclCkalloc.c: TclFormatToErrorInfo. * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c * unix/configure: autoconf-2.59
* * generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed todgp2005-09-141-6/+6
| | | | | | | | | | | | | | | | | | support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
* Fix memory leak caused by throwing away a duplicated objectdkf2005-08-251-5/+4
|
* * generic/tclExecute.c (INST_DICT_*): stop 2 compilerMiguel Sofer2005-07-231-2/+3
| | | | warnings for uninitialised variables.
* Improve the incrementer code for INST_DICT_INCR_IMM, removing a gcc-ism.dkf2005-07-221-9/+25
|
* Compiler for [dict] and related changes.dkf2005-07-211-4/+525
|
* Purely style-guide cleansingdkf2005-07-111-2163/+2063
|
* * generic/tclExecute.c (TclExecuteByteCode):mdejong2005-07-091-49/+141
| | | | | | | | | | | | | | | | | Reimplement long and wide type integer division and modulus operations so that the smallest and largest integer values are handled properly. The divide operation is more efficient since it no longer does a modulus or negation and only checks for a remainder when the quotient will be a negative number. The modulus operation is now a bit more complex because of a number of special cases dealing with the smallest and largest integers. * tests/expr.test: Add test cases for division and modulus operations on the smallest and largest integer values for 32 and 64 bit types. [Patch 1230205]
* * generic/tclExecute.c (TclExecuteByteCode):mdejong2005-06-291-5/+29
| | | | | | | | | | | When parsing an integer operand for a unary minus expression operator, check for a wide integer that is actually LONG_MIN. If found, convert it back to a long int type. * tests/expr.test: Add constraint for 32bit long int type and 64bit wide int type. Add tests that parse the smallest/largest long int and wide int values.
* typosdkf2005-06-201-1/+2
|
* Add compilation for TIP#90-style [catch] requiring a new opcode [Bug1219112]dkf2005-06-201-153/+149
|
* * generic/tclBasic.c (Tcl_ExprBoolean): Rewrite as wrapper arounddgp2005-05-181-46/+31
| | | | | | | | | | | | | | | | Tcl_ExprBooleanObj. * generic/tclCmdMZ.c ([string is boolean/true/false]): Rewrite dropping string-based Tcl_GetBoolean call, so that internal reps are kept for subsequent quick boolean operations. * generic/tclExecute.c: Dropped most special handling of the "boolean" Tcl_ObjType, since that type should now be rarely encountered. * doc/BoolObj.3: Rewrite of documentation dropping many details about the internals of Tcl_Objs. Shorter documentation focuses on the function and use of the routines.
* * generic/tclBasic.c: Dropped the TCL_NO_MATH configuration.dgp2005-05-131-4/+2
| | | | | | * generic/tclBinary.c: It's believed this has not been working * generic/tclExecute.c: in a long time. Tcl needs math.h. * unix/Makefile.in: [RFE 1200680].
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-865/+32
|
* * generic/tclExecute.c (ExponLong, ExponWide): fixed special caseMiguel Sofer2005-05-101-3/+3
| | | | 'i**0' for i>0 [Bug 1198892]
* fix commentsMiguel Sofer2005-04-251-2/+5
|
* * generic/tclExecute.c: fix for [Bug 1189274].Miguel Sofer2005-04-251-2/+2
|
* The 2005-04-21 changes to Tcl_GetBooleanFromObj were done to bringdgp2005-04-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | it into agreement with its docs. Further investigation reveals it was the docs that were incorrect. * doc/BoolObj.3: Corrections to the documentation of Tcl_GetBooleanFromObj to bring it into agreement with what this public interface has always done, including noting the difference in function between Tcl_GetBooleanFromObj and Tcl_GetBoolean. * generic/tclGet.c: Revised Tcl_GetBoolean to no longer be a wrapper around Tcl_GetBooleanFromObj (different function!). * generic/tclObj.c: Removed TclGetTruthValueFromObj routine that was added yesterday. Revisions so that only Tcl_GetBoolean-approved values get the "boolean" Tcl_ObjType. This retains the fix for [Bug 1187123]. * generic/tclInt.h: Revert most recent change. * generic/tclBasic.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * tests/obj.test:
* * generic/tclGet.c: Radical code simplification. Converteddgp2005-04-211-5/+5
| | | | | | | | | | | | | | | | | | Tcl_GetFoo() routines into wrappers around Tcl_GetFooFromObj(). Reduces code duplication, and the resulting potential for inconsistency. * generic/tclObj.c: Several changes: - Fixed Tcl_GetBooleanFromObj to agree with its documentation and with Tcl_GetBoolean, accepting only "0" and "1" and not other numeric strings. [Bug 1187123] - Added new private routine TclGetTruthValueFromObj to perform the more permissive conversion of numeric values to boolean that is needed by the [expr] machinery. * generic/tclInt.h (TclGetTruthValueFromObj): New routine. * generic/tclExecute.c: Updated callers to call new routine. * tests/obj.test: Corrected bad tests that actually expected values like "47" and "0xac" to be accepted as booleans.
* * generic/tclExecute.c: missing semicolons caused failure toMiguel Sofer2005-04-151-3/+3
| | | | compile with TCL_COMPILE_DEBUG.
* fix in last commitMiguel Sofer2005-04-091-6/+7
|
* * generic/tclExecute.c: fix possible leak of expansion Tcl_ObjsMiguel Sofer2005-04-091-3/+12
|
* * 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: small opts in obj handlingMiguel Sofer2005-04-041-61/+46
|
* Changed the internal representation of lists to (a) reduce the malloc/freeMiguel Sofer2005-04-021-5/+4
| | | | | | | | calls at list creation (from 2 to 1), (b) reduce the cost of handling empty lists (we now never create a list internal rep for them), (c) allow refcounting of the list internal rep. The latter permits insuring that the pointers returned by Tcl_ListObjGetElements remain valid even if the object shimmers away from its original list type. This is [Patch 1158008]
* slight reduction in cost of INST_START_CMDMiguel Sofer2005-04-011-7/+29
|
* * generic/tclExecute.c:Miguel Sofer2005-04-011-4/+11
| | | | | * generic/tclInt.h: ExecEnv now stores two Tcl_Obj* pointing to the constants "0" and "1", for use by TEBC.
* * generic/tclExecute.c:Miguel Sofer2005-04-011-82/+96
| | | | | | | | | * generic/tclInt.h: * generic/tclObj.c: * generic/tclStringObj.c: defined new internal macros for creating and setting frequently used obj types (int,long, wideInt, double, string). Changed TEBC to use eg 'TclNewIntObj(objPtr, i)' to avoid the function call in 'objPtr = Tcl_NewIntObj(i)'
* * generic/tclExecute.c (INST_JUMP_TRUE/FALSE): replacedMiguel Sofer2005-03-311-70/+58
| | | | "test and branch" with "compute index into table"
* * generic/tclExecute.c: fixed INST_PUSH1's debugging code (wrongMiguel Sofer2005-03-141-2/+2
| | | | obj ref passed to TRACE_WITH_OBJ).
* * generic/tclExecute.c: new peephole optimisation for INST_PUSH1;Miguel Sofer2005-03-071-6/+27
| | | | | fixed the peephole opt in INST_POP so that it is not used when TCL_COMPILE_DEBUG is defined.
* * generic/tclExecute.c (TclCompEvalObj): Removed stray statementdgp2005-02-011-2/+1
| | | | left behind in prior code reorganization.
* Avoid sharing cmdName literals accross namespaces, and generalise usage ofMiguel Sofer2004-12-241-2/+2
| | | | the TclRegisterNewLiteral macro [Patch 1090905]