Skip to content
Tcl Source Code Artifact [7acb2424cc]
Login

Artifact [7acb2424cc]

Artifact 7acb2424ccf17942ab70e8baa9f5fe4ecc6ed5f9:

Manifest of check-in [7acb2424cc] - * generic/tclExecute.c (TclExecuteByteCode): 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] by mdejong on 2005-07-09 00:27:25.
B 3af29192895439278a0e2308a31dc90c2c8b4c6c
C \t*\sgeneric/tclExecute.c\s(TclExecuteByteCode):\n\s\s\s\s\s\s\s\sReimplement\slong\sand\swide\stype\sinteger\sdivision\n\s\s\s\s\s\s\s\sand\smodulus\soperations\sso\sthat\sthe\ssmallest\n\s\s\s\s\s\s\s\sand\slargest\sinteger\svalues\sare\shandled\sproperly.\n\s\s\s\s\s\s\s\sThe\sdivide\soperation\sis\smore\sefficient\ssince\n\s\s\s\s\s\s\s\sit\sno\slonger\sdoes\sa\smodulus\sor\snegation\sand\n\s\s\s\s\s\s\s\sonly\schecks\sfor\sa\sremainder\swhen\sthe\squotient\n\s\s\s\s\s\s\s\swill\sbe\sa\snegative\snumber.\sThe\smodulus\soperation\n\s\s\s\s\s\s\s\sis\snow\sa\sbit\smore\scomplex\sbecause\sof\sa\snumber\sof\n\s\s\s\s\s\s\s\sspecial\scases\sdealing\swith\sthe\ssmallest\sand\n\s\s\s\s\s\s\s\slargest\sintegers.\n\t*\stests/expr.test:\sAdd\stest\scases\sfor\sdivision\n\s\s\s\s\s\s\s\sand\smodulus\soperations\son\sthe\ssmallest\sand\n\s\s\s\s\s\s\s\slargest\sinteger\svalues\sfor\s32\sand\s64\sbit\stypes.\n\t[Patch\s1230205]\n
D 2005-07-09T00:27:25
F ChangeLog 9682adda62681d43cf7915f5a3524cca94c09627
F generic/tclExecute.c 1b2dbdca0eaf633f9c875684e2c370e788a8d20f
F generic/tclLink.c 76b3cedf755a17ad1027c242c3a8f8ba8bfd5363
F tests/expr.test 08a4ec6b7002a073a48c79249e3ae305ca7d386c
F unix/Makefile.in 90215d57622393f007154fa241d358b95cb97680
P 828cc933d5be1843fc1c1521194699c60ae9a68a
U mdejong
Z 5314b889b9b61749dc71c85272415f59