[Pkg] The Trunk: Kernel-nice.831.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 14 02:44:42 UTC 2014

Nicolas Cellier uploaded a new version of Kernel to project The Trunk:

==================== Summary ====================

Name: Kernel-nice.831
Author: nice
Time: 14 January 2014, 3:43:29.851 am
UUID: 5c62dca4-bf8e-4330-9cb1-9cd24047aac6
Ancestors: Kernel-nice.830

1) Fix awfull bug in NumberParser when reading a number with fraction part
(the trailing digits of the fraction might be skipped when there's many of them because of incorrect update of lastNonZero position)

This made this test fail:
self assert: (Float readFrom: (((1<<1075) reciprocal + (1<<1400) reciprocal) printShowingDecimalPlaces: 2000)) = Float fmin.

I just wanted to check NumberParser w.r.t. a former bug of dtoa, but it failed for different reasons http://www.exploringbinary.com/gays-strtod-returns-zero-for-inputs-just-above-2-1075/

2) Classify some as yet unclassified (or miss-classified)

=============== Diff against Kernel-nice.830 ===============

Item was changed:
+ ----- Method: IllegalResumeAttempt>>defaultAction (in category 'handling') -----
- ----- Method: IllegalResumeAttempt>>defaultAction (in category 'comment') -----
  	"No one has handled this error, but now give them a chance to decide how to debug it.  If none handle this either then open debugger (see UnhandedError-defaultAction)"
  	UnhandledError signalForException: self!

Item was changed:
+ ----- Method: IllegalResumeAttempt>>isResumable (in category 'handling') -----
- ----- Method: IllegalResumeAttempt>>isResumable (in category 'comment') -----
  	^ false!

Item was changed:
+ ----- Method: InMidstOfFileinNotification>>defaultAction (in category 'handling') -----
- ----- Method: InMidstOfFileinNotification>>defaultAction (in category 'as yet unclassified') -----
  	self resume: false!

Item was changed:
  ----- Method: NumberParser>>nextLargeIntegerBase:nPackets: (in category 'parsing-large int') -----
  nextLargeIntegerBase: aRadix nPackets: nPackets 
  	"Form a Large integer with incoming digits from sourceStream.
  	Return this integer, or zero if no digits found.
  	Stop reading when no more digits or when nPackets elementary LargeInteger have been encountered.
  	Count the number of digits and the lastNonZero digit and store them in instVar"
+ 	| high nDigitsHigh lastNonZeroHigh low nDigitsLow halfPackets |
- 	| high nDigitsHigh low nDigitsLow halfPackets |
  	halfPackets := nPackets bitShift: -1.
  	halfPackets = 0 ifTrue: [^self nextElementaryLargeIntegerBase: aRadix].
  	high := self nextLargeIntegerBase: aRadix nPackets: halfPackets.
  	high isLarge ifFalse: [^high].
  	nDigitsHigh := nDigits.
+ 	lastNonZeroHigh := lastNonZero.
  	low := self nextLargeIntegerBase: aRadix nPackets: halfPackets.
  	nDigitsLow := nDigits.
  	nDigits := nDigitsHigh + nDigitsLow.
+ 	lastNonZero := lastNonZero = 0
+ 		ifTrue: [lastNonZeroHigh]
+ 		ifFalse: [lastNonZero + nDigitsHigh].
- 	lastNonZero = 0 ifFalse: [lastNonZero := lastNonZero + nDigitsHigh].
  	^high * (aRadix raisedToInteger: nDigitsLow) + low!

More information about the Packages mailing list