[squeak-dev] The Inbox: Kernel.spur-kfr.925.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 28 14:12:34 UTC 2015


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel.spur-kfr.925.mcz

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

Name: Kernel.spur-kfr.925
Author: kfr
Time: 28 May 2015, 4:03:42.244 pm
UUID: 676ddbca-830f-5147-b17a-b72e499aa3eb
Ancestors: Kernel.spur-eem.913, Kernel.spur-topa.920, Kernel.spur-ul.906, Kernel.spur-eem.886, Kernel.spur-mt.924

Cancelling saving a project need something like this to not get stuck with countless pre debug windows

=============== Diff against Kernel.spur-eem.913 ===============

Item was changed:
  ----- Method: ContextPart>>runUntilErrorOrReturnFrom: (in category 'controlling') -----
  runUntilErrorOrReturnFrom: aSender 
  	"ASSUMES aSender is a sender of self.  Execute self's stack until aSender returns or an unhandled exception is raised.  Return a pair containing the new top context and a possibly nil exception.  The exception is not nil if it was raised before aSender returned and it was not handled.  The exception is returned rather than openning the debugger, giving the caller the choice of how to handle it."
  	"Self is run by jumping directly to it (the active process abandons thisContext and executes self).  However, before jumping to self we insert an ensure block under aSender that jumps back to thisContext when evaluated.  We also insert an exception handler under aSender that jumps back to thisContext when an unhandled exception is raised.  In either case, the inserted ensure and exception handler are removed once control jumps back to thisContext."
  
  	| error ctxt here topContext |
  	here := thisContext.
  
  	"Insert ensure and exception handler contexts under aSender"
  	error := nil.
  	ctxt := aSender insertSender: (ContextPart
  		contextOn: UnhandledError do: [:ex |
  			error ifNil: [
  				error := ex exception.
  				topContext := thisContext.
  				ex resumeUnchecked: here jump]
  			ifNotNil: [ex pass]
  		]).
  	ctxt := ctxt insertSender: (ContextPart
  		contextEnsure: [error ifNil: [
  				topContext := thisContext.
  				here jump]
  		]).
  	self jump.  "Control jumps to self"
  
  	"Control resumes here once above ensure block or exception handler is executed"
  	^ error ifNil: [
  		"No error was raised, remove ensure context by stepping until popped"
+ 		[ctxt isDead] whileFalse: [topContext ifNotNil:[ topContext := topContext stepToCallee]].
- 		[ctxt isDead] whileFalse: [topContext := topContext stepToCallee].
  		{topContext. nil}
  
  	] ifNotNil: [
  		"Error was raised, remove inserted above contexts then return signaler context"
  		aSender terminateTo: ctxt sender.  "remove above ensure and handler contexts"
  		{topContext. error}
  	].
  !

Item was changed:
+ ----- Method: InstructionClient>>callPrimitive: (in category 'instruction decoding') -----
- ----- Method: InstructionClient>>callPrimitive: (in category '*Scorch') -----
  callPrimitive: pimIndex
  	"V3PlusClosures:	139 10001011	iiiiiiii   jjjjjjjj  Call Primitive #iiiiiiii + (jjjjjjjj * 256)
  	 NewsqueakV4:		249 11111001	iiiiiiii   jjjjjjjj  Call Primitive #iiiiiiii + (jjjjjjjj * 256)
  	 SistaV1:			248 11111000 iiiiiiii mjjjjjjj  Call Primitive #iiiiiiii + ( jjjjjjj * 256)
  							m=1 means inlined primitive, no hard return after execution."!



More information about the Squeak-dev mailing list