[Pkg] The Trunk: System-ul.451.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Aug 4 01:16:45 UTC 2011
Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.451.mcz
==================== Summary ====================
Name: System-ul.451
Author: ul
Time: 3 August 2011, 1:53:21.094 am
UUID: 12173273-4139-304d-b495-6d34396d067c
Ancestors: System-eem.450
Removed unnecessary blocks.
=============== Diff against System-eem.450 ===============
Item was changed:
----- Method: AbstractLauncher>>parameterAt:ifAbsent: (in category 'private') -----
parameterAt: parName ifAbsent: aBlock
"Return the parameter named parName.
Evaluate the block if parameter does not exist."
^self parameters
at: parName asUppercase
+ ifAbsent: aBlock!
- ifAbsent: [aBlock value]!
Item was changed:
----- Method: ImageSegment>>allInstancesOf:do: (in category 'instance change shape') -----
allInstancesOf: aClass do: aBlock
| withSymbols oldInstances segSize |
"Bring me in, locate instances of aClass and submit them to the block. Write me out again."
(state = #onFile or: [state = #onFileWithSymbols]) ifFalse: [^ self].
withSymbols := state = #onFileWithSymbols.
(outPointers includes: aClass) ifFalse: [^ self].
"If has instances, they point out at the class"
state = #onFile ifTrue: [Cursor read showWhile: [self readFromFile]].
segSize := segment size.
self install.
oldInstances := OrderedCollection new.
self allObjectsDo: [:obj | obj class == aClass ifTrue: [
oldInstances add: obj]].
+ oldInstances do: aBlock. "do the work"
- oldInstances do: [:inst | aBlock value: inst]. "do the work"
self copyFromRoots: arrayOfRoots sizeHint: segSize.
self extract.
withSymbols
ifTrue: [self writeToFileWithSymbols]
ifFalse: [self writeToFile].
!
Item was changed:
----- Method: ImageSegment>>ifOutPointer:thenAllObjectsDo: (in category 'instance change shape') -----
ifOutPointer: anObject thenAllObjectsDo: aBlock
| withSymbols segSize |
"If I point out to anObject, bring me in, Submit all my objects to the block. Write me out again."
(state = #onFile or: [state = #onFileWithSymbols]) ifFalse: [^ self].
withSymbols := state = #onFileWithSymbols.
(outPointers includes: anObject) ifFalse: [^ self].
state = #onFile ifTrue: [Cursor read showWhile: [self readFromFile]].
segSize := segment size.
self install.
+ self allObjectsDo: aBlock. "do the work"
- self allObjectsDo: [:obj | aBlock value: obj]. "do the work"
self copyFromRoots: arrayOfRoots sizeHint: segSize.
self extract.
withSymbols
ifTrue: [self writeToFileWithSymbols]
ifFalse: [self writeToFile].
!
Item was changed:
----- Method: MczInstaller>>useNewChangeSetDuring: (in category 'utilities') -----
useNewChangeSetDuring: aBlock
| changeHolder oldChanges newChanges |
changeHolder := (ChangeSet respondsTo: #newChanges:)
ifTrue: [ChangeSet]
ifFalse: [Smalltalk].
oldChanges := (ChangeSet respondsTo: #current)
ifTrue: [ChangeSet current]
ifFalse: [Smalltalk changes].
newChanges := ChangeSet new name: (ChangeSet uniqueNameLike: self extractPackageName).
changeHolder newChanges: newChanges.
+ aBlock ensure: [changeHolder newChanges: oldChanges].!
- [aBlock value] ensure: [changeHolder newChanges: oldChanges].!
Item was changed:
----- Method: Preferences class>>parameterAt:ifAbsent: (in category 'parameters') -----
parameterAt: aKey ifAbsent: aBlock
"Answer the parameter saved at the given key; if there is no such key in the Parameters dictionary, evaluate aBlock"
+ ^ Parameters at: aKey ifAbsent: aBlock!
- ^ Parameters at: aKey ifAbsent: [aBlock value]!
Item was changed:
----- Method: Project>>projectParameterAt:ifAbsent: (in category 'project parameters') -----
projectParameterAt: aSymbol ifAbsent: aBlock
"Answer the project parameter stored at the given symbol, or the result of evaluating the block"
+ ^ self projectParameters at: aSymbol ifAbsent: aBlock!
- ^ self projectParameters at: aSymbol ifAbsent: [aBlock value]!
Item was changed:
----- Method: Project>>projectPreferenceAt:ifAbsent: (in category 'project parameters') -----
projectPreferenceAt: aSymbol ifAbsent: aBlock
"Answer the project preference stored at the given symbol, or the result of evaluating the block"
+ ^ self projectPreferenceFlagDictionary at: aSymbol ifAbsent: aBlock!
- ^ self projectPreferenceFlagDictionary at: aSymbol ifAbsent: [aBlock value]!
Item was changed:
----- Method: Project>>withChildrenDo: (in category 'accessing') -----
withChildrenDo: aBlock
"Evaluate the block first with the receiver as argument, then, recursively and depth first, with each of the receiver's children as argument"
aBlock value: self.
self children do: [:p |
+ p withChildrenDo: aBlock ]!
- p withChildrenDo:
- [:c | aBlock value: c]]!
Item was changed:
----- Method: SystemChangeNotifier>>doSilently: (in category 'public') -----
doSilently: aBlock
"Perform the block, and ensure that no system notification are broadcasted while doing so."
| result |
silenceLevel := silenceLevel + 1.
+ result := aBlock ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].
- result := [aBlock value] ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].
^ result.!
Item was changed:
----- Method: SystemNavigation>>allBehaviorsDo: (in category 'query') -----
allBehaviorsDo: aBlock
"Evaluate the argument, aBlock, for each kind of Behavior in the system
(that is, Object and its subclasses and Traits).
ar 7/15/1999: The code below will not enumerate any obsolete or anonymous
behaviors for which the following should be executed:
Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].
but what follows is way faster than enumerating all objects."
Class rootsOfTheWorld do:
[:root|
root withAllSubclassesDo:
[:class|
class isMeta ifFalse: "The metaclasses are rooted at Class; don't include them twice."
[aBlock value: class; value: class class]]].
+ ClassDescription allTraitsDo: aBlock!
- ClassDescription allTraitsDo:
- [:trait | aBlock value: trait]!
More information about the Packages
mailing list