[Vm-dev] VM Maker: Cog-eem.452.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 29 02:55:48 UTC 2022

Eliot Miranda uploaded a new version of Cog to project VM Maker:

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

Name: Cog-eem.452
Author: eem
Time: 28 December 2022, 6:55:45.064059 pm
UUID: 69636d4e-5138-44ef-b90e-b02dbe56785a
Ancestors: Cog-eem.451

Fix a very confusing regression from Cog-eem.446.  On saving and restoring processors at snapshot/load the processor's memoryOffset must be saved/restored.

=============== Diff against Cog-eem.451 ===============

Item was changed:
  ----- Method: CogProcessorAlien class>>shutDown: (in category 'system startup') -----
  shutDown: quitting
  	SavedState keysDo:
  		 processorOrNil ifNotNil:
+ 			[SavedState at: processorOrNil put: processorOrNil registerState, {processorOrNil memoryOffset}]]!
- 			[SavedState at: processorOrNil put: processorOrNil registerState]]!

Item was changed:
  ----- Method: CogProcessorAlien class>>startUp: (in category 'system startup') -----
  startUp: resuming
  	resuming ifTrue:
  		[SavedState keysAndValuesDo:
  			[:processorOrNil :stateOrNil|
  			 (processorOrNil notNil and: [stateOrNil notNil]) ifTrue:
+ 				[| setters |
+ 				 processorOrNil addressFieldPut: processorOrNil class primitiveNewCPU.
+ 				 setters := processorOrNil registerStateSetters.
+ 				 setters withIndexDo:
+ 					[:setter :index|
+ 					processorOrNil perform: setter with: (stateOrNil at: index)].
+ 				 stateOrNil size > setters size ifTrue:
+ 					[processorOrNil memoryOffset: stateOrNil last]]]]!
- 				[processorOrNil addressFieldPut: processorOrNil class primitiveNewCPU.
- 				 stateOrNil with: processorOrNil registerStateSetters do:
- 					[:value :setter|
- 					processorOrNil perform: setter with: value]]]]!

More information about the Vm-dev mailing list