Nicer haltOnce

Hi,

Yesterday we improved #haltOnce to be more like a “once” BreakPoint:

	-> state per *each* haltOnce send
		(this means you can put two in one method and they are independent)
	-> when putting a haltOnce, it is enabled by default
	-> The global menu entry just resets all haltOnce to be active again.

Interesting is how trivial this was to implement… in class Halt 
once
    | node |
    node := thisContext sender sender sourceNodeExecuted.
    (node hasProperty: #haltOnce) ifTrue: [^self]. 
    node propertyAt: #haltOnce put: true.
    ^ self signal.


This means, we get the AST node of the “haltOnce” message send. Then we put an annotation there.
To reset all (enable all), the global many just does:

	#haltOnce senders do: #recompile.

Done.

This will be in 60082.

	Marcus

Leave a comment