The Trunk: Kernel-eem.1366.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.1366.mcz

commits-2
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
   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!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Levente Uzonyi
Hi Eliot,

On Wed, 27 Jan 2021, [hidden email] 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!

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

marcel.taeumel
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.

Best,
Marcel

Am 28.01.2021 13:46:12 schrieb Levente Uzonyi <[hidden email]>:

Hi Eliot,

On Wed, 27 Jan 2021, [hidden email] 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!



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Levente Uzonyi
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 <[hidden email]>:
>
>       Hi Eliot,
>
>       On Wed, 27 Jan 2021, [hidden email] 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!
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

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


Von: Squeak-dev <[hidden email]> im Auftrag von Levente Uzonyi <[hidden email]>
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 <[hidden email]>:
>
>       Hi Eliot,
>
>       On Wed, 27 Jan 2021, [hidden email] 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!
>
>
>


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

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


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


Von: Squeak-dev <[hidden email]> im Auftrag von Levente Uzonyi <[hidden email]>
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 <[hidden email]>:
>
>       Hi Eliot,
>
>       On Wed, 27 Jan 2021, [hidden email] 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!
>
>
>


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Levente Uzonyi
In reply to this post by Christoph Thiede
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 <[hidden email]> im Auftrag von Levente Uzonyi <[hidden email]>
> 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 <[hidden email]>:
> >
> >       Hi Eliot,
> >
> >       On Wed, 27 Jan 2021, [hidden email] 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!
> >
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Levente Uzonyi
In reply to this post by Christoph Thiede
On Mon, 1 Feb 2021, Thiede, Christoph wrote:

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

Or just remove #and:{2,} and be happy with #and:.


Levente

>
>
> Best,
>
> Christoph
>
> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________
> 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
>
> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________
> Von: Squeak-dev <[hidden email]> im Auftrag von Levente Uzonyi <[hidden email]>
> 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 <[hidden email]>:
> >
> >       Hi Eliot,
> >
> >       On Wed, 27 Jan 2021, [hidden email] 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!
> >
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Levente Uzonyi
In reply to this post by Levente Uzonyi
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 <[hidden email]> im Auftrag
>> von Levente Uzonyi <[hidden email]>
>> 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
>> <[hidden email]>:
>> >
>> >       Hi Eliot,
>> >
>> >       On Wed, 27 Jan 2021, [hidden email] 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!
>> >
>> >
>> >
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

Hi Levente,


Nvm. Just saw Kernel-ct.1369.


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 <[hidden email]> im Auftrag von Levente Uzonyi <[hidden email]>
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 <[hidden email]> im Auftrag
>> von Levente Uzonyi <[hidden email]>
>> 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
>> <[hidden email]>:
>> >
>> >       Hi Eliot,
>> >
>> >       On Wed, 27 Jan 2021, [hidden email] 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!
>> >
>> >
>> >
>>
>


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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

Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

marcel.taeumel
Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

marcel.taeumel
Are you thinking about proxies (usually implemented as ProtoObject)?

To quote myself and expand the comment: Is this the only issue left that we are having with debugging/simulating ProtoObject? My impression was that even the BasicInspector struggled to deal with proxies. Well, it got better due to the mirror primitives in Context.

Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".

Best,
Marcel

Am 17.05.2021 07:54:59 schrieb Marcel Taeumel <[hidden email]>:

Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

Hi Marcel,


Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".


Of course, here are you:

Debug it:
ObjectTracer on: Morph new

In the trunk, this spawns an embarrassing number of additional debuggers while debugging the expression. With my proposed fix, not a single additional debugger is opened before you actually send a message to the morph.

Here is another example. Given any object of a class that reimplements #isArray in an erroneous way, this will break the simulator, too:

Object newSubclass
    compile: 'isArray ^self notYetImplemented';
    new "step through this"

My impression was that even the BasicInspector struggled to deal with proxies.

I think I have fixed this issue via Tools-ct.1056/ToolsTests-ct.105.


Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 08:08 Uhr
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Are you thinking about proxies (usually implemented as ProtoObject)?

To quote myself and expand the comment: Is this the only issue left that we are having with debugging/simulating ProtoObject? My impression was that even the BasicInspector struggled to deal with proxies. Well, it got better due to the mirror primitives in Context.

Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".

Best,
Marcel

Am 17.05.2021 07:54:59 schrieb Marcel Taeumel <[hidden email]>:

Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

marcel.taeumel
Given any object of a class that reimplements #isArray in an erroneous way

Given my recent slip in the FFI package, I have the feeling that #isArray has a really specific meaning for the class layout. No one should claim to also be an Array. :-D I mean, not even RawBitsArray does it. There is something going on. :-)

Best,
Marcel

Am 17.05.2021 12:00:33 schrieb Thiede, Christoph <[hidden email]>:

Hi Marcel,


Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".


Of course, here are you:

Debug it:
ObjectTracer on: Morph new

In the trunk, this spawns an embarrassing number of additional debuggers while debugging the expression. With my proposed fix, not a single additional debugger is opened before you actually send a message to the morph.

Here is another example. Given any object of a class that reimplements #isArray in an erroneous way, this will break the simulator, too:

Object newSubclass
    compile: 'isArray ^self notYetImplemented';
    new "step through this"

My impression was that even the BasicInspector struggled to deal with proxies.

I think I have fixed this issue via Tools-ct.1056/ToolsTests-ct.105.


Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 08:08 Uhr
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Are you thinking about proxies (usually implemented as ProtoObject)?

To quote myself and expand the comment: Is this the only issue left that we are having with debugging/simulating ProtoObject? My impression was that even the BasicInspector struggled to deal with proxies. Well, it got better due to the mirror primitives in Context.

Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".

Best,
Marcel

Am 17.05.2021 07:54:59 schrieb Marcel Taeumel <[hidden email]>:

Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

Well, that's another argument for my proposed fix, isn't it? :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 12:54:50
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Given any object of a class that reimplements #isArray in an erroneous way

Given my recent slip in the FFI package, I have the feeling that #isArray has a really specific meaning for the class layout. No one should claim to also be an Array. :-D I mean, not even RawBitsArray does it. There is something going on. :-)

Best,
Marcel

Am 17.05.2021 12:00:33 schrieb Thiede, Christoph <[hidden email]>:

Hi Marcel,


Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".


Of course, here are you:

Debug it:
ObjectTracer on: Morph new

In the trunk, this spawns an embarrassing number of additional debuggers while debugging the expression. With my proposed fix, not a single additional debugger is opened before you actually send a message to the morph.

Here is another example. Given any object of a class that reimplements #isArray in an erroneous way, this will break the simulator, too:

Object newSubclass
    compile: 'isArray ^self notYetImplemented';
    new "step through this"

My impression was that even the BasicInspector struggled to deal with proxies.

I think I have fixed this issue via Tools-ct.1056/ToolsTests-ct.105.


Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 08:08 Uhr
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Are you thinking about proxies (usually implemented as ProtoObject)?

To quote myself and expand the comment: Is this the only issue left that we are having with debugging/simulating ProtoObject? My impression was that even the BasicInspector struggled to deal with proxies. Well, it got better due to the mirror primitives in Context.

Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".

Best,
Marcel

Am 17.05.2021 07:54:59 schrieb Marcel Taeumel <[hidden email]>:

Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

marcel.taeumel
Well, that's another argument for my proposed fix, isn't it? :-)

Only if you would make a case for removing #isArray from the entire image. I suppose. Maybe #isArray is like a trade-off. You do not want to have to compare classes, but it might not be a good idea to implement #isArray in your domain object. Hmm...

To improve anything in this regard, I would suggest to widen our perspective on this issue. A list of the current challenges around ProtoObject (maybe in combination with object-as-method?) might be helpful to make informed decisions. This isolated discussion around "== Array" vs. "isArray" doesn't feel right.

Best,
Marcel

Am 17.05.2021 13:08:07 schrieb Thiede, Christoph <[hidden email]>:

Well, that's another argument for my proposed fix, isn't it? :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 12:54:50
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Given any object of a class that reimplements #isArray in an erroneous way

Given my recent slip in the FFI package, I have the feeling that #isArray has a really specific meaning for the class layout. No one should claim to also be an Array. :-D I mean, not even RawBitsArray does it. There is something going on. :-)

Best,
Marcel

Am 17.05.2021 12:00:33 schrieb Thiede, Christoph <[hidden email]>:

Hi Marcel,


Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".


Of course, here are you:

Debug it:
ObjectTracer on: Morph new

In the trunk, this spawns an embarrassing number of additional debuggers while debugging the expression. With my proposed fix, not a single additional debugger is opened before you actually send a message to the morph.

Here is another example. Given any object of a class that reimplements #isArray in an erroneous way, this will break the simulator, too:

Object newSubclass
    compile: 'isArray ^self notYetImplemented';
    new "step through this"

My impression was that even the BasicInspector struggled to deal with proxies.

I think I have fixed this issue via Tools-ct.1056/ToolsTests-ct.105.


Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 08:08 Uhr
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Are you thinking about proxies (usually implemented as ProtoObject)?

To quote myself and expand the comment: Is this the only issue left that we are having with debugging/simulating ProtoObject? My impression was that even the BasicInspector struggled to deal with proxies. Well, it got better due to the mirror primitives in Context.

Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".

Best,
Marcel

Am 17.05.2021 07:54:59 schrieb Marcel Taeumel <[hidden email]>:

Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1366.mcz

Christoph Thiede

Hi Marcel,


I think it is two completely different debates whether to use #isArray in the simulator, and whether to use it in general. In the simulator, the contract is pretty simple: You must not send any messages to the object under simulation because you must not make any assumptions about how the object will treat these messages. This #isArray in #isPrimFailToken: appears probably the single violation of that rule, and it makes the simulator unreliable as we have seen from multiple examples. Do you get my point? :-)


Apart from that, the cleanness of ProtoObject is another ongoing story - which I also look forward to tackling later - I hope we can move on in this direction before the next release. But I do not think that we should mix both debates. Or am I missing your point?


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 19. Mai 2021 18:19:41
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Well, that's another argument for my proposed fix, isn't it? :-)

Only if you would make a case for removing #isArray from the entire image. I suppose. Maybe #isArray is like a trade-off. You do not want to have to compare classes, but it might not be a good idea to implement #isArray in your domain object. Hmm...

To improve anything in this regard, I would suggest to widen our perspective on this issue. A list of the current challenges around ProtoObject (maybe in combination with object-as-method?) might be helpful to make informed decisions. This isolated discussion around "== Array" vs. "isArray" doesn't feel right.

Best,
Marcel

Am 17.05.2021 13:08:07 schrieb Thiede, Christoph <[hidden email]>:

Well, that's another argument for my proposed fix, isn't it? :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 12:54:50
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Given any object of a class that reimplements #isArray in an erroneous way

Given my recent slip in the FFI package, I have the feeling that #isArray has a really specific meaning for the class layout. No one should claim to also be an Array. :-D I mean, not even RawBitsArray does it. There is something going on. :-)

Best,
Marcel

Am 17.05.2021 12:00:33 schrieb Thiede, Christoph <[hidden email]>:

Hi Marcel,


Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".


Of course, here are you:

Debug it:
ObjectTracer on: Morph new

In the trunk, this spawns an embarrassing number of additional debuggers while debugging the expression. With my proposed fix, not a single additional debugger is opened before you actually send a message to the morph.

Here is another example. Given any object of a class that reimplements #isArray in an erroneous way, this will break the simulator, too:

Object newSubclass
    compile: 'isArray ^self notYetImplemented';
    new "step through this"

My impression was that even the BasicInspector struggled to deal with proxies.

I think I have fixed this issue via Tools-ct.1056/ToolsTests-ct.105.


Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Mai 2021 08:08 Uhr
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Are you thinking about proxies (usually implemented as ProtoObject)?

To quote myself and expand the comment: Is this the only issue left that we are having with debugging/simulating ProtoObject? My impression was that even the BasicInspector struggled to deal with proxies. Well, it got better due to the mirror primitives in Context.

Maybe an actual use case would help. Something bigger than "ProtoObject new isNil".

Best,
Marcel

Am 17.05.2021 07:54:59 schrieb Marcel Taeumel <[hidden email]>:

Hi Christoph.

The simulator should not stumble upon any objects that do not implement #isArray
> in a conventional way.

#isArray is implemented in Object. So, all objects can answer to that. Where do you see a problem? Are you thinking about proxies (usually implemented as ProtoObject)?

Best,
Marcel

Am 16.05.2021 19:07:34 schrieb Thiede, Christoph <[hidden email]>:

Sorry for the confusion. Kernel-ct.1369 has been moved to treated with all justification. I just uploaded Kernel-ct.1407 instead which fixes the mentioned problem.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Sonntag, 16. Mai 2021 18:40:59
An: [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1366.mcz
 
Hi all,

in my humble opinion, this is still broken as of today in the Trunk. :-) The
simulator should not stumble upon any objects that do not implement #isArray
in a conventional way. The following should be debuggable, but at the
moment, you get a DNU error from #isPrimFailToken: if you step through the
expression:

ProtoObject new isNil

Efficiency is important, but IMHO correctness is even more important. Thus I
think Kernel-ct.1369 is still relevant for the trunk. :-)

Best,
Christoph



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



Carpe Squeak!