Skip to content
Tcl Source Code Artifact [554b1b107c]
Login

Artifact [554b1b107c]

Artifact 554b1b107c2a193c39b256fe66c1508bfb65419b:

Manifest of check-in [554b1b107c] - * 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:34:59.
B ec332235983d31b3ca96bc2c1a3a8722ce01f21f
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:34:59
F ChangeLog 80004715b18e1819cf0a438e07e59a47886705ef
F generic/tcl.h ab7f757f33596717c04617c335e650b3116d7757
F generic/tclLiteral.c a43e5f488ddbff34ef7d4a14dd21779eb898785a
F library/clock.tcl de649637f0dc0d14192ed715355117da9e316333
F tests/apply.test e73434207dc703613a5b25ee298f925494cf5b75
F tests/clock.test 41a6ef29828499c9daddce85a5098fa1856e09d1
F tests/compile.test 0ae4e0bcedb907b7584123f2419473d41f106800
F tests/proc.test 606bacd46d52cf5b60770d3f412092351af78ef9
F tests/reg.test 41aef8269caba5d79627d2fee4aed57aed3cfe2d
P eced552367757fe52f4c5b2783f9280f51b73f3f
U dgp
Z 12e35980c12d61f6926e0db15bc49aae