[squeak-dev] The Trunk: System-fbs.555.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jun 30 10:13:17 UTC 2013


Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.555.mcz

==================== Summary ====================

Name: System-fbs.555
Author: fbs
Time: 30 June 2013, 11:11:36.602 am
UUID: b0c9ac36-e757-e34b-b569-37a32412ce51
Ancestors: System-fbs.554

More consolidation of the "System-Object Events" pieces. Note the removal of indirection through Object class >> #flushEvents. At some point we might want to deprecate this method because it doesn't do anything useful.

=============== Diff against System-fbs.554 ===============

Item was changed:
  ----- Method: EventManager class>>flushEvents (in category 'initialize-release') -----
  flushEvents
+ 	"EventManager flushEvents"
- 	"Object flushEvents"
  	
  	self actionMaps keysAndValuesDo:[:rcvr :evtDict| rcvr ifNotNil:[
  		"make sure we don't modify evtDict while enumerating"
  		evtDict keys do:[:evtName| | msgSet |
  			msgSet := evtDict at: evtName ifAbsent:[nil].
  			(msgSet == nil) ifTrue:[rcvr removeActionsForEvent: evtName]]]].
  	EventManager actionMaps finalizeValues. !

Item was added:
+ ----- Method: Object class>>flushEvents (in category '*System-Object Events-class initialization') -----
+ flushEvents
+ 	"Object flushEvents"
+ 
+ 	EventManager flushEvents. !

Item was changed:
  ----- Method: SmalltalkImage>>garbageCollect (in category 'memory space') -----
  garbageCollect
  	"Primitive. Reclaims all garbage and answers the number of bytes of available space."
  	Object flushDependents.
+ 	EventManager flushEvents.
- 	Object flushEvents.
  	^self primitiveGarbageCollect!

Item was changed:
  ----- Method: SmalltalkImage>>snapshot:andQuit:embedded: (in category 'snapshot and quit') -----
  snapshot: save andQuit: quit embedded: embeddedFlag
  	"Mark the changes file and close all files as part of #processShutdownList.
  	If save is true, save the current state of this Smalltalk in the image file.
  	If quit is true, then exit to the outer OS shell.
  	The latter part of this method runs when resuming a previously saved image. This resume logic checks for a document file to process when starting up."
  	| resuming msg |
  	Object flushDependents.
+ 	EventManager flushEvents.
- 	Object flushEvents.
  
  	(SourceFiles at: 2) ifNotNil:[
  		msg := String streamContents: [ :s |
  			s nextPutAll: '----';
  			nextPutAll: (save ifTrue: [ quit ifTrue: [ 'QUIT' ] ifFalse: [ 'SNAPSHOT' ] ]
  							ifFalse: [quit ifTrue: [ 'QUIT/NOSAVE' ] ifFalse: [ 'NOP' ]]);
  			nextPutAll: '----';
  			print: Date dateAndTimeNow; space;
  			nextPutAll: (FileDirectory default localNameFor: self imageName);
  			nextPutAll: ' priorSource: ';
  			print: LastQuitLogPosition ].
  		self assureStartupStampLogged.
  		save ifTrue: [ LastQuitLogPosition := (SourceFiles at: 2) setToEnd; position ].
  		self logChange: msg.
  		Transcript cr; show: msg
  	].
  
  	Smalltalk processShutDownList: quit.
  	Cursor write show.
  	save ifTrue: [resuming := embeddedFlag 
  					ifTrue: [self snapshotEmbeddedPrimitive] 
  					ifFalse: [self snapshotPrimitive].  "<-- PC frozen here on image file"
  				resuming == false "guard against failure" ifTrue:
  					["Time to reclaim segment files is immediately after a save"
  					Smalltalk at: #ImageSegment
  						ifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]
  		ifFalse: [resuming := false].
  	quit & (resuming == false) ifTrue: [self quitPrimitive].
  	Cursor normal show.
  	Smalltalk setGCParameters.
  	resuming == true ifTrue: [Smalltalk clearExternalObjects].
  	Smalltalk processStartUpList: resuming == true.
  	resuming == true ifTrue:[
  		self setPlatformPreferences.
  		self recordStartupStamp].
  	Project current wakeUpTopWindow.
  	"Now it's time to raise an error"
  	resuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].
  	^ resuming!



More information about the Squeak-dev mailing list