[squeak-dev] The Trunk: System-mt.1334.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 5 13:28:33 UTC 2022

Marcel Taeumel uploaded a new version of System to project The Trunk:

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

Name: System-mt.1334
Author: mt
Time: 5 April 2022, 3:28:26.895949 pm
UUID: d03e8df4-a41b-0d46-9afc-94959770ade2
Ancestors: System-ct.1333

Minor clean up and more documentation around Project startUp and shutDown.

=============== Diff against System-ct.1333 ===============

Item was changed:
  ----- Method: Project class>>shutDown: (in category 'snapshots') -----
  shutDown: quitting
+ 	"1) Give the current project a chance to clean-up if we are about to quit."
+ 	quitting ifTrue: [Project current shutDownActions].
+ 	"2) To save some space in the .image file, shrink the display bits. Not sure why we need to #invalidate, though..."
+ 	Project current invalidate; shrinkDisplay.!
- 	Project current
- 		invalidate;
- 		shrinkDisplay.
- 	quitting ifTrue: [
- 		Project current world triggerEvent: #aboutToLeaveWorld].!

Item was changed:
  ----- Method: Project class>>startUp: (in category 'snapshots') -----
  startUp: startAfresh
+ 	"0) No blitting onto Display must be performed before this point!! Or the VM will crash."
+ 	"1) We just shrunk the display form to save space in the .image file. We have to restore it now. Also, when we start afresh, we MUST communicate display form and depth to the VM as both are cannot be retrieved from the image header."
  	Project current restoreDisplay.
+ 	"2) Give the current project a chance to initialize if we start afresh. After that, repaint everything to avoid flickering if the start-up actions changed something." 
+ 	startAfresh ifTrue: [Project current startUpActions; restore].!
- 	startAfresh ifTrue: [
- 		Project current startUpActions.
- 		Project current world triggerEvent: #aboutToEnterWorld].
- 	Project current restore.!

Item was added:
+ ----- Method: Project>>shutDownActions (in category 'enter') -----
+ shutDownActions
+ 	"The image is about to be snapshotted *and* quitting after that."
+ 	self world triggerEvent: #aboutToLeaveWorld.
+ !

Item was changed:
  ----- Method: Project>>startUpActions (in category 'enter') -----
  	"The image is being newly started, not just snapshotted."
+ 	self world triggerEvent: #aboutToEnterWorld.

More information about the Squeak-dev mailing list