[Pkg] Monticello Public: Monticello.impl-mtf.527.mcz

squeaksource-noreply at iam.unibe.ch squeaksource-noreply at iam.unibe.ch
Wed Jun 11 02:53:45 UTC 2008


A new version of Monticello.impl was added to project Monticello Public:
http://www.squeaksource.com/mc/Monticello.impl-mtf.527.mcz

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

Name: Monticello.impl-mtf.527
Author: mtf
Time: 10 June 2008, 7:51:39 pm
UUID: 8c25f152-532e-4fe2-9724-bf22cc8fe7ae
Ancestors: Monticello.impl-mtf.526

Hopefully fixed MC so that the syntax error dialog boxes work correctly during load

=============== Diff against Monticello.impl-mtf.526 ===============

Item was changed:
  ----- Method: MCMethodDefinition>>postloadOver: (in category 'installing') -----
  postloadOver: obs
  
  	compiledMethod ifNil: [ 	
+ 	  self ensuredCreateCompiledMethod.
- 	  self createCompiledMethod.
  	  self installMethod
  	].
  
  	defnToInstall ifNotNil: [ defnToInstall notifyObservers ].!

Item was changed:
  ----- Method: MCClassDefinition>>postinstall (in category 'installing') -----
  postinstall
   		
  	(self createUnionClassWith: nil) 
  	
  		ifNotNilDo: [ :newClass |
  	 		
  			self hasTraitComposition ifTrue: [
  					newClass setTraitComposition: (Compiler
  					evaluate: self traitComposition) asTraitComposition ].
  			self hasClassTraitComposition ifTrue: [
  				newClass class setTraitComposition: (Compiler
  				evaluate: self classTraitComposition) asTraitComposition ].
  			
  			self hasComment
  				ifTrue: [newClass classComment: comment stamp: commentStamp]
  				ifFalse: [newClass classComment: ''].
  		
  		].
  	
  	self extensions do: [ :ext | 
+ 		ext ensuredCreateCompiledMethod.
+ 		ext installMethod  ]!
- 		ext createCompiledMethod.
- 	ext installMethod  ]!

Item was added:
+ ----- Method: MCMethodDefinition>>ensuredCreateCompiledMethod (in category 'compiling') -----
+ ensuredCreateCompiledMethod
+ 	"Create the compiled method from my source, or from user-provided source in the event of a syntax error"
+ 
+ 	[ self createCompiledMethod ] on: SyntaxErrorNotification do: [ :ex |
+ 		"Let the user install the fixed code into the system"
+ 		ex defaultAction.
+ 		"Now fetch and use that code instead"
+ 		methodAndNode := theClass
+ 			compile: (theClass sourceCodeAt: self selector ifAbsent: [^ nil])
+ 			classified: self category 
+ 			notifying: requestor
+ 			trailer: theClass defaultMethodTrailer
+ 			ifFail: [^nil].
+ 		compiledSelector := methodAndNode selector.
+ 		compiledMethod := methodAndNode method.]!



More information about the Packages mailing list