Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.504.mcz
==================== Summary ====================
Name: Monticello-bf.504
Author: bf
Time: 19 April 2012, 9:36:55.211 am
UUID: 5fa1177d-b1ed-4cf0-8628-229f171ca814
Ancestors: Monticello-eem.503
Fix intermittant load problem. We sometimes would get a 'changes file not found' in the middle of updating, but retrying found it just fine. I finally tracked it down to too many files being open. This change re-uses the same read-only copy during a package load (which additionally might speed up loading a tiny bit).
=============== Diff against Monticello-eem.503 ===============
Item was changed:
----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
basicLoad
"Load the contents of some package. This is the core loading method
in Monticello. Be wary about modifying it unless you understand the details
and dependencies of the various entities being modified."
| pkgName |
errorDefinitions := OrderedCollection new.
"Obviously this isn't the package name but we don't have anything else
to use here. ChangeSet current name will generally work since a CS is
usually installed prior to installation."
pkgName := ChangeSet current name.
+ [CurrentReadOnlySourceFiles cacheDuring: [[
+ "Pass 1: Load everything but the methods, which are collected in methodAdditions."
- [["Pass 1: Load everything but the methods, which are collected in methodAdditions."
additions do: [:ea |
ea isMethodDefinition
ifTrue:[methodAdditions add: ea asMethodAddition]
ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].
] displayingProgress: 'Reshaping ', pkgName.
"Try again any delayed definitions"
self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
errorDefinitions do: [:ea | ea load]
displayingProgress: 'Reloading ', pkgName.
"Pass 2: We compile new / changed methods"
methodAdditions do:[:ea| ea createCompiledMethod]
displayingProgress: 'Compiling ', pkgName.
'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|
"There is no progress *during* installation since a progress bar update
will redraw the world and potentially call methods that we're just trying to install."
bar value: 1.
"Pass 3: Install the new / changed methods
(this is a separate pass to allow compiler changes to be loaded)"
methodAdditions do:[:ea| ea installMethod].
"Pass 4: Remove the obsolete methods"
removals do:[:ea| ea unload].
].
"Finally, notify observers for the method additions"
methodAdditions do: [:each | each notifyObservers]
"the message is fake but actually telling people how much time we spend
in the notifications is embarrassing so lie instead"
displayingProgress: 'Installing ', pkgName.
additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]
displayingProgress: 'Initializing ', pkgName.
] on: InMidstOfFileinNotification do: [:n | n resume: true]
+ ]] ensure: [self flushChangesFile]!
- ] ensure: [self flushChangesFile]!
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.504.mcz
==================== Summary ====================
Name: Monticello-bf.504
Author: bf
Time: 19 April 2012, 9:36:55.211 am
UUID: 5fa1177d-b1ed-4cf0-8628-229f171ca814
Ancestors: Monticello-eem.503
Fix intermittant load problem. We sometimes would get a 'changes file not found' in the middle of updating, but retrying found it just fine. I finally tracked it down to too many files being open. This change re-uses the same read-only copy during a package load (which additionally might speed up loading a tiny bit).
=============== Diff against Monticello-eem.503 ===============
Item was changed:
----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
basicLoad
"Load the contents of some package. This is the core loading method
in Monticello. Be wary about modifying it unless you understand the details
and dependencies of the various entities being modified."
| pkgName |
errorDefinitions := OrderedCollection new.
"Obviously this isn't the package name but we don't have anything else
to use here. ChangeSet current name will generally work since a CS is
usually installed prior to installation."
pkgName := ChangeSet current name.
+ [CurrentReadOnlySourceFiles cacheDuring: [[
+ "Pass 1: Load everything but the methods, which are collected in methodAdditions."
- [["Pass 1: Load everything but the methods, which are collected in methodAdditions."
additions do: [:ea |
ea isMethodDefinition
ifTrue:[methodAdditions add: ea asMethodAddition]
ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].
] displayingProgress: 'Reshaping ', pkgName.
"Try again any delayed definitions"
self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
errorDefinitions do: [:ea | ea load]
displayingProgress: 'Reloading ', pkgName.
"Pass 2: We compile new / changed methods"
methodAdditions do:[:ea| ea createCompiledMethod]
displayingProgress: 'Compiling ', pkgName.
'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|
"There is no progress *during* installation since a progress bar update
will redraw the world and potentially call methods that we're just trying to install."
bar value: 1.
"Pass 3: Install the new / changed methods
(this is a separate pass to allow compiler changes to be loaded)"
methodAdditions do:[:ea| ea installMethod].
"Pass 4: Remove the obsolete methods"
removals do:[:ea| ea unload].
].
"Finally, notify observers for the method additions"
methodAdditions do: [:each | each notifyObservers]
"the message is fake but actually telling people how much time we spend
in the notifications is embarrassing so lie instead"
displayingProgress: 'Installing ', pkgName.
additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]
displayingProgress: 'Initializing ', pkgName.
] on: InMidstOfFileinNotification do: [:n | n resume: true]
+ ]] ensure: [self flushChangesFile]!
- ] ensure: [self flushChangesFile]!
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.504.mcz
==================== Summary ====================
Name: Monticello-bf.504
Author: bf
Time: 19 April 2012, 9:36:55.211 am
UUID: 5fa1177d-b1ed-4cf0-8628-229f171ca814
Ancestors: Monticello-eem.503
Fix intermittant load problem. We sometimes would get a 'changes file not found' in the middle of updating, but retrying found it just fine. I finally tracked it down to too many files being open. This change re-uses the same read-only copy during a package load (which additionally might speed up loading a tiny bit).
=============== Diff against Monticello-eem.503 ===============
Item was changed:
----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
basicLoad
"Load the contents of some package. This is the core loading method
in Monticello. Be wary about modifying it unless you understand the details
and dependencies of the various entities being modified."
| pkgName |
errorDefinitions := OrderedCollection new.
"Obviously this isn't the package name but we don't have anything else
to use here. ChangeSet current name will generally work since a CS is
usually installed prior to installation."
pkgName := ChangeSet current name.
+ [CurrentReadOnlySourceFiles cacheDuring: [[
+ "Pass 1: Load everything but the methods, which are collected in methodAdditions."
- [["Pass 1: Load everything but the methods, which are collected in methodAdditions."
additions do: [:ea |
ea isMethodDefinition
ifTrue:[methodAdditions add: ea asMethodAddition]
ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].
] displayingProgress: 'Reshaping ', pkgName.
"Try again any delayed definitions"
self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
errorDefinitions do: [:ea | ea load]
displayingProgress: 'Reloading ', pkgName.
"Pass 2: We compile new / changed methods"
methodAdditions do:[:ea| ea createCompiledMethod]
displayingProgress: 'Compiling ', pkgName.
'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|
"There is no progress *during* installation since a progress bar update
will redraw the world and potentially call methods that we're just trying to install."
bar value: 1.
"Pass 3: Install the new / changed methods
(this is a separate pass to allow compiler changes to be loaded)"
methodAdditions do:[:ea| ea installMethod].
"Pass 4: Remove the obsolete methods"
removals do:[:ea| ea unload].
].
"Finally, notify observers for the method additions"
methodAdditions do: [:each | each notifyObservers]
"the message is fake but actually telling people how much time we spend
in the notifications is embarrassing so lie instead"
displayingProgress: 'Installing ', pkgName.
additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]
displayingProgress: 'Initializing ', pkgName.
] on: InMidstOfFileinNotification do: [:n | n resume: true]
+ ]] ensure: [self flushChangesFile]!
- ] ensure: [self flushChangesFile]!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.679.mcz
==================== Summary ====================
Name: Kernel-eem.679
Author: eem
Time: 18 April 2012, 10:40:18.574 am
UUID: aa8e1b1a-a108-4228-91bf-c996fa4b5b26
Ancestors: Kernel-eem.678
Fix loading of CompiledMethod subclasses. The old code
just used CompiledMethod's format, which includes its
compact class index, hence resulting in instantiating the
subclass returning an instance of CompiledMethod. The
new code masks out CompiledMethod's compact class imdex (if any) and masks in the right compact class index.
=============== Diff against Kernel-eem.678 ===============
Item was changed:
----- Method: ClassBuilder>>computeFormat:instSize:forSuper:ccIndex: (in category 'class format') -----
computeFormat: type instSize: newInstSize forSuper: newSuper ccIndex: ccIndex
"Compute the new format for making oldClass a subclass of newSuper.
Return the format or nil if there is any problem."
| instSize isVar isWords isPointers isWeak |
+ type == #compiledMethod ifTrue:
+ [^(CompiledMethod format
+ bitClear: (16r1F bitShift: 11))
+ bitOr: (ccIndex bitShift: 11)].
- type == #compiledMethod
- ifTrue:[^CompiledMethod format].
instSize := newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]).
+ instSize > 254 ifTrue:
+ [self error: 'Class has too many instance variables (', instSize printString,')'.
- instSize > 254 ifTrue:[
- self error: 'Class has too many instance variables (', instSize printString,')'.
^nil].
type == #normal ifTrue:[isVar := isWeak := false. isWords := isPointers := true].
type == #bytes ifTrue:[isVar := true. isWords := isPointers := isWeak := false].
type == #words ifTrue:[isVar := isWords := true. isPointers := isWeak := false].
type == #variable ifTrue:[isVar := isPointers := isWords := true. isWeak := false].
type == #weak ifTrue:[isVar := isWeak := isWords := isPointers := true].
+ (isPointers not and:[instSize > 0]) ifTrue:
+ [self error:'A non-pointer class cannot have instance variables'.
- (isPointers not and:[instSize > 0]) ifTrue:[
- self error:'A non-pointer class cannot have instance variables'.
^nil].
^(self format: instSize
variable: isVar
words: isWords
pointers: isPointers
weak: isWeak) + (ccIndex bitShift: 11).!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.679.mcz
==================== Summary ====================
Name: Kernel-eem.679
Author: eem
Time: 18 April 2012, 10:40:18.574 am
UUID: aa8e1b1a-a108-4228-91bf-c996fa4b5b26
Ancestors: Kernel-eem.678
Fix loading of CompiledMethod subclasses. The old code
just used CompiledMethod's format, which includes its
compact class index, hence resulting in instantiating the
subclass returning an instance of CompiledMethod. The
new code masks out CompiledMethod's compact class imdex (if any) and masks in the right compact class index.
=============== Diff against Kernel-eem.678 ===============
Item was changed:
----- Method: ClassBuilder>>computeFormat:instSize:forSuper:ccIndex: (in category 'class format') -----
computeFormat: type instSize: newInstSize forSuper: newSuper ccIndex: ccIndex
"Compute the new format for making oldClass a subclass of newSuper.
Return the format or nil if there is any problem."
| instSize isVar isWords isPointers isWeak |
+ type == #compiledMethod ifTrue:
+ [^(CompiledMethod format
+ bitClear: (16r1F bitShift: 11))
+ bitOr: (ccIndex bitShift: 11)].
- type == #compiledMethod
- ifTrue:[^CompiledMethod format].
instSize := newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]).
+ instSize > 254 ifTrue:
+ [self error: 'Class has too many instance variables (', instSize printString,')'.
- instSize > 254 ifTrue:[
- self error: 'Class has too many instance variables (', instSize printString,')'.
^nil].
type == #normal ifTrue:[isVar := isWeak := false. isWords := isPointers := true].
type == #bytes ifTrue:[isVar := true. isWords := isPointers := isWeak := false].
type == #words ifTrue:[isVar := isWords := true. isPointers := isWeak := false].
type == #variable ifTrue:[isVar := isPointers := isWords := true. isWeak := false].
type == #weak ifTrue:[isVar := isWeak := isWords := isPointers := true].
+ (isPointers not and:[instSize > 0]) ifTrue:
+ [self error:'A non-pointer class cannot have instance variables'.
- (isPointers not and:[instSize > 0]) ifTrue:[
- self error:'A non-pointer class cannot have instance variables'.
^nil].
^(self format: instSize
variable: isVar
words: isWords
pointers: isPointers
weak: isWeak) + (ccIndex bitShift: 11).!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.679.mcz
==================== Summary ====================
Name: Kernel-eem.679
Author: eem
Time: 18 April 2012, 10:40:18.574 am
UUID: aa8e1b1a-a108-4228-91bf-c996fa4b5b26
Ancestors: Kernel-eem.678
Fix loading of CompiledMethod subclasses. The old code
just used CompiledMethod's format, which includes its
compact class index, hence resulting in instantiating the
subclass returning an instance of CompiledMethod. The
new code masks out CompiledMethod's compact class imdex (if any) and masks in the right compact class index.
=============== Diff against Kernel-eem.678 ===============
Item was changed:
----- Method: ClassBuilder>>computeFormat:instSize:forSuper:ccIndex: (in category 'class format') -----
computeFormat: type instSize: newInstSize forSuper: newSuper ccIndex: ccIndex
"Compute the new format for making oldClass a subclass of newSuper.
Return the format or nil if there is any problem."
| instSize isVar isWords isPointers isWeak |
+ type == #compiledMethod ifTrue:
+ [^(CompiledMethod format
+ bitClear: (16r1F bitShift: 11))
+ bitOr: (ccIndex bitShift: 11)].
- type == #compiledMethod
- ifTrue:[^CompiledMethod format].
instSize := newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]).
+ instSize > 254 ifTrue:
+ [self error: 'Class has too many instance variables (', instSize printString,')'.
- instSize > 254 ifTrue:[
- self error: 'Class has too many instance variables (', instSize printString,')'.
^nil].
type == #normal ifTrue:[isVar := isWeak := false. isWords := isPointers := true].
type == #bytes ifTrue:[isVar := true. isWords := isPointers := isWeak := false].
type == #words ifTrue:[isVar := isWords := true. isPointers := isWeak := false].
type == #variable ifTrue:[isVar := isPointers := isWords := true. isWeak := false].
type == #weak ifTrue:[isVar := isWeak := isWords := isPointers := true].
+ (isPointers not and:[instSize > 0]) ifTrue:
+ [self error:'A non-pointer class cannot have instance variables'.
- (isPointers not and:[instSize > 0]) ifTrue:[
- self error:'A non-pointer class cannot have instance variables'.
^nil].
^(self format: instSize
variable: isVar
words: isWords
pointers: isPointers
weak: isWeak) + (ccIndex bitShift: 11).!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.678.mcz
==================== Summary ====================
Name: Kernel-eem.678
Author: eem
Time: 18 April 2012, 10:29:16.009 am
UUID: a1560bd8-28a8-4167-a5ae-d3da0cd21c70
Ancestors: Kernel-eem.677
Provide a kbdTest for the EventSensor.
=============== Diff against Kernel-eem.677 ===============
Item was added:
+ ----- Method: EventSensor>>kbdTest (in category 'keyboard') -----
+ kbdTest "Sensor kbdTest"
+ "This test routine will print the unmodified character, its keycode,
+ and the OR of all its modifier bits, until the character x is typed"
+ | char evt |
+ char := nil.
+ [char = $x] whileFalse:
+ [[(evt := self peekKeyboardEvent) isNil] whileTrue.
+ char := self characterForKeycode: evt third.
+ (String streamContents:
+ [:s |
+ s nextPut: char.
+ (3 to: 8) with: 'cpmurw' do:
+ [:i :c|
+ s space; nextPut: c; nextPut: $:; print: (evt at: i); nextPutAll: ' ']])
+ displayAt: 10@10]!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.678.mcz
==================== Summary ====================
Name: Kernel-eem.678
Author: eem
Time: 18 April 2012, 10:29:16.009 am
UUID: a1560bd8-28a8-4167-a5ae-d3da0cd21c70
Ancestors: Kernel-eem.677
Provide a kbdTest for the EventSensor.
=============== Diff against Kernel-eem.677 ===============
Item was added:
+ ----- Method: EventSensor>>kbdTest (in category 'keyboard') -----
+ kbdTest "Sensor kbdTest"
+ "This test routine will print the unmodified character, its keycode,
+ and the OR of all its modifier bits, until the character x is typed"
+ | char evt |
+ char := nil.
+ [char = $x] whileFalse:
+ [[(evt := self peekKeyboardEvent) isNil] whileTrue.
+ char := self characterForKeycode: evt third.
+ (String streamContents:
+ [:s |
+ s nextPut: char.
+ (3 to: 8) with: 'cpmurw' do:
+ [:i :c|
+ s space; nextPut: c; nextPut: $:; print: (evt at: i); nextPutAll: ' ']])
+ displayAt: 10@10]!