[squeak-dev] The Inbox: Kernel-ct.1362.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Nov 3 21:29:26 UTC 2020


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

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

Name: Kernel-ct.1362
Author: ct
Time: 3 November 2020, 10:29:21.488637 pm
UUID: 48a3e4c2-8aa8-414e-8d36-ccfe076c6aab
Ancestors: Kernel-eem.1361

Fixes regression in Context >> #runSimulated:contextAtEachStep: when the message is sent to something else than thisContext.

=============== Diff against Kernel-eem.1361 ===============

Item was changed:
  ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') -----
  runSimulated: aBlock contextAtEachStep: anotherBlock
  	"Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock."
  
  	| current resume ensure |
  	resume := false.
  	current := aBlock asContext.
+ 	current privSender: self.
+ 	ensure := current insertSender: (Context contextEnsure:
+ 		[resume := true.
+ 		ensure privSender: thisContext home sender]).
- 	ensure := current insertSender: (Context contextEnsure: [resume := true]).
- 	ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead."
  	
  	(anotherBlock numArgs = 0
  		ifTrue: ["optimized" [resume]]
  		ifFalse: ["stop execution on time, don't expose simulation details to caller"
  			[current == ensure or: 
  				["Context >> #resume:"
  				current size >= 2 and: 
  					[(current at: 2) == ensure]]]	])
  		whileFalse:
  			[anotherBlock cull: current.
  			current := current step].
  	
  	^ current jump!



More information about the Squeak-dev mailing list