Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.684.mcz
==================== Summary ====================
Name: Collections-eem.684
Author: eem
Time: 30 March 2016, 1:40:38.127809 pm
UUID: 3cd95866-5b71-4755-8659-1e0fbb6fbe4d
Ancestors: Collections-ul.683
Fix PositionableStream>>basicUpTo:. It should replicate upTo:, not next:.
=============== Diff against Collections-ul.683 ===============
Item was changed:
+ ----- Method: PositionableStream>>basicUpTo: (in category 'private basic') -----
+ basicUpTo: anObject
+ "Answer a subcollection from the current access position to the
+ occurrence (if any, but not inclusive) of anObject in the receiver. If
+ anObject is not in the collection, answer the entire rest of the receiver."
+ | newStream element |
+ newStream := WriteStream on: (self collectionSpecies new: 100).
+ [self atEnd or: [(element := self next) = anObject]]
+ whileFalse: [newStream nextPut: element].
+ ^newStream contents!
- ----- Method: PositionableStream>>basicUpTo: (in category 'accessing - multibyte support') -----
- basicUpTo: anObject
-
- ^self next: anObject
- !
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.1008.mcz
==================== Summary ====================
Name: Kernel-ul.1008
Author: ul
Time: 30 March 2016, 2:54:12.155092 am
UUID: dee08222-ad83-4daf-a90d-a7a4e7b5009f
Ancestors: Kernel-ul.1007
- minor performance improvements for NumberParser and Fraction.
- give some advantage to the same class integer-integer comparison, which is probably the most common case, in Integer >> #=, at the cost of adding a minor overhead to the integer-non-integer comparisons.
- removed Integer >> #hash because it's not used and the implementation become incorrect over time.
=============== Diff against Kernel-ul.1007 ===============
Item was changed:
----- Method: Fraction>>setNumerator:denominator: (in category 'private') -----
setNumerator: n denominator: d
+ d isZero ifTrue: [ ^(ZeroDivide dividend: n) signal ].
+ numerator := n asInteger.
+ (denominator := d asInteger) negative ifTrue: [ "keep sign in numerator"
+ numerator := numerator negated.
+ denominator := denominator negated ]!
- d = 0
- ifTrue: [^(ZeroDivide dividend: n) signal]
- ifFalse:
- [numerator := n asInteger.
- denominator := d asInteger abs. "keep sign in numerator"
- d < 0 ifTrue: [numerator := numerator negated]]!
Item was changed:
----- Method: Integer>>= (in category 'comparing') -----
= aNumber
+ aNumber class == self class ifTrue: [ ^(self digitCompare: aNumber) = 0 ].
+ aNumber isInteger ifTrue: [ ^false ].
- aNumber isInteger ifTrue: [
- aNumber class == self class ifFalse: [ ^false ].
- ^(self digitCompare: aNumber) = 0 ].
aNumber isNumber ifFalse: [ ^false ].
^aNumber adaptToInteger: self andCompare: #=!
Item was removed:
- ----- Method: Integer>>hash (in category 'comparing') -----
- hash
- "Hash is reimplemented because = is implemented."
-
- ^(self lastDigit bitShift: 8) + (self digitAt: 1)!
Item was added:
+ ----- Method: NumberParser>>isExponentLetter: (in category 'testing') -----
+ isExponentLetter: aCharacter
+
+ ^self exponentLetters includes: aCharacter!
Item was changed:
----- Method: NumberParser>>makeFloatFromMantissa:exponent:base: (in category 'parsing-private') -----
makeFloatFromMantissa: m exponent: k base: aRadix
"Convert infinite precision arithmetic into Floating point.
This alogrithm rely on correct IEEE rounding mode
being implemented in Integer>>asFloat and Fraction>>asFloat"
+ k = 0 ifTrue: [ ^m asFloat ].
+ k > 0 ifTrue: [ ^(m * (aRadix raisedToInteger: k)) asFloat ].
+ ^(Fraction numerator: m denominator: (aRadix raisedToInteger: k negated)) asFloat!
- ^(k positive
- ifTrue: [m * (aRadix raisedToInteger: k)]
- ifFalse: [Fraction numerator: m denominator: (aRadix raisedToInteger: k negated)]) asFloat!
Item was changed:
----- Method: NumberParser>>nextElementaryLargeIntegerBase: (in category 'parsing-large int') -----
nextElementaryLargeIntegerBase: aRadix
"Form an unsigned integer with incoming digits from sourceStream.
Return this integer, or zero if no digits found.
Stop reading if end of digits or if a LargeInteger is formed.
Count the number of digits and the position of lastNonZero digit and store them in instVar."
| value digit char |
value := 0.
nDigits := 0.
lastNonZero := 0.
+ [
+ value isLarge ifTrue: [ ^value ].
+ char := sourceStream next ifNil: [ ^value ].
+ ((digit := char digitValue) < 0 or: [digit >= aRadix]) ifTrue: [
+ sourceStream skip: -1.
+ ^value ].
+ nDigits := nDigits + 1.
+ digit = 0
+ ifFalse: [
+ lastNonZero := nDigits.
+ value := value * aRadix + digit ]
+ ifTrue: [ value := value * aRadix ] ] repeat!
- [value isLarge or: [(char := sourceStream next) == nil
- or: [digit := char digitValue.
- (0 > digit or: [digit >= aRadix])
- and: [sourceStream skip: -1.
- true]]]]
- whileFalse: [
- nDigits := nDigits + 1.
- 0 = digit
- ifFalse: [lastNonZero := nDigits].
- value := value * aRadix + digit].
- ^value!
Item was changed:
----- Method: NumberParser>>readExponent (in category 'parsing-private') -----
readExponent
"read the exponent if any (stored in instVar).
Answer true if found, answer false if none.
If exponent letter is not followed by a digit,
this is not considered as an error.
Exponent are always read in base 10."
| eneg epos |
exponent := 0.
+ (self isExponentLetter: sourceStream peek) ifFalse: [^ false].
- sourceStream atEnd ifTrue: [^ false].
- (self exponentLetters includes: sourceStream peek)
- ifFalse: [^ false].
sourceStream next.
eneg := sourceStream peekFor: $-.
epos := eneg not and: [self allowPlusSignInExponent and: [sourceStream peekFor: $+]].
exponent := self nextUnsignedIntegerOrNilBase: 10.
exponent ifNil: ["Oops, there was no digit after the exponent letter.Ungobble the letter"
exponent := 0.
sourceStream
skip: ((eneg or: [epos])
ifTrue: [-2]
ifFalse: [-1]).
^ false].
eneg ifTrue: [exponent := exponent negated].
^true!
Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.151.mcz
==================== Summary ====================
Name: Files-ul.151
Author: ul
Time: 30 March 2016, 2:24:00.086677 am
UUID: 5c8941ce-af98-4464-8bad-423c8bf7ddb5
Ancestors: Files-mt.150
Improvement #peekFor: performance.
=============== Diff against Files-mt.150 ===============
Item was changed:
----- Method: StandardFileStream>>peekFor: (in category 'access') -----
peekFor: item
"Answer false and do not advance if the next element is not equal to item, or if this stream is at the end. If the next element is equal to item, then advance over it and return true"
+
- | next |
"self atEnd ifTrue: [^ false]. -- SFStream will give nil"
+ (self next ifNil: [ ^false ]) = item ifTrue: [ ^true ].
- (next := self next) == nil ifTrue: [^ false].
- item = next ifTrue: [^ true].
self skip: -1.
^ false!
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.683.mcz
==================== Summary ====================
Name: Collections-ul.683
Author: ul
Time: 30 March 2016, 2:23:29.737891 am
UUID: f0634d1c-37d8-4ed1-84cc-6439546aaa74
Ancestors: Collections-ul.682
Improvement #peekFor: performance.
=============== Diff against Collections-ul.682 ===============
Item was changed:
----- Method: PositionableStream>>peekFor: (in category 'accessing') -----
peekFor: anObject
"Answer false and do not move over the next element if it is not equal to
the argument, anObject, or if the receiver is at the end. Answer true
and increment the position for accessing elements, if the next element is
equal to anObject."
- | nextObject |
self atEnd ifTrue: [^false].
- nextObject := self next.
- "peek for matching element"
- anObject = nextObject ifTrue: [^true].
"gobble it if found"
+ self next = anObject ifTrue: [ ^true ].
position := position - 1.
^false!
Thank you!! My guess is this will fix the bug where, when I drag a
class to a new package-category (of a filtered list), it will put it
in the one I dragged it to..
On Wed, Mar 30, 2016 at 8:57 AM, <commits(a)source.squeak.org> wrote:
> Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
> http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.160.mcz
>
> ==================== Summary ====================
>
> Name: ToolBuilder-Morphic-mt.160
> Author: mt
> Time: 30 March 2016, 3:57:02.584647 pm
> UUID: c90bb584-3c2d-4eaf-9a84-b6658026e00c
> Ancestors: ToolBuilder-Morphic-kfr.159
>
> Fixes bug where dropping into filtered lists passed the wrong index to the model.
>
> =============== Diff against ToolBuilder-Morphic-kfr.159 ===============
>
> Item was changed:
> ----- Method: PluggableListMorphPlus>>acceptDroppingMorph:event: (in category 'drag and drop') -----
> acceptDroppingMorph: aTransferMorph event: evt
>
> dropItemSelector ifNil: [^ self].
> potentialDropRow ifNil: [^ self].
>
> model
> perform: dropItemSelector
> withEnoughArguments: {
> aTransferMorph passenger.
> + self modelIndexFor: potentialDropRow.
> - potentialDropRow.
> aTransferMorph shouldCopy.
> aTransferMorph}.
>
> self resetPotentialDropRow.
> evt hand releaseMouseFocus: self.
> Cursor normal show.
> !
>
>
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.160.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.160
Author: mt
Time: 30 March 2016, 3:57:02.584647 pm
UUID: c90bb584-3c2d-4eaf-9a84-b6658026e00c
Ancestors: ToolBuilder-Morphic-kfr.159
Fixes bug where dropping into filtered lists passed the wrong index to the model.
=============== Diff against ToolBuilder-Morphic-kfr.159 ===============
Item was changed:
----- Method: PluggableListMorphPlus>>acceptDroppingMorph:event: (in category 'drag and drop') -----
acceptDroppingMorph: aTransferMorph event: evt
dropItemSelector ifNil: [^ self].
potentialDropRow ifNil: [^ self].
model
perform: dropItemSelector
withEnoughArguments: {
aTransferMorph passenger.
+ self modelIndexFor: potentialDropRow.
- potentialDropRow.
aTransferMorph shouldCopy.
aTransferMorph}.
self resetPotentialDropRow.
evt hand releaseMouseFocus: self.
Cursor normal show.
!
... at http://www.mirandabanda.org/files/Cog/VM/VM.r3663
CogVM binaries as per VMMaker.oscog-eem.1746/r3663
General:
Fix loss of signals to e.g. a socket's readSemaphore when data available:
Fix a bug in sqAtomicOps.h where the assumption that the intrinsic atomic
add
operation will apply to 16-bit variables is false on clang. So on x86 and
x64
use inline assembly with gcc and clang since this is known to work.
Improve the doSignalSemaphores code in sqExternalSemaphores.c so that the
tide
variables are initialized at the right point and so there's only one copy of
the signalling code.
Allow primitiveUtcWithOffset to accept an optional parameter with an
array or object with two or more slots to store UTC posix microseconds
and time zone offset in seconds. Compatibility with VMM trunk.
Add a Smalltalk epoch version of it, primitiveUtcAndTimezoneOffset,
and give it primitive #244.
Fix signed/unsigned arithmetic issues in 64-bit microsecond clock code.
This fixes the bug whereby
Time localMicrosecondClock - Time utcMicrosecondClock // 1000000
would answer something with an odd second, a multiple of 3600 plus 1.
General Integer conversion routines:
Several clean ups to integer conversion routines.
Simplify bit operations using positiveMachineIntegerValueOf:/
positiveMachineIntegerFor: rather than doing 32/64 bits dissertation.
Spur Cogit:
Rewrote identity primitive to check for forwarders only when the identity of
objects is different. The previous version would crash if the argument was
a
forwarder to an immediate.
Spur VMs:
Now that UUIDs are created with purely image-based code in Squeak trunk,
make
the UUIDPlugin external in all Squeak Spur VMs.
Plugins:
Make FFI load symbol fail after (when find function fails).
In Pharo, we allow to load global functions (so we can control world windows
through FFI).
LargeIntegersPlugin:
Finish 1st round of LargeIntegers refactoring
- simplify the left and right shift
- use as much unsigned arithmetic as possible
- homogenize type declaration within the plugin
- remove unused digitOf:at:
Slang:
Beware: sending abs to an unsigned int will re-interpret the int as signed
and
will generate C compiler warnings. The new version uses SQABS and SQLABS
macros
on sqInt and sqLong vars, and fabs and fabsf on double and float args,
respectively, and llabs on long long, __int64 vars.
Mac OS X:
Unswap the Squeak and Newspeak localized strings
_,,,^..^,,,_
best, Eliot
Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:
http://lists.squeakfoundation.org/pipermail/packages/2016-March/009512.html
Name: NetworkTests-eem.41
Ancestors: NetworkTests-ul.40
Improve testSocketReuse. It seems correct that the SocketPlugin answers whatever bit things like SO_REUSEADDR set in underlying socket fields, not the 1 that the test expects. e.g. on Mac OS X
Socket newUDP
setOption: 'SO_REUSEADDR' value: 1;
getOption: 'SO_REUSEADDR'
answers #(0 4), not #(0 1)
=============================================