Colin Putney uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.494.mcz
==================== Summary ====================
Name: Collections-ul.494
Author: ul
Time: 25 October 2012, 1:56:50.407 am
UUID: 1b62455b-152d-4ffc-8072-5b6086cb26a8
Ancestors: Collections-cwp.493
- more straightforward String >> #numArgs implementation (early returns, less branches)
- added an optimized version of #canBeToken to ByteSymbol
- removed the sentence about uppercase first letter from String >> #numArgs, because it wasn't true even in 2004
=============== Diff against Collections-fbs.490 ===============
Item was added:
+ ----- Method: ByteString>>canBeToken (in category 'testing') -----
+ canBeToken
+ "Optimized version for the common case."
+
+ ^ (self findSubstring: '~' in: self startingAt: 1 matchTable: Tokenish) = 0
+ !
Item was added:
+ ----- Method: ByteSymbol>>canBeToken (in category 'testing') -----
+ canBeToken
+ "Optimized version for the common case."
+
+ | index |
+ index := 0.
+ [ (index := self findSubstring: '~' in: self startingAt: index + 1 matchTable: Tokenish) = 0 ]
+ whileFalse: [
+ (self at: index) == $_ ifFalse: [ ^false ] ].
+ ^true
+ !
Item was added:
+ ----- Method: String>>canBeToken (in category 'testing') -----
+ canBeToken
+ "Extracted from #numArgs to allow specialization by subclasses"
+
+ ^ self allSatisfy: [:c | c tokenish]!
Item was changed:
----- Method: String>>numArgs (in category 'accessing') -----
numArgs
+ "Answer either the number of arguments that the receiver would take if considered a selector. Answer -1 if it couldn't be a selector. It is intended mostly for the assistance of spelling correction."
- "Answer either the number of arguments that the receiver would take if considered a selector. Answer -1 if it couldn't be a selector. Note that currently this will answer -1 for anything begining with an uppercase letter even though the system will accept such symbols as selectors. It is intended mostly for the assistance of spelling correction."
+ | firstChar numColons start ix |
+ self size = 0 ifTrue: [ ^-1 ].
- | firstChar numColons excess start ix |
- self size = 0 ifTrue: [^ -1].
firstChar := self at: 1.
+ firstChar isSpecial ifTrue: [
+ 2 to: self size do: [ :i | (self at: i) isSpecial ifFalse: [ ^-1 ] ].
+ ^1 ].
+ firstChar isLetter ifFalse: [ ^-1 ].
+ self canBeToken ifFalse: [ ^-1 ].
+ "Fast colon count"
+ numColons := 0.
+ start := 1.
+ [ (ix := self indexOf: $: startingAt: start) > 0 ] whileTrue: [
+ numColons := numColons + 1.
+ start := ix + 1].
+ (numColons > 0 and: [ self last ~= $: ]) ifTrue: [ ^-1 ].
+ ^numColons!
- (firstChar isLetter or: [firstChar = $:]) ifTrue:
- ["Fast reject if any chars are non-alphanumeric
- NOTE: fast only for Byte things - Broken for Wide"
- Scanner prefAllowUnderscoreSelectors ifFalse:
- [self class isBytes
- ifTrue: [(self findSubstring: '~' in: self startingAt: 1 matchTable: Tokenish) > 0 ifTrue: [^ -1]]
- ifFalse: [2 to: self size do: [:i | (self at: i) tokenish ifFalse: [^ -1]]]].
- "Fast colon count"
- numColons := 0. start := 1.
- [(ix := self indexOf: $: startingAt: start) > 0]
- whileTrue:
- [numColons := numColons + 1.
- start := ix + 1].
- numColons = 0 ifTrue: [^ 0].
- firstChar = $:
- ifTrue: [excess := 2 "Has an initial keyword, as #:if:then:else:"]
- ifFalse: [excess := 0].
- self last = $:
- ifTrue: [^ numColons - excess]
- ifFalse: [^ numColons - excess - 1 "Has a final keywords as #nextPut::andCR"]].
- firstChar isSpecial ifTrue:
- [self size = 1 ifTrue: [^ 1].
- 2 to: self size do: [:i | (self at: i) isSpecial ifFalse: [^ -1]].
- ^ 1].
- ^ -1.!
Item was added:
+ ----- Method: Symbol>>canBeToken (in category 'testing') -----
+ canBeToken
+ "Since definition of #tokenish depends on a preference, we want to make sure
+ that underscores are always considered tokenish. This is so that selectors created
+ when the preference was turned on don't suddenly become invalid when the
+ preference is turned off."
+
+ ^ self allSatisfy: [:c | c = $_ or: [c tokenish]]!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.713.mcz
==================== Summary ====================
Name: Kernel-eem.713
Author: eem
Time: 24 October 2012, 4:04:09.929 pm
UUID: e8650d8a-3b37-4fb3-9e2f-8bc074c2d3d6
Ancestors: Kernel-eem.712
Make ClosureExtractor produce properly nested closures.
If the closures ever get passed on to DebuggerMethodMap
instances they can confuse the debugger if not properly
nested.
=============== Diff against Kernel-eem.712 ===============
Item was changed:
InstructionClient subclass: #ClosureExtractor
+ instanceVariableNames: 'action scanner currentContext'
- instanceVariableNames: 'action scanner'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'!
!ClosureExtractor commentStamp: 'mha 9/21/2010 11:16' prior: 0!
A ClosureExtractor is a utility class that is used to extract all BlockClosures from a CompiledMethod. It inherits from InstructionClient and understands only one single message, namely that corresponding to the push closure bytecode instruction. Being sent this message, a ClosureExtractor will create a BlockClosure instance and evaluate the block it holds as an instance variable with that closure as parameter.!
Item was added:
+ ----- Method: ClosureExtractor>>blockReturnTop (in category 'instruction decoding') -----
+ blockReturnTop
+ currentContext := currentContext sender!
Item was changed:
----- Method: ClosureExtractor>>pushClosureCopyNumCopiedValues:numArgs:blockSize: (in category 'instruction decoding') -----
pushClosureCopyNumCopiedValues: numCopied numArgs: numArgs blockSize: blockSize
-
"Create a BlockClosure corresponding to the closure bytecode
+ and execute the action block with it. The created BlockClosure is only a pseudo value,
+ it is not populated with meaningful context and argument information."
+ | block |
+ block := BlockClosure
+ outerContext: currentContext
+ startpc: scanner pc
+ numArgs: numArgs
+ copiedValues: (Array new: numCopied)..
+ currentContext := block asContextWithSender: currentContext.
+ action value: block!
- and execute the action block with it. The created BlockClosure is only a pseudo value,
- it is not populated with meaningful context and argument information."
-
- action value:
- (BlockClosure
- outerContext: (MethodContext
- sender: thisContext
- receiver: self
- method: scanner method
- arguments: (Array new: scanner method numArgs))
- startpc: scanner pc
- numArgs: numArgs
- copiedValues: (Array new: numCopied))!
Item was changed:
----- Method: ClosureExtractor>>scanner: (in category 'accessing') -----
scanner: anInstructionStream
+ scanner := anInstructionStream.
+ currentContext := MethodContext
+ sender: nil
+ receiver: self
+ method: scanner method
+ arguments: (Array new: scanner method numArgs)!
- scanner := anInstructionStream!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.713.mcz
==================== Summary ====================
Name: Kernel-eem.713
Author: eem
Time: 24 October 2012, 4:04:09.929 pm
UUID: e8650d8a-3b37-4fb3-9e2f-8bc074c2d3d6
Ancestors: Kernel-eem.712
Make ClosureExtractor produce properly nested closures.
If the closures ever get passed on to DebuggerMethodMap
instances they can confuse the debugger if not properly
nested.
=============== Diff against Kernel-eem.712 ===============
Item was changed:
InstructionClient subclass: #ClosureExtractor
+ instanceVariableNames: 'action scanner currentContext'
- instanceVariableNames: 'action scanner'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'!
!ClosureExtractor commentStamp: 'mha 9/21/2010 11:16' prior: 0!
A ClosureExtractor is a utility class that is used to extract all BlockClosures from a CompiledMethod. It inherits from InstructionClient and understands only one single message, namely that corresponding to the push closure bytecode instruction. Being sent this message, a ClosureExtractor will create a BlockClosure instance and evaluate the block it holds as an instance variable with that closure as parameter.!
Item was added:
+ ----- Method: ClosureExtractor>>blockReturnTop (in category 'instruction decoding') -----
+ blockReturnTop
+ currentContext := currentContext sender!
Item was changed:
----- Method: ClosureExtractor>>pushClosureCopyNumCopiedValues:numArgs:blockSize: (in category 'instruction decoding') -----
pushClosureCopyNumCopiedValues: numCopied numArgs: numArgs blockSize: blockSize
-
"Create a BlockClosure corresponding to the closure bytecode
+ and execute the action block with it. The created BlockClosure is only a pseudo value,
+ it is not populated with meaningful context and argument information."
+ | block |
+ block := BlockClosure
+ outerContext: currentContext
+ startpc: scanner pc
+ numArgs: numArgs
+ copiedValues: (Array new: numCopied)..
+ currentContext := block asContextWithSender: currentContext.
+ action value: block!
- and execute the action block with it. The created BlockClosure is only a pseudo value,
- it is not populated with meaningful context and argument information."
-
- action value:
- (BlockClosure
- outerContext: (MethodContext
- sender: thisContext
- receiver: self
- method: scanner method
- arguments: (Array new: scanner method numArgs))
- startpc: scanner pc
- numArgs: numArgs
- copiedValues: (Array new: numCopied))!
Item was changed:
----- Method: ClosureExtractor>>scanner: (in category 'accessing') -----
scanner: anInstructionStream
+ scanner := anInstructionStream.
+ currentContext := MethodContext
+ sender: nil
+ receiver: self
+ method: scanner method
+ arguments: (Array new: scanner method numArgs)!
- scanner := anInstructionStream!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.713.mcz
==================== Summary ====================
Name: Kernel-eem.713
Author: eem
Time: 24 October 2012, 4:04:09.929 pm
UUID: e8650d8a-3b37-4fb3-9e2f-8bc074c2d3d6
Ancestors: Kernel-eem.712
Make ClosureExtractor produce properly nested closures.
If the closures ever get passed on to DebuggerMethodMap
instances they can confuse the debugger if not properly
nested.
=============== Diff against Kernel-eem.712 ===============
Item was changed:
InstructionClient subclass: #ClosureExtractor
+ instanceVariableNames: 'action scanner currentContext'
- instanceVariableNames: 'action scanner'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'!
!ClosureExtractor commentStamp: 'mha 9/21/2010 11:16' prior: 0!
A ClosureExtractor is a utility class that is used to extract all BlockClosures from a CompiledMethod. It inherits from InstructionClient and understands only one single message, namely that corresponding to the push closure bytecode instruction. Being sent this message, a ClosureExtractor will create a BlockClosure instance and evaluate the block it holds as an instance variable with that closure as parameter.!
Item was added:
+ ----- Method: ClosureExtractor>>blockReturnTop (in category 'instruction decoding') -----
+ blockReturnTop
+ currentContext := currentContext sender!
Item was changed:
----- Method: ClosureExtractor>>pushClosureCopyNumCopiedValues:numArgs:blockSize: (in category 'instruction decoding') -----
pushClosureCopyNumCopiedValues: numCopied numArgs: numArgs blockSize: blockSize
-
"Create a BlockClosure corresponding to the closure bytecode
+ and execute the action block with it. The created BlockClosure is only a pseudo value,
+ it is not populated with meaningful context and argument information."
+ | block |
+ block := BlockClosure
+ outerContext: currentContext
+ startpc: scanner pc
+ numArgs: numArgs
+ copiedValues: (Array new: numCopied)..
+ currentContext := block asContextWithSender: currentContext.
+ action value: block!
- and execute the action block with it. The created BlockClosure is only a pseudo value,
- it is not populated with meaningful context and argument information."
-
- action value:
- (BlockClosure
- outerContext: (MethodContext
- sender: thisContext
- receiver: self
- method: scanner method
- arguments: (Array new: scanner method numArgs))
- startpc: scanner pc
- numArgs: numArgs
- copiedValues: (Array new: numCopied))!
Item was changed:
----- Method: ClosureExtractor>>scanner: (in category 'accessing') -----
scanner: anInstructionStream
+ scanner := anInstructionStream.
+ currentContext := MethodContext
+ sender: nil
+ receiver: self
+ method: scanner method
+ arguments: (Array new: scanner method numArgs)!
- scanner := anInstructionStream!
Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-bf.107.mcz
==================== Summary ====================
Name: MonticelloConfigurations-bf.107
Author: bf
Time: 16 October 2012, 11:03:34.782 am
UUID: 487f85fa-e0a0-457c-a2ac-91061ab9d99b
Ancestors: MonticelloConfigurations-cmm.106
Improve wording for updating dependencies.
=============== Diff against MonticelloConfigurations-cmm.106 ===============
Item was changed:
----- Method: MCConfigurationBrowser>>dependencyMenu: (in category 'morphic ui') -----
dependencyMenu: aMenu
+ self fillMenu: aMenu fromSpecs: #(('add new dependency...' addDependency)).
- self fillMenu: aMenu fromSpecs: #(('add dependency...' addDependency)).
self selectedDependency ifNotNil: [
+ self fillMenu: aMenu fromSpecs: #(
+ addLine
+ ('remove this dependency' remove)
+ ('update this dependency from image' updateSelectedDependencyFromImage)
+ ('update this dependency from repositories' updateSelectedDependencyFromRepositories)
+ )].
- self fillMenu: aMenu fromSpecs: #(('remove dependency' remove)).
- self fillMenu: aMenu fromSpecs: #(('update dependency from image' updateSelectedDependencyFromImage)).
- self fillMenu: aMenu fromSpecs: #(('update dependency from repositories' updateSelectedDependencyFromRepositories))].
^aMenu!
Item was changed:
----- Method: MCConfigurationBrowser>>description (in category 'description') -----
description
self selectedDependency ifNotNil:
[:dep |
^ ('Package: ', dep package name, String cr, dep versionInfo summary) asText].
self selectedRepository ifNotNil:
[:repo |
^repo creationTemplate
ifNotNil: [repo creationTemplate asText]
ifNil: [repo asCreationTemplate asText addAttribute: TextColor red]].
+ ^'A configuration is a set of particular versions of packages. These can be used to manage multiple dependencies amongst packages when an update requires changes to multiple packages. One stores the current configuration and then modifies the various packages needing modification.\\To create a new configuration first load the most up-to-date configuration in your repository (e.g. http://source.squeak.org/trunk), open that repository in the Monticello browser, scroll down to the "update" package, select the first entry in the list on the right hand side and click Browse, which will open the configuration in a new MCConfigurationBrowser. Then in the new MCConfigurationBrowser click Update, and choose "update all from image" from the pop-up menu. Click Store to save back to the repository.' withCRs!
- ^'A configuration is a set of particular versions of packages. These can be used to manage multiple dependencies amongst packages when an update requires changes to multiple packages. One stores the current configuration and then modifies the various packages needing modification.\\To create a new configuration first load the most up-to-date configuration in your repository (e.g. http://source.squeak.org/trunk), open that repository in the Monticello browser, scroll down to the "update" package, select the first entry in the list on the right hand side and click Browse, which will open the configuration in a new MCConfigurationBrowser. Then in the new MCConfigurationBrowser click Update, and choose "update from image" from the pop-up menu. Click Store to save back to the repository.' withCRs!
Item was removed:
- ----- Method: MCConfigurationBrowser>>loadMenu (in category 'actions') -----
- loadMenu
-
- | menu |
- menu := MenuMorph new defaultTarget: self.
- menu add: 'update from image' action: #updateFromImage.
- menu add: 'update from repositories' action: #updateFromRepositories.
- menu popUpInWorld.
- !
Item was changed:
----- Method: MCConfigurationBrowser>>updateMenu (in category 'actions') -----
updateMenu
| menu |
menu := MenuMorph new defaultTarget: self.
+ menu add: 'update all from image' action: #updateFromImage.
+ menu add: 'update all from repositories' action: #updateFromRepositories.
- menu add: 'update from image' action: #updateFromImage.
- menu add: 'update from repositories' action: #updateFromRepositories.
menu popUpInWorld.!
Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-bf.107.mcz
==================== Summary ====================
Name: MonticelloConfigurations-bf.107
Author: bf
Time: 16 October 2012, 11:03:34.782 am
UUID: 487f85fa-e0a0-457c-a2ac-91061ab9d99b
Ancestors: MonticelloConfigurations-cmm.106
Improve wording for updating dependencies.
=============== Diff against MonticelloConfigurations-cmm.106 ===============
Item was changed:
----- Method: MCConfigurationBrowser>>dependencyMenu: (in category 'morphic ui') -----
dependencyMenu: aMenu
+ self fillMenu: aMenu fromSpecs: #(('add new dependency...' addDependency)).
- self fillMenu: aMenu fromSpecs: #(('add dependency...' addDependency)).
self selectedDependency ifNotNil: [
+ self fillMenu: aMenu fromSpecs: #(
+ addLine
+ ('remove this dependency' remove)
+ ('update this dependency from image' updateSelectedDependencyFromImage)
+ ('update this dependency from repositories' updateSelectedDependencyFromRepositories)
+ )].
- self fillMenu: aMenu fromSpecs: #(('remove dependency' remove)).
- self fillMenu: aMenu fromSpecs: #(('update dependency from image' updateSelectedDependencyFromImage)).
- self fillMenu: aMenu fromSpecs: #(('update dependency from repositories' updateSelectedDependencyFromRepositories))].
^aMenu!
Item was changed:
----- Method: MCConfigurationBrowser>>description (in category 'description') -----
description
self selectedDependency ifNotNil:
[:dep |
^ ('Package: ', dep package name, String cr, dep versionInfo summary) asText].
self selectedRepository ifNotNil:
[:repo |
^repo creationTemplate
ifNotNil: [repo creationTemplate asText]
ifNil: [repo asCreationTemplate asText addAttribute: TextColor red]].
+ ^'A configuration is a set of particular versions of packages. These can be used to manage multiple dependencies amongst packages when an update requires changes to multiple packages. One stores the current configuration and then modifies the various packages needing modification.\\To create a new configuration first load the most up-to-date configuration in your repository (e.g. http://source.squeak.org/trunk), open that repository in the Monticello browser, scroll down to the "update" package, select the first entry in the list on the right hand side and click Browse, which will open the configuration in a new MCConfigurationBrowser. Then in the new MCConfigurationBrowser click Update, and choose "update all from image" from the pop-up menu. Click Store to save back to the repository.' withCRs!
- ^'A configuration is a set of particular versions of packages. These can be used to manage multiple dependencies amongst packages when an update requires changes to multiple packages. One stores the current configuration and then modifies the various packages needing modification.\\To create a new configuration first load the most up-to-date configuration in your repository (e.g. http://source.squeak.org/trunk), open that repository in the Monticello browser, scroll down to the "update" package, select the first entry in the list on the right hand side and click Browse, which will open the configuration in a new MCConfigurationBrowser. Then in the new MCConfigurationBrowser click Update, and choose "update from image" from the pop-up menu. Click Store to save back to the repository.' withCRs!
Item was removed:
- ----- Method: MCConfigurationBrowser>>loadMenu (in category 'actions') -----
- loadMenu
-
- | menu |
- menu := MenuMorph new defaultTarget: self.
- menu add: 'update from image' action: #updateFromImage.
- menu add: 'update from repositories' action: #updateFromRepositories.
- menu popUpInWorld.
- !
Item was changed:
----- Method: MCConfigurationBrowser>>updateMenu (in category 'actions') -----
updateMenu
| menu |
menu := MenuMorph new defaultTarget: self.
+ menu add: 'update all from image' action: #updateFromImage.
+ menu add: 'update all from repositories' action: #updateFromRepositories.
- menu add: 'update from image' action: #updateFromImage.
- menu add: 'update from repositories' action: #updateFromRepositories.
menu popUpInWorld.!
Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-bf.107.mcz
==================== Summary ====================
Name: MonticelloConfigurations-bf.107
Author: bf
Time: 16 October 2012, 11:03:34.782 am
UUID: 487f85fa-e0a0-457c-a2ac-91061ab9d99b
Ancestors: MonticelloConfigurations-cmm.106
Improve wording for updating dependencies.
=============== Diff against MonticelloConfigurations-cmm.106 ===============
Item was changed:
----- Method: MCConfigurationBrowser>>dependencyMenu: (in category 'morphic ui') -----
dependencyMenu: aMenu
+ self fillMenu: aMenu fromSpecs: #(('add new dependency...' addDependency)).
- self fillMenu: aMenu fromSpecs: #(('add dependency...' addDependency)).
self selectedDependency ifNotNil: [
+ self fillMenu: aMenu fromSpecs: #(
+ addLine
+ ('remove this dependency' remove)
+ ('update this dependency from image' updateSelectedDependencyFromImage)
+ ('update this dependency from repositories' updateSelectedDependencyFromRepositories)
+ )].
- self fillMenu: aMenu fromSpecs: #(('remove dependency' remove)).
- self fillMenu: aMenu fromSpecs: #(('update dependency from image' updateSelectedDependencyFromImage)).
- self fillMenu: aMenu fromSpecs: #(('update dependency from repositories' updateSelectedDependencyFromRepositories))].
^aMenu!
Item was changed:
----- Method: MCConfigurationBrowser>>description (in category 'description') -----
description
self selectedDependency ifNotNil:
[:dep |
^ ('Package: ', dep package name, String cr, dep versionInfo summary) asText].
self selectedRepository ifNotNil:
[:repo |
^repo creationTemplate
ifNotNil: [repo creationTemplate asText]
ifNil: [repo asCreationTemplate asText addAttribute: TextColor red]].
+ ^'A configuration is a set of particular versions of packages. These can be used to manage multiple dependencies amongst packages when an update requires changes to multiple packages. One stores the current configuration and then modifies the various packages needing modification.\\To create a new configuration first load the most up-to-date configuration in your repository (e.g. http://source.squeak.org/trunk), open that repository in the Monticello browser, scroll down to the "update" package, select the first entry in the list on the right hand side and click Browse, which will open the configuration in a new MCConfigurationBrowser. Then in the new MCConfigurationBrowser click Update, and choose "update all from image" from the pop-up menu. Click Store to save back to the repository.' withCRs!
- ^'A configuration is a set of particular versions of packages. These can be used to manage multiple dependencies amongst packages when an update requires changes to multiple packages. One stores the current configuration and then modifies the various packages needing modification.\\To create a new configuration first load the most up-to-date configuration in your repository (e.g. http://source.squeak.org/trunk), open that repository in the Monticello browser, scroll down to the "update" package, select the first entry in the list on the right hand side and click Browse, which will open the configuration in a new MCConfigurationBrowser. Then in the new MCConfigurationBrowser click Update, and choose "update from image" from the pop-up menu. Click Store to save back to the repository.' withCRs!
Item was removed:
- ----- Method: MCConfigurationBrowser>>loadMenu (in category 'actions') -----
- loadMenu
-
- | menu |
- menu := MenuMorph new defaultTarget: self.
- menu add: 'update from image' action: #updateFromImage.
- menu add: 'update from repositories' action: #updateFromRepositories.
- menu popUpInWorld.
- !
Item was changed:
----- Method: MCConfigurationBrowser>>updateMenu (in category 'actions') -----
updateMenu
| menu |
menu := MenuMorph new defaultTarget: self.
+ menu add: 'update all from image' action: #updateFromImage.
+ menu add: 'update all from repositories' action: #updateFromRepositories.
- menu add: 'update from image' action: #updateFromImage.
- menu add: 'update from repositories' action: #updateFromRepositories.
menu popUpInWorld.!