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!
Hi Eliot,
On Wed, 27 Jan 2021, commits@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!
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 leves@caesar.elte.hu: Hi Eliot,
On Wed, 27 Jan 2021, commits@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!
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@caesar.elte.hu>: Hi Eliot, On Wed, 27 Jan 2021, commits@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!
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@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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@caesar.elte.hu>: Hi Eliot, On Wed, 27 Jan 2021, commits@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!
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@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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@caesar.elte.hu>: Hi Eliot, On Wed, 27 Jan 2021, commits@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!
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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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@caesar.elte.hu:
Hi Eliot,
On Wed, 27 Jan 2021, commits@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!
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@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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@caesar.elte.hu:
Hi Eliot,
On Wed, 27 Jan 2021, commits@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!
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@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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
Hi Eliot,
On Wed, 27 Jan 2021, commits@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!
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@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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@lists.squeakfoundation.org im Auftrag von Levente Uzonyi leves@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
Hi Eliot, On Wed, 27 Jan 2021, commits@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!
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
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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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
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 christoph.thiede@student.hpi.uni-potsdam.de: 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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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 [http://forum.world.st/Squeak-Dev-f45488.html]
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 marcel.taeumel@hpi.de: 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 christoph.thiede@student.hpi.uni-potsdam.de: 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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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 [http://forum.world.st/Squeak-Dev-f45488.html]
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 squeak-dev-bounces@lists.squeakfoundation.org 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 marcel.taeumel@hpi.de:
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 christoph.thiede@student.hpi.uni-potsdam.de:
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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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
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 christoph.thiede@student.hpi.uni-potsdam.de: 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 squeak-dev-bounces@lists.squeakfoundation.org 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 marcel.taeumel@hpi.de: 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 christoph.thiede@student.hpi.uni-potsdam.de: 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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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 [http://forum.world.st/Squeak-Dev-f45488.html]
Well, that's another argument for my proposed fix, isn't it? :-)
Best,
Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org 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 christoph.thiede@student.hpi.uni-potsdam.de:
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 squeak-dev-bounces@lists.squeakfoundation.org 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 marcel.taeumel@hpi.de:
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 christoph.thiede@student.hpi.uni-potsdam.de:
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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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
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 christoph.thiede@student.hpi.uni-potsdam.de: Well, that's another argument for my proposed fix, isn't it? :-)
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org 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 christoph.thiede@student.hpi.uni-potsdam.de: 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 squeak-dev-bounces@lists.squeakfoundation.org 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 marcel.taeumel@hpi.de: 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 christoph.thiede@student.hpi.uni-potsdam.de: 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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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 [http://forum.world.st/Squeak-Dev-f45488.html]
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 squeak-dev-bounces@lists.squeakfoundation.org 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 christoph.thiede@student.hpi.uni-potsdam.de:
Well, that's another argument for my proposed fix, isn't it? :-)
Best,
Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org 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 christoph.thiede@student.hpi.uni-potsdam.de:
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 squeak-dev-bounces@lists.squeakfoundation.org 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 marcel.taeumel@hpi.de:
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 christoph.thiede@student.hpi.uni-potsdam.de:
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 squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev@lists.squeakfoundation.org 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
Hi all,
I would like to kindly push this debate again as it is kind of blocking my current efforts to port SimulationStudio to 5.3.
Recap: In Context >> #primFailToken:, we send a message (#isArray) to the object in question. It is a bit faster but breaks the simulation with objects that implement #isArray in a special way:
ObjectTracer on: Morph new ProtoObject new isNil
This violates the contract that objects from the simulated code should only be accessed via mirror primitives. To my knowledge, this is the only violation of this rule, and because I think that correctness is more important than speed (and I have not experienced any noticable slowdowns with my patch), I request to merge Kernel-ct.1407 which uses a safe mirror primitive instead of #isArray.
Your reaction would be very appreciated.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2021-05-28T23:21:57+00:00, christoph.thiede@student.hpi.uni-potsdam.de wrote:
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 <squeak-dev-bounces at lists.squeakfoundation.org> 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 <christoph.thiede at student.hpi.uni-potsdam.de>:
Well, that's another argument for my proposed fix, isn't it? :-)
Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> 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 <christoph.thiede at student.hpi.uni-potsdam.de>:
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 <squeak-dev-bounces at lists.squeakfoundation.org> 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 <marcel.taeumel at hpi.de>:
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 <christoph.thiede at student.hpi.uni-potsdam.de>:
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 <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev at lists.squeakfoundation.org 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
Hi Christoph,
On Nov 1, 2021, at 6:27 AM, Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi all,
I would like to kindly push this debate again as it is kind of blocking my current efforts to port SimulationStudio to 5.3.
Recap: In Context >> #primFailToken:, we send a message (#isArray) to the object in question. It is a bit faster but breaks the simulation with objects that implement #isArray in a special way:
ObjectTracer on: Morph new ProtoObject new isNil
This violates the contract that objects from the simulated code should only be accessed via mirror primitives. To my knowledge, this is the only violation of this rule, and because I think that correctness is more important than speed (and I have not experienced any noticable slowdowns with my patch), I request to merge Kernel-ct.1407 which uses a safe mirror primitive instead of #isArray.
I agree. I apologize for having broken this. If you submit a fix to inbox I promise to review it and move it to trunk promptly.
Your reaction would be very appreciated.
Best, Christoph
Sent from Squeak Inbox Talk
On 2021-05-28T23:21:57+00:00, christoph.thiede@student.hpi.uni-potsdam.de wrote:
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 <squeak-dev-bounces at lists.squeakfoundation.org> 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 <christoph.thiede at student.hpi.uni-potsdam.de>:
Well, that's another argument for my proposed fix, isn't it? :-)
Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> 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 <christoph.thiede at student.hpi.uni-potsdam.de>:
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 <squeak-dev-bounces at lists.squeakfoundation.org> 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 <marcel.taeumel at hpi.de>:
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 <christoph.thiede at student.hpi.uni-potsdam.de>:
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 <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev at lists.squeakfoundation.org 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
Hi Eliot,
I agree. I apologize for having broken this. If you submit a fix to inbox I promise to review it and move it to trunk promptly.
Thank you. Please see Kernel-ct.1407. :-)
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2021-11-01T21:33:08-07:00, eliot.miranda@gmail.com wrote:
Hi Christoph,
On Nov 1, 2021, at 6:27 AM, Christoph.Thiede at student.hpi.uni-potsdam.de wrote:
Hi all,
I would like to kindly push this debate again as it is kind of blocking my current efforts to port SimulationStudio to 5.3.
Recap: In Context >> #primFailToken:, we send a message (#isArray) to the object in question. It is a bit faster but breaks the simulation with objects that implement #isArray in a special way:
ObjectTracer on: Morph new ProtoObject new isNil
This violates the contract that objects from the simulated code should only be accessed via mirror primitives. To my knowledge, this is the only violation of this rule, and because I think that correctness is more important than speed (and I have not experienced any noticable slowdowns with my patch), I request to merge Kernel-ct.1407 which uses a safe mirror primitive instead of #isArray.
I agree. I apologize for having broken this. If you submit a fix to inbox I promise to review it and move it to trunk promptly.
Your reaction would be very appreciated.
Best, Christoph
Sent from Squeak Inbox Talk
On 2021-05-28T23:21:57+00:00, christoph.thiede at student.hpi.uni-potsdam.de wrote:
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 <squeak-dev-bounces at lists.squeakfoundation.org> 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 <christoph.thiede at student.hpi.uni-potsdam.de>:
Well, that's another argument for my proposed fix, isn't it? :-)
Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> 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 <christoph.thiede at student.hpi.uni-potsdam.de>:
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 <squeak-dev-bounces at lists.squeakfoundation.org> 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 <marcel.taeumel at hpi.de>:
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 <christoph.thiede at student.hpi.uni-potsdam.de>:
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 <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Thiede, Christoph Gesendet: Sonntag, 16. Mai 2021 18:40:59 An: squeak-dev at lists.squeakfoundation.org 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
squeak-dev@lists.squeakfoundation.org