[squeak-dev] Debugger / Simulator cannot simulate (some) objects as methods

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Oct 24 18:53:45 UTC 2020


Hi Marcel,


which bugs are there that are not fixed with Kernel-ct.1339? :-)


Best,

Christoph

<http://www.hpi.de/>
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 21. Oktober 2020 15:40:50
An: squeak-dev
Betreff: Re: [squeak-dev] Debugger / Simulator cannot simulate (some) objects as methods

Hi Christan,

the object-as-method support in the debuuger and code simulator has never been good. :-( Not back in Squeak 3.x, not now. Maybe we can fix some of the most urgent bugs. :-)

Best,
Marcel

Am 21.10.2020 15:09:35 schrieb cmfcmf <cmfcmf.flach at gmail.com>:

Hi,

when using simple objects as methods, the simulator (and therefore the
debugger also) raises an error if the object used as method does not
implement certain methods from CompiledMethod (e.g., numArgs). If such code
is debugged, the debugger opens a never-ending stream of error windows.

I am under the (possibly wrong) assumption that objects as methods should
_not_ need to implement the complete CompiledMethod protocol to be
compatible with simulation and debugging.

I have attached a failing test called Context2Test that uses the simulator
to simulate a call of an object as method. You can also see the
"never-ending stream of error windows" by placing a "self halt" at the top
of the test and then stepping through the first assertion using the "over"
button. WARNING: Might make your image unusable.

The root cause is the Context >> #send:to:with:lookupIn: method which
assumes that all methods are CompiledMethods. I have attached a simple fix
that works great for me – let me know what you think about it.

Best
Christian

Context2Test.st
Context-sendtowithlookupIn.st




--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201024/cbab1bd6/attachment.html>


More information about the Squeak-dev mailing list