The Trunk: ST80-dtl.90.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ST80-dtl.90.mcz

commits-2
David T. Lewis uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-dtl.90.mcz

==================== 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') -----
  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: [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), '...'].
  PopUpMenu
  inform: 'Time to compile and execute: ', result printString, 'ms res: ', valueAsString.
  !