[squeak-dev] The Trunk: Kernel-eem.1366.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Feb 1 21:28:31 UTC 2021


Hi Levente,


> Nvm. Just saw Kernel-ct.1369.


<http://www.hpi.de/>
No, now I would mind indeed :-)

You're totally right, the following should be debuggable:

Object newSubclass
compile: 'isArray self error: #hacked';
new "through"

I'm sorry for the hasty judgment! Maybe it is the best idea to revert to "(self objectClass: anObject) == Array"?

Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Levente Uzonyi <leves at caesar.elte.hu>
Gesendet: Montag, 1. Februar 2021 19:21:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz

Nvm. Just saw Kernel-ct.1369.


Levente

On Mon, 1 Feb 2021, Levente Uzonyi wrote:

> Hi Chritoph,
>
> On Mon, 1 Feb 2021, Thiede, Christoph wrote:
>
>>
>> Hi all,
>>
>>
>> Eliot, thank you for the speed-up! I have uploaded Kernel-ct.1369 to the
>> inbox to fix the regression in the simulator.
>>
>>
>> @Levente I don't see the need for mirror primitives here; the
>> PrimitiveFailToken is a concept internal to the simulator and iiuc mirror
>> primitives should only be used when dealing with objects from the
>> *simulated* code. Am I
>> wrong? :-)
>
> Was the bug I tried to point out not obvious? #isArray is sent to a class
> which will never respond with true.
>
>
> Levente
>
>>
>>
>> Best,
>>
>> Christoph
>>
>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________
>> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag
>> von Levente Uzonyi <leves at caesar.elte.hu>
>> Gesendet: Donnerstag, 28. Januar 2021 15:56:07
>> An: The general-purpose Squeak developers list
>> Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
>> Hi Marcel,
>>
>> On Thu, 28 Jan 2021, Marcel Taeumel wrote:
>>
>> > Hi Levente.
>> > > I also wonder why you used #objectClass: there instead of #class in the
>> > previous version. Perhaps there was a good reason.
>> > Maybe because of ProtoObject (and proxies)? I think the long-term plan
>> was to not treat #class as a special send anymore so that proxies can
>> override that interface.
>>
>> In that case there are two problems with the rewrite.
>>
>> Btw, Eliot didn't mention it in the other thread, but #class is currently
>> a way to avoid suspension points, just like #==, #ifNil:ifNotNil:,
>> #caseOf:otherwise:, ifTrue:ifFalse:, etc.
>>
>>
>> Levente
>>
>> >
>> > Best,
>> > Marcel
>> >
>> >       Am 28.01.2021 13:46:12 schrieb Levente Uzonyi
>> <leves at caesar.elte.hu>:
>> >
>> >       Hi Eliot,
>> >
>> >       On Wed, 27 Jan 2021, commits at source.squeak.org wrote:
>> >
>> >       > Eliot Miranda uploaded a new version of Kernel to project The
>> Trunk:
>> >       > http://source.squeak.org/trunk/Kernel-eem.1366.mcz
>> >       >
>> >       > ==================== Summary ====================
>> >       >
>> >       > Name: Kernel-eem.1366
>> >       > Author: eem
>> >       > Time: 26 January 2021, 4:27:57.204259 pm
>> >       > UUID: 3a706d32-c2d6-416f-82c1-bbf735650385
>> >       > Ancestors: Kernel-eem.1365
>> >       >
>> >       > Slightly faster implementation of Context>>#isPrimFailToken:.
>> >       > Improve the comments in
>> Context>>#isHandlerContext/#isUnwindContext.
>> >       > Nuke an obsolete method.
>> >       >
>> >       > =============== Diff against Kernel-eem.1365 ===============
>> >       >
>> >       > Item was changed:
>> >       > ----- Method: Context>>isHandlerContext (in category
>> 'private-exceptions') -----
>> >       > isHandlerContext
>> >       > + "Answer if the receiver is for a method that is marked as an
>> exception handler.
>> >       > + BlockClosure>>#on:do: uses this primitive to identify itself to
>> the VM
>> >       > + as an exception handler method, which the VM uses in primitive
>> 197
>> >       > + Context>>#findNextHandlerContextStarting,
>> primitiveFindHandlerContext,
>> >       > + to accelerate the search for exception handlers."
>> >       > - "is this context for method that is marked?"
>> >       > ^method primitive = 199!
>> >       >
>> >       > Item was changed:
>> >       > ----- Method: Context>>isPrimFailToken: (in category 'private')
>> -----
>> >       > isPrimFailToken: anObject
>> >       > + ^(self objectClass: anObject) isArray
>> >       > - ^(self objectClass: anObject) == Array
>> >
>> >       I think you meant to write
>> >
>> >       ^(anObject isArray
>> >
>> >       I also wonder why you used #objectClass: there instead of #class in
>> the
>> >       previous version. Perhaps there was a good reason.
>> >
>> >
>> >       Levente
>> >
>> >       > and: [anObject size = 2
>> >       > + and: [(anObject at: 1) == PrimitiveFailToken]]!
>> >       > - and: [anObject first == PrimitiveFailToken]]!
>> >       >
>> >       > Item was changed:
>> >       > ----- Method: Context>>isUnwindContext (in category
>> 'private-exceptions') -----
>> >       > isUnwindContext
>> >       > + "Answer if the receiver is for a method that is marked as a
>> non-local return/exception unwind protect.
>> >       > + BlockClosure>>#ensure: and BlockClosure>>#ifCurtailed: use this
>> primitive to identify
>> >       > + themseves to the VM as unwind protect methods. The VM uses this
>> in primitive 195
>> >       > + Context>>#findNextUnwindContextUpTo:,
>> primitiveFindNextUnwindContext, to
>> >       > + accelerate the search for unwind protects."
>> >       > - "is this context for method that is marked?"
>> >       > ^method primitive = 198!
>> >       >
>> >       > Item was removed:
>> >       > - ----- Method: Context>>tryPrimitiveFor:receiver:args: (in
>> category 'private') -----
>> >       > - tryPrimitiveFor: method receiver: receiver args: arguments
>> >       > - "If this method has a primitive index, then run the primitive
>> and return its result.
>> >       > - Otherwise (and also if the primitive fails) return
>> PrimitiveFailToken,
>> >       > - as an indication that the method should be activated and run as
>> bytecodes."
>> >       > - | primIndex |
>> >       > - (primIndex := method primitive) = 0 ifTrue:
>> [^{PrimitiveFailToken. nil}].
>> >       > - ^ self doPrimitive: primIndex method: method receiver: receiver
>> args: arguments!
>> >
>> >
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210201/10598625/attachment-0001.html>


More information about the Squeak-dev mailing list