[squeak-dev] The Trunk: ST80-nice.123.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 14 21:29:33 UTC 2011


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

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

Name: ST80-nice.123
Author: nice
Time: 14 February 2011, 10:29:16.393 pm
UUID: 82d2a9f0-b05f-46a5-8c3c-887897fefd5b
Ancestors: ST80-nice.122

Get rid of FakeClassPool adopt: because it is useless.

=============== Diff against ST80-nice.122 ===============

Item was changed:
  ----- Method: ParagraphEditor>>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.
- 		ifTrue: [FakeClassPool adopt: model selectedClass.  "Include model pool vars if any"
- 				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].
- 	FakeClassPool adopt: nil.
  	^ result!

Item was changed:
  ----- Method: ParagraphEditor>>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.
- 		ifTrue: [FakeClassPool adopt: model selectedClass.  "Include model pool vars if any"
- 				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: [FakeClassPool adopt: nil. ^ #failedDoit]
  			logged: false.
  		Time millisecondsToRun: 
  			[v := cm valueWithReceiver: rcvr arguments: #() ].
  	] 
  		on: OutOfScopeNotification 
  		do: [ :ex | ex resume: true].
- 	FakeClassPool adopt: nil.
  
  	"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.
  !




More information about the Squeak-dev mailing list