Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.1128.mcz
==================== Summary ====================
Name: System-nice.1128
Author: nice
Time: 9 December 2019, 6:25:31.07858 pm
UUID: 8b2bd676-0898-c843-914e-039dde2db037
Ancestors: System-mt.1127
Nuke windows CE OS support.
Let Win32 VM default to UTF32InputInterpreter rather than MacRomanInputInterpreter.
Note: I think that this method is unused and is just adding confusion to already convoluted code... But it is difficult to analyze the source, so it's better to differ this after 5.3 release if unsure. Unless we have a good set of tests?
=============== Diff against System-mt.1127 ===============
Item was changed:
----- Method: Locale class>>defaultInputInterpreter (in category 'platform specific') -----
defaultInputInterpreter
+ | platformName |
- | platformName osVersion |
platformName := Smalltalk platformName.
+ platformName = 'Win32' ifTrue: [^UTF32InputInterpreter new].
- osVersion := Smalltalk getSystemAttribute: 1002.
- (platformName = 'Win32' and: [osVersion = 'CE'])
- ifTrue: [^NoInputInterpreter new].
- platformName = 'Win32' ifTrue: [^MacRomanInputInterpreter new].
^NoInputInterpreter new!
Nicolas Cellier uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-pre.312.mcz
==================== Summary ====================
Name: Traits-pre.312
Author: pre
Time: 12 June 2019, 5:59:48.264868 pm
UUID: f2ec63fa-f6e8-0347-a2c6-fb8623cb4a92
Ancestors: Traits-nice.311
This speeds up the compilation of methods in traits or in classes using traits by caching subsequent reads to the changes file.
=============== Diff against Traits-nice.311 ===============
Item was changed:
----- Method: ClassDescription>>updateTraits (in category '*Traits-NanoKernel') -----
updateTraits
"Recompute my local traits composition"
+ CurrentReadOnlySourceFiles cacheDuring: [
+ self installTraitsFrom: self traitComposition]!
- self installTraitsFrom: self traitComposition.
- !
Item was changed:
----- Method: TraitDescription>>addSelectorSilently:withMethod: (in category 'operations') -----
addSelectorSilently: selector withMethod: compiledMethod
"Overridden to update the users of this trait"
+ CurrentReadOnlySourceFiles cacheDuring: [
+ super addSelectorSilently: selector withMethod: compiledMethod.
+ self users do:[:each| each updateTraits]]!
- super addSelectorSilently: selector withMethod: compiledMethod.
- self users do:[:each| each updateTraits].!
Nicolas Cellier uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-eem.239.mcz
==================== Summary ====================
Name: Network-eem.239
Author: eem
Time: 11 February 2020, 3:44:34.386439 pm
UUID: 4a7fc777-149d-45ed-a205-a8ef149c84bd
Ancestors: Network-tpr.238
Use withoutDuplicates for what it was intended for. Thanks to Timothy for the reminder.
=============== Diff against Network-tpr.238 ===============
Item was changed:
----- Method: MailMessage>>to: (in category 'accessing') -----
to: aString
| sanitizedMailAddresses |
+ sanitizedMailAddresses := (MailAddressParser addressesIn: aString) withoutDuplicates.
- sanitizedMailAddresses := (MailAddressParser addressesIn: aString) asSet asArray.
^self setField: 'to' toString: (sanitizedMailAddresses joinSeparatedBy: ', ')!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1307.mcz
==================== Summary ====================
Name: Kernel-nice.1307
Author: nice
Time: 3 March 2020, 11:04:29.913092 pm
UUID: 6c5ee38a-4234-49e4-ba8c-232f6c21167d
Ancestors: Kernel-mt.1306, Kernel-ct.1295, Kernel-nice.1295, Kernel-ct.1299, Kernel-ct.1300
Merge Kernel-mt.1306, Kernel-ct.1295, Kernel-nice.1295, Kernel-ct.1299, Kernel-ct.1300
Kernel-ct.1295:
Extends BlockClosure >> #whileNil: by returning the final non-nil value. Adds #whileNil analogous to #whileTrue and #whileFalse.
[Project uiManager chooseFrom: #(foo bar) values: #(Foo Bar)] whileNil.
[Project uiManager chooseFrom: #(foo bar) values: #(Foo Bar)] whileNil: [self inform: 'You have to decide!']
Kernel-nice.1295:
Fast-up isAnExactFloat.
Correct a typo in a comment.
Kernel-ct.1299:
Refactor #valueSupplyingAnswers::
- Don't reinvent the wheel of Exception >> #pass
- Use #ifError:
See also http://forum.world.st/The-Trunk-Kernel-mt-1283-mcz-td5107403.html.
Kernel-ct.1300:
Fix multiple typos in BlockClosure and FullBlockClosure documentation
=============== Diff against Kernel-mt.1306 ===============
Item was changed:
----- Method: BlockClosure>>reentrant (in category 'private') -----
reentrant
"Answer a version of the recever that can be reentered.
+ Closures are reentrant (unlike BlockContext), so simply answer self."
- Closures are reentrant (unlike BlockContect) so simply answer self."
^self!
Item was changed:
----- Method: BlockClosure>>valueSupplyingAnswers: (in category 'evaluating') -----
valueSupplyingAnswers: aListOfPairs
+ "Evaluate the receiver using a list of questions / answers that might be called upon to automatically respond to Object>>confirm: or FillInTheBlank requests"
- "evaluate the block using a list of questions / answers that might be called upon to
- automatically respond to Object>>confirm: or FillInTheBlank requests"
+ ^ self on: ProvideAnswerNotification do: [ :notification |
+ | caption |
+ caption := notification messageText withSeparatorsCompacted. "to remove new lines"
+ aListOfPairs
+ detect: [ :each |
+ caption = each first
+ or: [ (caption includesSubstring: each first caseSensitive: false)
+ or: [ (each first match: caption)
+ or: [ (caption respondsTo: #matchesRegex:)
+ and: [ [caption matchesRegex: each first] ifError: [false] ] ] ] ] ]
+ ifFound: [ :answer | notification resume: answer second ]
+ ifNone: [ notification pass ] ]!
- ^self
- on: ProvideAnswerNotification
- do: [ :notification |
- | caption |
- caption := notification messageText withSeparatorsCompacted. "to remove new lines"
- aListOfPairs
- detect: [ :each |
- caption = each first
- or: [ (caption includesSubstring: each first caseSensitive: false)
- or: [ (each first match: caption)
- or: [ (caption respondsTo: #matchesRegex:)
- and: [ [caption matchesRegex: each first] on: Error do: [false] ] ] ] ] ]
- ifFound: [ :answer | notification resume: answer second ]
- ifNone: [
- (ProvideAnswerNotification signal: notification messageText)
- ifNil: [ notification resume ]
- ifNotNil: [ :outerAnswer | notification resume: outerAnswer ] ] ]!
Item was added:
+ ----- Method: BlockClosure>>whileNil (in category 'controlling') -----
+ whileNil
+ "Unlike #whileTrue/False this is not compiled inline."
+ | result |
+ [(result := self value) isNil] whileTrue.
+ ^ result
+ !
Item was changed:
----- Method: BlockClosure>>whileNil: (in category 'controlling') -----
whileNil: aBlock
"Unlike #whileTrue/False: this is not compiled inline."
+ | result |
+ [(result := self value) isNil] whileTrue: [aBlock value].
+ ^ result
- ^ [self value isNil] whileTrue: [aBlock value]
!
Item was changed:
BlockClosure variableSubclass: #FullBlockClosure
instanceVariableNames: 'receiver'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'!
+ !FullBlockClosure commentStamp: 'ct 2/14/2020 15:56' prior: 0!
+ Instances of FullBlockClosure represent blocks, a sequence of statements inside square brackets that can be evaluated at any time via one of the value messages (value, value:, value:value:, ..., valueWithArguments:), which answer their last statement. Blocks therefore allow deferred evaluation and so are used to build control structures where a sequence of statements are evaluated or not depending on other values in the program.
- !FullBlockClosure commentStamp: 'eem 4/10/2017 11:18' prior: 0!
- Instances of FullBlockClosure represent blocks, a sequence of statements inside square brackets that can be evaluated at any time via one of the value messages (value, value:, value:value:, ... valueWithArguments:), which answer their last statement. Blocks therefore allow deferred evaluation and so are used to buikld control structures where a sequence of statements are evaluated or not depending on other values in the program.
FullBlockClosure is a refinement of BlockClosure that allows the block to use its own method to hold its code instead of embedding that code within its home method.
+ Implementation notes:
- Implementation:
A FullBlockClosure is a closure that can be independent of any outerContext if desired. It has its own method (currently reusing the startpc inst var) and its own receiver. outerContext can be either a Context or nil.
+ This closure design, implemented by Eliot Miranda and Clement Bera along with the sista work, aims to simplify the block closure model while enhacing its capabilities. It allows lazy decompilation of closures and fast machine code dispatch in Cog's JIT, while allowing inlining of methods and blocks to be independent from their enclosing blocks.
- This closure design, implemented by Eliot Miranda and Clement Bera along with the sista work aims to simplify the block closure model while enhacing its capabilities. It allows lazy decompilation of closures and fast machine code dispatch in Cog's JIT, while allowing inlining of methods and blocks to be independent from their enclosing blocks.
At closure creation time, the bytecode specifies:
- the compiledBlock to execute when executing this block's code (in the literal frame)
- if the receiver is the current receiver or a receiver passed on stack before the copied values.
- if the closure needs an outerContext. outerContexts are used for non local returns and debugging. Blocks with non local returns have to set their outerContext. For other blocks (97% of blocks), it's a trade-off between performance and debuggability.
Instance Variables (inherited)
numArgs <SmallInteger>
outerContext: <Context|nil>
compiledBlock(startpc) <CompiledBlock>
Instance Variables
receiver: <Object>
numArgs
- the number of arguments the block expects. This is superfluous; the number of arguments can be obtained from the receiver's compiledBlock.
outerContext
- the Context of the method or block activation in which the receiver is created.
compiledBlock(startpc)
- reused to refer to the CompiledBlock that implements the receiver's code.
receiver
- the receiver of the message that created the block's home method activation.!
Item was changed:
----- Method: Integer>>isAnExactFloat (in category 'testing') -----
isAnExactFloat
"Answer true if this Integer can be converted exactly to a Float"
| h |
(h := self highBitOfMagnitude) <= Float precision
ifTrue: [^ true].
^ h - 1 <= Float emax
+ and: [(self anyBitOfMagnitudeFrom: 1 to: h - Float precision) not]!
- and: [h - self abs lowBit < Float precision]!
Item was changed:
----- Method: NumberParser>>makeFloatFromMantissa:exponent:base: (in category 'parsing-private') -----
makeFloatFromMantissa: m exponent: k base: aRadix
+ "Convert infinite precision arithmetic into limited precision Floating point.
+ This algorithm rely on correct IEEE rounding mode
- "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!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ct.1300.mcz
==================== Summary ====================
Name: Kernel-ct.1300
Author: ct
Time: 16 February 2020, 4:53:53.7 pm
UUID: f7fb9fc4-63e9-2c41-b97a-6928d5d0d08b
Ancestors: Kernel-tonyg.1293
Fix multiple typos in BlockClosure and FullBlockClosure documentation
=============== Diff against Kernel-tonyg.1293 ===============
Item was changed:
----- Method: BlockClosure>>reentrant (in category 'private') -----
reentrant
"Answer a version of the recever that can be reentered.
+ Closures are reentrant (unlike BlockContext), so simply answer self."
- Closures are reentrant (unlike BlockContect) so simply answer self."
^self!
Item was changed:
BlockClosure variableSubclass: #FullBlockClosure
instanceVariableNames: 'receiver'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'!
+ !FullBlockClosure commentStamp: 'ct 2/14/2020 15:56' prior: 0!
+ Instances of FullBlockClosure represent blocks, a sequence of statements inside square brackets that can be evaluated at any time via one of the value messages (value, value:, value:value:, ..., valueWithArguments:), which answer their last statement. Blocks therefore allow deferred evaluation and so are used to build control structures where a sequence of statements are evaluated or not depending on other values in the program.
- !FullBlockClosure commentStamp: 'eem 4/10/2017 11:18' prior: 0!
- Instances of FullBlockClosure represent blocks, a sequence of statements inside square brackets that can be evaluated at any time via one of the value messages (value, value:, value:value:, ... valueWithArguments:), which answer their last statement. Blocks therefore allow deferred evaluation and so are used to buikld control structures where a sequence of statements are evaluated or not depending on other values in the program.
FullBlockClosure is a refinement of BlockClosure that allows the block to use its own method to hold its code instead of embedding that code within its home method.
+ Implementation notes:
- Implementation:
A FullBlockClosure is a closure that can be independent of any outerContext if desired. It has its own method (currently reusing the startpc inst var) and its own receiver. outerContext can be either a Context or nil.
+ This closure design, implemented by Eliot Miranda and Clement Bera along with the sista work, aims to simplify the block closure model while enhacing its capabilities. It allows lazy decompilation of closures and fast machine code dispatch in Cog's JIT, while allowing inlining of methods and blocks to be independent from their enclosing blocks.
- This closure design, implemented by Eliot Miranda and Clement Bera along with the sista work aims to simplify the block closure model while enhacing its capabilities. It allows lazy decompilation of closures and fast machine code dispatch in Cog's JIT, while allowing inlining of methods and blocks to be independent from their enclosing blocks.
At closure creation time, the bytecode specifies:
- the compiledBlock to execute when executing this block's code (in the literal frame)
- if the receiver is the current receiver or a receiver passed on stack before the copied values.
- if the closure needs an outerContext. outerContexts are used for non local returns and debugging. Blocks with non local returns have to set their outerContext. For other blocks (97% of blocks), it's a trade-off between performance and debuggability.
Instance Variables (inherited)
numArgs <SmallInteger>
outerContext: <Context|nil>
compiledBlock(startpc) <CompiledBlock>
Instance Variables
receiver: <Object>
numArgs
- the number of arguments the block expects. This is superfluous; the number of arguments can be obtained from the receiver's compiledBlock.
outerContext
- the Context of the method or block activation in which the receiver is created.
compiledBlock(startpc)
- reused to refer to the CompiledBlock that implements the receiver's code.
receiver
- the receiver of the message that created the block's home method activation.!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1295.mcz
==================== Summary ====================
Name: Kernel-nice.1295
Author: nice
Time: 17 February 2020, 6:59:12.589583 pm
UUID: 7b8c61b2-fd1d-473e-9536-57f78a6ec152
Ancestors: Kernel-tonyg.1293
Fast-up isAnExactFloat.
Correct a typo in a comment.
=============== Diff against Kernel-tonyg.1293 ===============
Item was changed:
----- Method: Integer>>isAnExactFloat (in category 'testing') -----
isAnExactFloat
"Answer true if this Integer can be converted exactly to a Float"
| h |
(h := self highBitOfMagnitude) <= Float precision
ifTrue: [^ true].
^ h - 1 <= Float emax
+ and: [(self anyBitOfMagnitudeFrom: 1 to: h - Float precision) not]!
- and: [h - self abs lowBit < Float precision]!
Item was changed:
----- Method: NumberParser>>makeFloatFromMantissa:exponent:base: (in category 'parsing-private') -----
makeFloatFromMantissa: m exponent: k base: aRadix
+ "Convert infinite precision arithmetic into limited precision Floating point.
+ This algorithm rely on correct IEEE rounding mode
- "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!