[squeak-dev] The Trunk: Monticello-ar.321.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Aug 31 03:36:20 UTC 2009


Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.321.mcz

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

Name: Monticello-ar.321
Author: ar
Time: 30 August 2009, 8:35:22 am
UUID: dedee780-04ae-e84a-8e6c-0947f7a24780
Ancestors: Monticello-tfel.320

Adds a workaround for the broken 'atomic' loading behavior in MCPackageLoader>>basicLoad.

=============== Diff against Monticello-tfel.320 ===============

Item was changed:
  ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
  basicLoad
  	errorDefinitions := OrderedCollection new.
+ 	[[
+ 	
+ 	"FIXME. Do a separate pass on loading class definitions as the very first thing.
+ 	This is a workaround for a problem with the so-called 'atomic' loading (you wish!!)
+ 	which isn't atomic at all but mixes compilation of methods with reshapes of classes.
+ 
+ 	Since the method is not installed until later, any class reshape in the middle *will*
+ 	affect methods in subclasses that have been compiled before. There is probably
+ 	a better way of dealing with this by ensuring that the sort order of the definition lists
+ 	superclass definitions before methods for subclasses but I need this NOW, and adding
+ 	an extra pass ensures that methods are compiled against their new class definitions."
+ 
+ 	additions do: [:ea | self loadClassDefinition: ea] displayingProgress: 'Loading classes...'.
+ 	
+ 	additions do: [:ea | self tryToLoad: ea] displayingProgress: 'Compiling methods...'.
- 	[[additions do: [:ea | self tryToLoad: ea] displayingProgress: 'Loading...'.
  	removals do: [:ea | ea unload] displayingProgress: 'Cleaning up...'.
  	self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
  	errorDefinitions do: [:ea | ea addMethodAdditionTo: methodAdditions] displayingProgress: 'Reloading...'.
  	methodAdditions do: [:each | each installMethod].
  	methodAdditions do: [:each | each notifyObservers].
  	additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)] displayingProgress: 'Initializing...']
  		on: InMidstOfFileinNotification 
  		do: [:n | n resume: true]]
  			ensure: [self flushChangesFile]!

Item was added:
+ ----- Method: MCPackageLoader>>loadClassDefinition: (in category 'private') -----
+ loadClassDefinition: aDefinition
+ 	[aDefinition isClassDefinition ifTrue:[aDefinition load]] on: Error do: [errorDefinitions add: aDefinition].!




More information about the Squeak-dev mailing list