summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* Make tclCkalloc.c and tclExecute warning-free on Windows when compiled with ↵jan.nijtmans2021-01-201-10/+10
| | | | --enable-memory=(mem|all).
* More usage of TclNewObj() in stead of Tcl_NewObj() and TclNewIntObj() in ↵jan.nijtmans2020-10-131-4/+4
| | | | stead of Tcl_NewIntObj()
* Make Tcl compile warning-free using -Wshadowjan.nijtmans2020-09-281-17/+17
|
* Folow-up to previous commit: ExecStack is a FLEXARRAY toojan.nijtmans2020-09-111-3/+3
|
* Eliminate many unnecessary type-casts, mostly (size_t) when value is already ↵jan.nijtmans2020-08-111-2/+2
| | | | size_t or int
* closes [3c6e47363e]: missing de-duplication mechanism for nested TEBC ↵sebres2020-07-151-1/+17
| | | | starting from scratch (e. g. nested compiled blocks enclosed in parent cycle), so reset interp's result to avoid possible duplications of large objects by first commands like lappend, append, etc
* Fix compiled "string is <class>" for TCL_UTF_MAX=4 build, for characters > ↵jan.nijtmans2020-05-251-2/+4
| | | | U+FFFF.
* New internal function TclGetUCS4() only available when TCL_UTF_MAX=4. This ↵jan.nijtmans2020-05-041-9/+3
| | | | fixes all "knownBug" testcases related to tip389.
* More uppercase HEX representations in source-code.jan.nijtmans2020-03-181-9/+9
|
* A few more "break" statements, so any compiler knows these are no ↵jan.nijtmans2020-01-151-17/+59
| | | | FALLTHROUGH situations.
* Use _copysign on Windows always (available from float.h). Use mp_iszero() ↵jan.nijtmans2020-01-081-3/+3
|\ | | | | | | whenever appropriate.
* | Fix Valgrind problem reported as follow-up in [fc4393e9b0]. Since it happens ↵jan.nijtmans2019-12-081-1/+1
| | | | | | | | only for TCL_UTF_MAX>3 it's not actully a 'bug' in 8.6, but it might be a corner-case not handled well in 8.7
* | Change mp_isodd() (back) from libtommath stub entry to macro. libtommath ↵jan.nijtmans2019-10-301-1/+1
| | | | | | | | | | changed it back to macro too in its master branch, we better do the same. Better usage of mp_isneg() macro, in stead of directly comparing sign with MP_NEG/MP_ZPOS.
* | Update to latest Tcl (core-8-6-branch) and latest libtommath (1.2.0-rc1)jan.nijtmans2019-10-171-13/+24
|\ \
| * | TEBC: avoid error "unitialized variable" if called in debug mode (or with ↵sebres2019-09-181-1/+1
| | | | | | | | | | | | analysis tools) - objv = NULL, similar to objc = 0 (e. g. calling parser.test, in doYield by INTERP_DEBUG_FRAME)
| * | Add /* FALLTHRU */ markers in various places (silencing possible GCC ↵jan.nijtmans2019-08-281-0/+5
| | | | | | | | | | | | warnings). Eliminate some more "register" keywords. Eliminate (or silence) some unused function parameters.
| * | closes [fa6bf38d07]: integrate bug-fa6bf38d07-v2sebres2019-08-271-12/+18
| |\ \
| | * | small amend: be sure checkInterp is set if entering back the code marked as ↵sebres2019-08-271-2/+2
| | | | | | | | | | | | | | | | TCL_BYTECODE_RECOMPILE (normally also set in CACHE_STACK_INFO, but...)
| | * | simplification, use the same "fixed" (and faster) code for INST_EVAL_STKsebres2019-08-271-11/+6
| | | |
| | * | fixes [fa6bf38d07]: command invocation (NRE callback to TEBCResume) caused ↵sebres2019-08-271-9/+20
| |/ / | | | | | | | | | by execution of recompiled TEBC (on epoch bump)
* | | Merge core-8-6-branch, and merge latest libtommathjan.nijtmans2019-07-281-3/+19
|\ \ \ | |/ /
| * | merge 8.5 (reintegrate, no functional changes)sebres2019-07-241-1/+1
| |\ \ | | |/
| | * cherrypick timerate-loop-opti--discard-resultsebres2019-07-241-1/+17
| | |
| | * fixed build with MSVC 6.0sebres2019-06-251-6/+3
| | |
| * | fix done optimization (TCL_EVAL_DISCARD_RESULT) for nested call - supply and ↵sebres2019-07-231-2/+10
| | | | | | | | | | | | | | | reset discard result flag in registering TEBC-callback, because it is applicable for this call only, and should not affect all the nested invocations may return result (added tests covering that).
| * | better rewritten loop optimization: new evalFlag "TCL_EVAL_DISCARD_RESULT" ↵sebres2019-07-231-1/+9
|/ / | | | | | | | | | | introduced, which allows to organize faster TEBC-loop with discarding of result, simulating pop & done, like it does continue in loop (so ensures that setting of result will not smudge the measurement).
* | Trying to fix C4761 warning with VC++ 6.0jan.nijtmans2019-06-291-1/+1
| |
* | [6bdadfba7d] Stop crash with multi-lappend and failing writesdkf2019-06-201-8/+13
| |
* | Rename mp_get_bit to s_mp_get_bit, rename mp_tc_div_2d to mp_signed_rsh, ↵jan.nijtmans2019-05-311-1/+1
| | | | | | | | remove mp_tc_(add|or|xor) functions in favor of mp_(add|or|xor) which can now handle twos-complement. Following ongoing changes in libtommath development.
* | Merge 8.5jan.nijtmans2019-05-291-3/+3
|\ \ | |/
| * Update some libtommath functions to the latest trunk versions. Small step ↵jan.nijtmans2019-05-291-153/+36
| | | | | | | | | | forward in the upgrade to (upcoming) libtommath 1.2. Advantage: simplify Tcl code accessing those functions.
* | end-of-line spacingjan.nijtmans2019-05-241-2/+2
|\ \ | |/
* | Minor compiler warningjan.nijtmans2019-05-091-0/+2
|\ \ | |/
| * back-ported branch sebres-8-6-timerate (new command "timerate" for 8.5)sebres2017-05-161-94/+134
| |\
| * | [04e26c02c0] Remove useless condition that raises warnings.dgp2017-04-271-6/+2
| | |
* | | Only use special mp_sqrt() code when double format/tommath format are ↵jan.nijtmans2019-04-111-12/+8
| | | | | | | | | | | | | | | | | | exactly what's expected. Otherwise, use original always-working tommath code. Simplify overflow check in bignum expononent code, not using bignums where it's not necessary. Don't overallocate bignums when using wideint's only.
* | | Fix gcc warning on 32-bit platformsjan.nijtmans2019-04-021-0/+4
| | |
* | | integrate sebres-8-6-tommath-1-1 - cherry-picking of several optimizations ↵sebres2019-04-011-282/+187
|\ \ \ | | | | | | | | | | | | and simplifications of 8.7 (tommath 1.1), well-arranged branching of long/wide/bignum base and exponent cases, test-cases extended to cover all this branches and edge cases.
| * | | code reviewsebres2019-02-041-4/+6
| | | |
| * | | cherry pick of [238bd4d2c053540c]..[31dd092df4b57fdb]: More simplifications ↵sebres2019-02-041-150/+178
| | | | | | | | | | | | | | | | in tclExecute.c (INST_EXPON), much more and well-arranged branching of long/wide/bignum base and exponent cases, test-cases extended to cover all this branches and edge cases.
| * | | partial cherry pick of [e8e92eb381d689ab]: One more libtommath function, ↵sebres2019-02-041-10/+1
| | | | | | | | | | | | | | | | mp_tc_div_2d, which simplifies code.
| * | | partial cherry pick of [c5c83014d6]: Many simplifications in tclExecute.c, ↵sebres2019-02-041-121/+5
| | | | | | | | | | | | | | | | now that libtommath provides new functions mp_tc_and, mp_tc_or and mp_tc_xor
* | | | Document maximum value for right argument of '**' operator. jan.nijtmans2019-03-271-1/+5
| | | | | | | | | | | | | | | | | | | | Adapt test-cases to test for exactly one more than this maximum value. Make sure that the maximum is the same for DIGIT_BIT > 28. Change macro's for mp_iseven()/mp_isodd() so they don't depend on value of DIGIT_BIT any more.
* | | | Eliminate all usage of mp_iszero/mp_iseven/mp_isodd/mp_isneg from ↵jan.nijtmans2019-03-251-4/+4
| | | | | | | | | | | | | | | | libtommath: In the upcoming new version those will become real functions, causing possible binary incompatibility. This change makes Tcl independant from libtommath's changes.
* | | | Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 ↵jan.nijtmans2019-03-021-1/+1
|/ / / | | | | | | | | | conversions when handling surrogates. Only effective when compiling with -DTCL_UTF_MAX=4|6 (default: 3). Meant for benefit of Androwish.
* | | minor optimization: check length instead of content - don't touch other ↵sebres2019-01-141-1/+1
| | | | | | | | | | | | memory (so potentially fewer cpu-cache washout's)
* | | Slightly simpler test for empty string, still covering all cases. Also ↵jan.nijtmans2019-01-131-1/+1
| | | | | | | | | | | | prepare testpurebytesobj for strings >2G
* | | Fix crash reported by reported by François Vogel related to: ↵jan.nijtmans2019-01-111-1/+1
| | | | | | | | | | | | [cc1e91552c0ca1817292d951f8c694b28c2b2251|cc1e91552c]
* | | closes [cc1e91552c]: fixes lrange instruction on empty list, return original ↵sebres2019-01-081-2/+6
| | | | | | | | | | | | list only if it is canonical (otherwise new list object)
* | | resolve warnings: array subscript -1 is below array bounds of 'void *[1]' ↵sebres2018-12-281-1/+1
| | | | | | | | | | | | [-Warray-bounds] if compiled with newest gcc