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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Feb 1 14:48:00 UTC 2021


Btw - independently of this change - it's a shame that we still need to nest #and: blocks just because #and: is inlined but #(and:){2,} are not. We should change this someday ... or just wait for Sista to arrive. :-)


Best,

Christoph

<http://www.hpi.de/>
________________________________
Von: Thiede, Christoph
Gesendet: Montag, 1. Februar 2021 15:45:46
An: The general-purpose Squeak developers list
Betreff: AW: [squeak-dev] The Trunk: Kernel-eem.1366.mcz


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? :-)


Best,

Christoph

<http://www.hpi.de/>
________________________________
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/02c25574/attachment.html>


More information about the Squeak-dev mailing list