[squeak-dev] The Inbox: Kernel-ct.1358.mcz
Eliot Miranda
eliot.miranda at gmail.com
Thu Oct 29 15:56:34 UTC 2020
Hi Christoph,
On Wed, Oct 28, 2020 at 3:37 PM <commits at source.squeak.org> wrote:
> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-ct.1358.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-ct.1358
> Author: ct
> Time: 28 October 2020, 11:37:24.817544 pm
> UUID: c9af6acb-61cf-af42-b5fa-3afa8451bb24
> Ancestors: Kernel-mt.1353
>
> Fixes a simulation bug that occurs when executing ProtoObject >>
> #doesNotUnderstand:. See KernelTests-ct.388.
>
> =============== Diff against Kernel-mt.1353 ===============
>
> 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:
> + [selector == #doesNotUnderstand: ifTrue:
> + [self error: ('Simulated message {1} not
> understood' translated format: {selector})].
> + ^self send: #doesNotUnderstand:
> - [^self send: #doesNotUnderstand:
> to: rcvr
> with: {(Message selector: selector
> arguments: arguments) lookupClass: lookupClass}
> 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!
>
I think the error should be
self error: ('Recursive message not-understood {1}' translated format:
{selector})
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201029/17776ac0/attachment-0001.html>
More information about the Squeak-dev
mailing list
|