| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
* generic/tclExecute.c: More performance macros and special
handling of the wide integer type for performance on 32-bit
systems.
|
|
|
|
| |
TclGetNumberFromObj() that saves a function call for common uses.
|
|
|
|
|
|
|
|
| |
* generic/tclInt.h: Made #undef NO_WIDE_TYPE the default on
32-bit systems. Being able to use 64-bit values without leaping
to mp_int should help with performance.
* generic/tclObj.c: Bug fixes in the #undef NO_WIDE_TYPE
* generic/tclExecute.c: configuration.
|
|
|
|
|
| |
* generic/tclExecute.c: Improved performance of comparison opcodes
and bitwise operations and removed yet more dead code.
|
|
|
|
|
| |
* generic/tclExecute.c: Improved performance of comparison opcodes
and removed yet more dead code.
|
| |
|
|
|
|
|
| |
* generic/tclExecute.c: Improved performance of INST_RSHIFT and
INST_LSHIFT.
|
|
|
|
| |
* generic/tclExecute.c: Improved performance of INST_RSHIFT.
|
|
|
|
|
|
| |
* generic/tclExecute.c: Improved performance of INST_MULT, INST_DIV,
INST_ADD, and INST_SUB and replaced a "goto... label" with a
"break from loop" in TclIncrObj() and removed some dead code.
|
|
|
|
|
|
| |
* generic/tclExecute.c: Improved performance of INST_MULT and INST_DIV
and replaced a "goto... label" with a "break from loop" in TclIncrObj()
and removed some dead code.
|
|
|
|
|
| |
* generic/tclExecute.c: Improved performance INST_MULT and
replaces a "goto... label" with a "break from loop" in TclIncrObj().
|
|
|
|
|
|
|
| |
* generic/tclExecute.c: Updated TclIncrObj() to more efficiently
add native long integers. Also updated IllegalExprOperandType
and the INST_UMINUS, INST_UPLUS, INST_BITNOT, and
INST_TRY_CVT_TO_NUMERIC sections for performance.
|
|
|
|
|
|
| |
* generic/tclExecute.c: Updated TclIncrObj() to more efficiently
add native long integers. Also updated IllegalExprOperandType
and the INST_UMINUS and INST_BITNOT sections for performance.
|
|
|
|
|
| |
* generic/tclExecute.c: Updated TclIncrObj() to more efficiently
add native long integers.
|
|
|
|
|
| |
* generic/tclBasic.c: Updated more callers to make use of
TclGetNumberFromObj. Removed some dead code.
|
|
|
|
| |
to use TclGetNumberFromObj.
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic/tclBasic.c: Re-implemented ExprRoundFunc to use
TclGetNumberFromObj.
* generic/tclInt.h: Added new routine TclGetNumberFromObj to
* generic/tclObj.c: provide efficient access to the actual
internal rep of a numeric Tcl_Obj without conversions.
|
|
|
|
|
|
| |
* generic/tclStringObj.c: Bug fix: Missing cast to large enough
integral size before << operations led to broken [format %llx] results.
Thanks to Robert Henry for reporting the bug.
|
| |
|
|
|
|
|
|
|
| |
* generic/tcl.h: Changed name of the new Tcl_Obj intrep field
* generic/tclObj.c: from "bignumValue" to "ptrAndLongRep" as
* generic/tclProc.c: described in TIP 237, and more suitable for
other more general uses.
|
| |
|
|
|
|
|
|
| |
* unix/Makefile.in: Added -DMP_PREC=4 switch to all compiles so
* win/Makefile.in: that minimum memory requirements of mp_int's
* win/makefile.vc: will not be quite so large. [Bug 1299153].
|
|
|
|
|
| |
* generic/tclStrToD.c: Fixed memory leak. [Bug 1299803].
* generic/tclObj.c:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclStrToD.c: Memory leak. Comment in TclSetBignumIntRep
* generic/tclObj.c: indicates that mp_init() is called on the
bignumValue argument to clear it, while keeping the digits array
transferred to the interp of the Tcl_Obj. The implication is that
callers of TclSetBignumIntRep() (and their callers) need not call
mp_clear(), but can imagine they've transferred ownership of an
mp_int value to Tcl. However, mp_init() doesn't merely re-initialize
the fields of an mp_int to hold the value zero. It also allocates
a fresh dp array of minimum size governed by MP_PREC. Without a
corresponding mp_clear() call somewhere, these dp arrays are leaked.
Added some mp_clear() calls to fix the leak, but better fix strategies
should still be pursued. Perhaps the best approach is to just
invade the mp_int struct and do the necessary surgery ourselves.
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclExecute.c: Revise TclIncrObj() to call
Tcl_GetBignumAndClearObj.
* generic/tcl.decls: Add Tcl_GetBignumAndClearObj.
* generic/tclObj.c:
* generic/tclDecls.h: make genstubs
* generic/tclStubInit.c:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclInt.h: Added TclBNInitBigNumFromWideInt()
* generic/tclTomMathInterface.c: so that every caller isn't
required to duplicate the sign logic to use the unsigned interface.
* generic/tclBasic.c: Reduce the number of places where Tcl
* generic/tclExecute.c: intrudes into the internal format details
* generic/tclObj.c: of the mp_int struct.
* generic/tclStrToD.c:
* generic/tcLStringObj.c:
* generic/tclTomMath.h: Added mp_cmp_d to routines from
* unix/Makefile.in: libtommath used by Tcl.
* win/Makefile.in:
* win/makefile.vc:
|
|
|
|
|
|
|
| |
when &a has the value -d, then the value &c computed should be zero,
but mp_add_d was producing an inconsistent zero value with a sign
field of MP_NEG, something like a value of -0, which other routines
in libtommath can't handle.
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclTomMath.h: Added mp_cmp_d to routines from
* unix/Makefile.in: libtommath used by Tcl.
* win/Makefile.in:
* win/makefile.vc:
* generic/tclExecute.c: Dropped all creation of "bigOne" values
and just use tommath routines that accept the value "1" directly.
|
| |
|
| |
|
|
|
|
| |
* generic/tclStringObj.c: specifier to [format].
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic/tclScan.c: Bug fix: The %o, %x, %i formats of [scan]
must not accept any 0b or 0o prefixes. [scan $s %o] must continue
to work even with KILL_OCTAL enabled.
* generic/tclInt.h: Added TCL_PARSE_SCAN_PREFIXES to the flags
* generic/tclStrToD.c: accepted by TclParseNumber.
|
|
|
|
| |
integer value now pass the TCL_PARSE_INTEGER_ONLY flag.
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclScan.c: Extended [scan] to accept the %lld,
%llo, %llx, and %lli formats. Numeric scanning is now done
via TclParseNumber calls.
* generic/tclInt.h: Extended TclParseNumber to accept new flag
* generic/tclStrToD.c: values TCL_PARSE_INTEGER_ONLY,
TCL_PARSE_OCTAL_ONLY, and TCL_PARSE_HEXIDECIMAL_ONLY, to give caller
more control over the parsing rules.
|
|
|
|
|
|
| |
* generic/tclObj.c: Extended bignum support to include bignums
so large they will not pack into a Tcl_Obj. When they outgrow Tcl's
string rep length limits, a panic will result.
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclTomMath.h: Added mp_sqrt to routines from
* unix/Makefile.in: libtommath used by Tcl.
* win/Makefile.in:
* win/makefile.vc:
* generic/tclBasic.c: Extended sqrt(.) so that range covers
the entire double range, accepting as many bignums in the domain
as that will allow.
|
| |
|
|
|
|
| |
* generic/tclBasic.c: Restored round(.) to the Tcl 8.4 rules.
|
|
|
|
|
| |
* generic/tclExecute.c: Bug fix. INST_RSHIFT: shift of negative
values produced incorrect results.
|
|
|
|
|
| |
* generic/tclExecute.c: Bug fix. INST_*SHIFT* opcodes stack
management. [expr 0<<6] should be 0, not 6.
|
|
|
|
|
| |
* generic/tclBasic.c: Extended the domain of round(.) to all
non-Inf, non-NaN doubles, using bignums for the result as needed.
|
|
|
|
|
|
|
|
|
| |
* generic/tclBasic.c: Revised implementation of the ceil(.) and
* generic/tclInt.h: floor(.) math functions in light of the
* generic/tclStrToD.c: revised comparison operators, so that it
is always true that ($x <= ceil($x)) and ($x >= floor($x)). The
simple approach of "convert to double and call ceil() or floor()"
could not guarantee that.
|
| |
|
|
|
|
|
| |
* generic/tclExecute.c: Bug fix: TclBignumToDouble return -Inf when
appropriate. Removed declarations of removed routines.
|