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

commits at source.squeak.org commits at source.squeak.org
Mon Feb 17 15:48:46 UTC 2020


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

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

Name: Kernel-ct.1298
Author: ct
Time: 17 February 2020, 4:48:43.681432 pm
UUID: d57152c7-359a-054c-9dd7-c6353a6f700f
Ancestors: Kernel-tonyg.1293

Fixes a simulation bug regarding #doesNotUnderstand:. Don't forget to indicate the correct lookup class.

Steps to reproduce this bug:
1. Debug "42 foo"
2. Step over
The debugger label was: 'MessageNotUnderstood: nil>>foo'.

=============== Diff against Kernel-tonyg.1293 ===============

Item was changed:
  ----- Method: Context>>send:to:with:lookupIn: (in category 'controlling') -----
  send: selector to: rcvr with: arguments lookupIn: lookupClass
  	"Simulate the action of sending a message with selector and arguments
  	 to rcvr. The argument, lookupClass, is the class in which to lookup the
  	 message.  This is the receiver's class for normal messages, but for super
  	 messages it will be some specific class related to the source method."
  
  	| meth primIndex val ctxt |
  	(meth := lookupClass lookupSelector: selector) ifNil:
  		[^self send: #doesNotUnderstand:
  				to: rcvr
+ 				with: {(Message selector: selector arguments: arguments) lookupClass: lookupClass}
- 				with: {Message selector: selector arguments: arguments}
  				lookupIn: lookupClass].
  	meth numArgs ~= arguments size ifTrue:
  		[^self error: 'Wrong number of arguments in simulated message ', selector printString].
  	(primIndex := meth primitive) > 0 ifTrue:
  		[val := self doPrimitive: primIndex method: meth receiver: rcvr args: arguments.
  		 (self isPrimFailToken: val) ifFalse:
  			[^val]].
  	(selector == #doesNotUnderstand: and: [lookupClass == ProtoObject]) ifTrue:
  		[^self error: 'Simulated message ', arguments first selector, ' not understood'].
  	ctxt := Context sender: self receiver: rcvr method: meth arguments: arguments.
  	primIndex > 0 ifTrue:
  		[ctxt failPrimitiveWith: val].
  	^ctxt!



More information about the Squeak-dev mailing list