The Trunk: Morphic-eem.748.mcz

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

The Trunk: Morphic-eem.748.mcz

commits-2
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.748.mcz

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

Name: Morphic-eem.748
Author: eem
Time: 6 October 2014, 4:37:20.596 pm
UUID: d98f5dd3-77d5-4f51-94ed-92378abe641c
Ancestors: Morphic-ul.745

Fix debugging of optimized expressions.
Depends also on Kernel-eem.878.

=============== Diff against Morphic-ul.745 ===============

Item was changed:
  ----- Method: TextEditor>>debug:receiver:in: (in category 'do-its') -----
  debug: aCompiledMethod receiver: anObject in: evalContext
 
+ | guineaPig debugger debuggerWindow context |
+ guineaPig :=
+ [aCompiledMethod
- | guineaPig debugger context |
- guineaPig := [
- aCompiledMethod
  valueWithReceiver: anObject
+ arguments: (evalContext ifNil: [ #() ] ifNotNil: [ { evalContext } ]).
+ guineaPig := nil "spot the return from aCompiledMethod"] newProcess.
- arguments: (evalContext ifNil: [ #() ] ifNotNil: [ { evalContext } ]) ] newProcess.
  context := guineaPig suspendedContext.
  debugger := Debugger new
  process: guineaPig
  controller: nil
  context: context.
+ debuggerWindow := debugger openFullNoSuspendLabel: 'Debug it'.
+ "Now step into the expression.  But if it is quick (is implemented as a primtiive, e.g. `0')
+ it will return immediately back to the block that is sent newProcess above.  Guard
+ against that with the check for home being thisContext."
+ [debugger interruptedContext method == aCompiledMethod]
+ whileFalse:
+ [(guineaPig isNil
+  and: [debugger interruptedContext home == thisContext]) ifTrue:
+ [debuggerWindow delete.
+ UIManager default inform: 'Nothing to debug; expression is optimized'.
+ ^self].
+ debugger send]!
- debugger openFullNoSuspendLabel: 'Debug it'.
- [ debugger interruptedContext method == aCompiledMethod ]
- whileFalse: [ debugger send ]!