Skip to content
Tcl Source Code Artifact [c8fd5c657b]
Login

Artifact [c8fd5c657b]

Artifact c8fd5c657b0c52bb7c665c3572d0584267f760ee:

Manifest of check-in [c8fd5c657b] - * generic/tcl.h: Changed the typedef for the mp_digit type from: typedef unsigned long mp_digit; to: typedef unsigned int mp_digit; For 32-bit builds where "long" and "int" are two names for the same thing, this is no change at all. For 64-bit builds, though, this causes the dp[] array of an mp_int to be made up of 32-bit elements instead of 64-bit elements. This is a huge improvement because details elsewhere in the mp_int implementation cause only 28 bits of each element to be actually used storing number data. Without this change bignums are over 50% wasted space on 64-bit systems. [Bug 2800740]. ***POTENTIAL INCOMPATIBILITY*** For 64-bit builds, callers of routines with (mp_digit) or (mp_digit *) arguments *will*, and callers of routines with (mp_int *) arguments *may* suffer both binary and stubs incompatibilities with Tcl releases 8.5.0 - 8.5.7. Such possibilities should be checked, and if such incompatibilities are present, suitable [package require] requirements on the Tcl release should be put in place to keep such built code [load]-ing only in Tcl interps that are compatible. by dgp on 2009-10-29 18:38:08.
B 1647c5548ee7507b390182810f95aed2a1064d7a
C \s\s\s\s\s\s\s\s*\sgeneric/tcl.h:\s\s\s\s\s\s\s\sChanged\sthe\stypedef\sfor\sthe\smp_digit\stype\n\s\s\s\s\s\s\s\sfrom:\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\stypedef\sunsigned\slong\smp_digit;\n\s\s\s\s\s\s\s\sto:\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\stypedef\sunsigned\sint\smp_digit;\n\s\s\s\s\s\s\s\sFor\s32-bit\sbuilds\swhere\s"long"\sand\s"int"\sare\stwo\snames\sfor\sthe\ssame\n\s\s\s\s\s\s\s\sthing,\sthis\sis\sno\schange\sat\sall.\s\sFor\s64-bit\sbuilds,\sthough,\sthis\n\s\s\s\s\s\s\s\scauses\sthe\sdp[]\sarray\sof\san\smp_int\sto\sbe\smade\sup\sof\s32-bit\selements\n\s\s\s\s\s\s\s\sinstead\sof\s64-bit\selements.\s\sThis\sis\sa\shuge\simprovement\sbecause\sdetails\n\s\s\s\s\s\s\s\selsewhere\sin\sthe\smp_int\simplementation\scause\sonly\s28\sbits\sof\seach\n\s\s\s\s\s\s\s\selement\sto\sbe\sactually\sused\sstoring\snumber\sdata.\s\sWithout\sthis\schange\n\s\s\s\s\s\s\s\sbignums\sare\sover\s50%\swasted\sspace\son\s64-bit\ssystems.\s\s[Bug\s2800740].\n\n\s\s\s\s\s\s\s\s***POTENTIAL\sINCOMPATIBILITY***\n\s\s\s\s\s\s\s\sFor\s64-bit\sbuilds,\scallers\sof\sroutines\swith\s(mp_digit)\sor\s(mp_digit\s*)\n\s\s\s\s\s\s\s\sarguments\s*will*,\sand\scallers\sof\sroutines\swith\s(mp_int\s*)\sarguments\n\s\s\s\s\s\s\s\s*may*\ssuffer\sboth\sbinary\sand\sstubs\sincompatibilities\swith\sTcl\sreleases\n\s\s\s\s\s\s\s\s8.5.0\s-\s8.5.7.\s\sSuch\spossibilities\sshould\sbe\schecked,\sand\sif\ssuch\n\s\s\s\s\s\s\s\sincompatibilities\sare\spresent,\ssuitable\s[package\srequire]\srequirements\n\s\s\s\s\s\s\s\son\sthe\sTcl\srelease\sshould\sbe\sput\sin\splace\sto\skeep\ssuch\sbuilt\scode\n\s\s\s\s\s\s\s\s[load]-ing\sonly\sin\sTcl\sinterps\sthat\sare\scompatible.\n
D 2009-10-29T18:38:08
F ChangeLog 2670a4a5fce8998065f5476fd5fe37e7e377a651
F generic/tcl.h 6195612fc87a54708928b6d044aa899b4cc17243
P 1647c5548ee7507b390182810f95aed2a1064d7a
U dgp
Z 3e7b65f3cf2563bcfd8c5f4a84a13062