[squeak-dev] The Trunk: Monticello-nice.570.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 18 20:46:37 UTC 2013


Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-nice.570.mcz

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

Name: Monticello-nice.570
Author: nice
Time: 18 September 2013, 10:46:03.556 pm
UUID: bed0b057-bb92-402b-8511-afbe3707c1a7
Ancestors: Monticello-nice.569

Now that the SyntaxError restarts the existing Compiler process rather than substitute to it, it is possible to edit method with incorrect syntax in the SyntaxError and continue MC Loading/Merging.

Though, we should log the corrected code, not the syntaxically incorrect one, and for that we let MethodAddition intercept the SyntaxErrorNotification so as to retrieve its corrected newSource.

=============== Diff against Monticello-nice.569 ===============

Item was changed:
  ----- Method: MethodAddition>>createCompiledMethod (in category 'as yet unclassified') -----
  createCompiledMethod
+ 	| notification |
+ 	[methodAndNode := myClass compile: text asString classified: category notifying: requestor
+ 							trailer: myClass defaultMethodTrailer ifFail: [^nil]]
+ 			on: SyntaxErrorNotification do: [:exc |
+ 				notification := exc.
+ 				exc pass].
+ 	notification ifNotNil: [notification newSource ifNotNil: [:newSource | text := newSource]].
- 	methodAndNode := myClass compile: text asString classified: category notifying: requestor
- 							trailer: myClass defaultMethodTrailer ifFail: [^nil].
  	selector := methodAndNode selector.
  	compiledMethod := methodAndNode method.
  	self writeSourceToLog.
  	priorMethodOrNil := myClass compiledMethodAt: selector ifAbsent: [nil].
  !



More information about the Squeak-dev mailing list