[squeak-dev] The Trunk: ST80Tools-eem.3.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 6 23:45:33 UTC 2014


Eliot Miranda uploaded a new version of ST80Tools to project The Trunk:
http://source.squeak.org/trunk/ST80Tools-eem.3.mcz

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

Name: ST80Tools-eem.3
Author: eem
Time: 6 October 2014, 4:45:25.26 pm
UUID: 025a1ce4-d05a-4afb-b5c8-fc0df26ef4e0
Ancestors: ST80Tools-fbs.1

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

=============== Diff against ST80Tools-fbs.1 ===============

Item was changed:
  ----- Method: ParagraphEditor>>debug:receiver:in: (in category '*ST80Tools') -----
  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: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess]) ifTrue:
+ 						[ScheduledControllers activeController])
- 		controller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])
- 				ifTrue: [ScheduledControllers activeController]
- 				ifFalse: [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 openFullNoSuspendLabel: 'Debug it'.
  	[debugger interruptedContext method == aCompiledMethod]
+ 		whileFalse:
+ 			[(guineaPig isNil
+ 			  and: [debugger interruptedContext home == thisContext]) ifTrue:
+ 				[debuggerWindow controller closeAndUnschedule.
+ 				 UIManager default inform: 'Nothing to debug; expression is optimized'.
+ 				 ^self].
+ 			debugger send]!
- 		whileFalse: [debugger send]!



More information about the Squeak-dev mailing list