[squeak-dev] The Trunk: ST80-dtl.90.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 1 02:10:40 UTC 2010

David T. Lewis uploaded a new version of ST80 to project The Trunk:

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

Name: ST80-dtl.90
Author: dtl
Time: 31 January 2010, 9:05:16.275 pm
UUID: 8a2dc302-830b-4a7e-b319-3c40519bd779
Ancestors: ST80-dtl.89, ST80-ul.89

Merge ST80-dtl.89 and ST80-ul.89

=============== Diff against ST80-dtl.89 ===============

Item was changed:
  ----- Method: ParagraphEditor>>tallySelection (in category 'do-its') -----
  	"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: [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: #() ].
- 			[v := cm valueWithReceiver: rcvr arguments: (Array with: ctxt)].
  		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), '...'].
  		inform: 'Time to compile and execute: ', result printString, 'ms res: ', valueAsString.

More information about the Squeak-dev mailing list