[squeak-dev] The Trunk: Morphic-nice.520.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 14 21:38:50 UTC 2011


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

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

Name: Morphic-nice.520
Author: nice
Time: 14 February 2011, 10:37:40.949 pm
UUID: aee48751-a0a8-4c30-851c-2d4dfb6cf5f2
Ancestors: Morphic-nice.519

Get rid of FakeClassPool adopt: again because I'm a fool.

=============== Diff against Morphic-nice.519 ===============

Item was changed:
  ----- Method: SmalltalkEditor>>tallySelection (in category 'do-its') -----
  tallySelection
  	"Treat the current selection as an expression; evaluate it and return the time took for this evaluation"
  	| result rcvr ctxt valueAsString v |
  	self lineSelectAndEmptyCheck: [^ -1].
  
  	(model respondsTo: #doItReceiver) 
  		ifTrue: [ rcvr := model doItReceiver.
  				ctxt := model doItContext]
  		ifFalse: [rcvr := ctxt := nil].
  	result := [ | cm |
  		cm := rcvr class evaluatorClass new 
  			compiledMethodFor: self selectionAsStream
  			in: ctxt
  			to: rcvr
  			notifying: self
+ 			ifFail: [^ #failedDoit]
- 			ifFail: [FakeClassPool adopt: nil. ^ #failedDoit]
  			logged: false.
  		Time millisecondsToRun: 
  			[v := cm valueWithReceiver: rcvr arguments: #() ].
  	] 
  		on: OutOfScopeNotification 
  		do: [ :ex | ex resume: true].
  
  	"We do not want to have large result displayed"
  	valueAsString := v printString.
  	(valueAsString size > 30) ifTrue: [valueAsString := (valueAsString copyFrom: 1 to: 30), '...'].
  	PopUpMenu 
  		inform: 'Time to compile and execute: ', result printString, 'ms res: ', valueAsString.
  !

Item was changed:
  ----- Method: TextEditor>>evaluateSelection (in category 'do-its') -----
  evaluateSelection
  	"Treat the current selection as an expression; evaluate it and return the result"
  	| result rcvr ctxt |
  	self lineSelectAndEmptyCheck: [^ ''].
  
  	(model respondsTo: #doItReceiver) 
  		ifTrue: [ rcvr := model doItReceiver.
  				ctxt := model doItContext]
  		ifFalse: [rcvr := ctxt := nil].
  	result := [
  		rcvr class evaluatorClass new 
  			evaluate: self selectionAsStream
  			in: ctxt
  			to: rcvr
  			notifying: self
+ 			ifFail: [^ #failedDoit]
- 			ifFail: [FakeClassPool adopt: nil. ^ #failedDoit]
  			logged: true.
  	] 
  		on: OutOfScopeNotification 
  		do: [ :ex | ex resume: true].
  	^ result!




More information about the Squeak-dev mailing list