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

Miguel Enrique Cobá Martinez miguel.coba at gmail.com
Wed Sep 30 14:31:12 UTC 2009


El mié, 30-09-2009 a las 04:39 +0000, commits at source.squeak.org
escribió:
> Andreas Raab uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-ar.323.mcz

Doesn't Monticello has its master repository on the wiresong site?

> 
> ==================== Summary ====================
> 
> Name: Monticello-ar.323
> Author: ar
> Time: 29 September 2009, 9:38:50 am
> UUID: 927bef84-8215-0443-afe4-c8575b3a300c
> Ancestors: Monticello-cwp.322
> 
> A small improvement to MC loading. New rules are:
> - Pass 1: Load class changes first
> - Pass 2: Compile new / changed methods
> - Pass 3: Install new / changed methods
> - Pass 4: Remove old methods
> This should provide a bit more stability to the loading process.
> 
> =============== Diff against Monticello-cwp.322 ===============
> 
> Item was added:
> + ----- Method: MCMethodDefinition>>asMethodAddition (in category 'accessing') -----
> + asMethodAddition
> + 	^MethodAddition new
> + 		compile: source
> + 		classified: category
> + 		withStamp: timeStamp
> + 		notifying: (SyntaxError new category: category)
> + 		logSource: true
> + 		inClass: self actualClass.!
> 
> Item was changed:
>   ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
>   basicLoad
>   	errorDefinitions := OrderedCollection new.
> + 	[["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 classes...'.
> + 
> + 	"Pass 2: We compile new / changed methods"
> + 	methodAdditions do:[:ea| ea createCompiledMethod] displayingProgress: 'Compiling...'.
> - 	[[
> - 	
> - 	"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."
>   
> + 	"Pass 3: Install the new / changed methods
> + 	(this is a separate pass to allow compiler changes to be loaded)"
> + 	methodAdditions do:[:ea| ea installMethod] displayingProgress: 'Installing...'.
> + 
> + 	"Pass 4: Remove the obsolete methods"
> + 	removals do:[:ea| ea unload] displayingProgress: 'Cleaning up ...'.
> + 
> + 	"Try again any delayed definitions"
> - 	additions do: [:ea | self loadClassDefinition: ea] displayingProgress: 'Loading classes...'.
> - 	
> - 	additions do: [:ea | self tryToLoad: ea] displayingProgress: 'Compiling methods...'.
> - 	removals do: [:ea | ea unload] displayingProgress: 'Cleaning up...'.
>   	self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
> + 	errorDefinitions do: [:ea | ea load] displayingProgress: 'Reloading...'.
> + 
> + 	"Finally, notify observers for the method additions"
> - 	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]!
> - 	additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)] displayingProgress: 'Initializing...']
> - 		on: InMidstOfFileinNotification 
> - 		do: [:n | n resume: true]]
> - 			ensure: [self flushChangesFile]!
> 
> 
-- 
Miguel Cobá
http://miguel.leugim.com.mx




More information about the Squeak-dev mailing list