about WriteBarrier

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

about WriteBarrier

Chris Muller-3
> I would like to take a look to this. In which primitives you need to send
> #yourself for example? This is because otherwise the VM will fail / crash
> because it expects the parameters of a primitive to be of a certain type
> rather than a proxy ?

Right, this is the problem that has been solved with the new extension.

> Which are those subclases you mention that override the primitive methods?

The ones that WriteBarrier dynamically instantiates for each class of
object added to the WB.  Please look at the WriteBarrier package (it's
a small, standalone package) and it will become crystal clear.

> Thanks and congrats for the release.

Thanks,
  Chris
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: about WriteBarrier

Mariano Martinez Peck
Thanks now I understand why you asked about compact classes. However, you only implement canUncompact  ^ false
in CompiledMethod and ContextPart, even if with Cog there are more classes that you *cannot* uncompact.

Cheers

On Sat, Dec 10, 2011 at 5:37 PM, Chris Muller <[hidden email]> wrote:
> I would like to take a look to this. In which primitives you need to send
> #yourself for example? This is because otherwise the VM will fail / crash
> because it expects the parameters of a primitive to be of a certain type
> rather than a proxy ?

Right, this is the problem that has been solved with the new extension.

> Which are those subclases you mention that override the primitive methods?

The ones that WriteBarrier dynamically instantiates for each class of
object added to the WB.  Please look at the WriteBarrier package (it's
a small, standalone package) and it will become crystal clear.

> Thanks and congrats for the release.

Thanks,
 Chris



--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: about WriteBarrier

Chris Muller-4
Hm, not sure what you're seeing..    #canUncompact is implemented only
Behavior as:

canUncompact
        ^ (Smalltalk isRunningCog or: [ Smalltalk isRunningCogit ])
                ifTrue: [ (Smalltalk compactClassesArray includes: self) not ]
                ifFalse: [ true ]

Sounds like you are looking at the wrong version of WriteBarrier.  The
correct one is WriteBarrier-cmm.35.

 - Chris



On Sat, Dec 10, 2011 at 5:38 PM, Mariano Martinez Peck
<[hidden email]> wrote:

> Thanks now I understand why you asked about compact classes. However, you
> only implement canUncompact  ^ false
> in CompiledMethod and ContextPart, even if with Cog there are more classes
> that you *cannot* uncompact.
>
> Cheers
>
> On Sat, Dec 10, 2011 at 5:37 PM, Chris Muller <[hidden email]> wrote:
>>
>> > I would like to take a look to this. In which primitives you need to
>> > send
>> > #yourself for example? This is because otherwise the VM will fail /
>> > crash
>> > because it expects the parameters of a primitive to be of a certain type
>> > rather than a proxy ?
>>
>> Right, this is the problem that has been solved with the new extension.
>>
>> > Which are those subclases you mention that override the primitive
>> > methods?
>>
>> The ones that WriteBarrier dynamically instantiates for each class of
>> object added to the WB.  Please look at the WriteBarrier package (it's
>> a small, standalone package) and it will become crystal clear.
>>
>> > Thanks and congrats for the release.
>>
>> Thanks,
>>  Chris
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: about WriteBarrier

Mariano Martinez Peck


On Sun, Dec 11, 2011 at 12:52 AM, Chris Muller <[hidden email]> wrote:
Hm, not sure what you're seeing..    #canUncompact is implemented only
Behavior as:

canUncompact
       ^ (Smalltalk isRunningCog or: [ Smalltalk isRunningCogit ])
               ifTrue: [ (Smalltalk compactClassesArray includes: self) not ]
               ifFalse: [ true ]

Sounds like you are looking at the wrong version of WriteBarrier.  The
correct one is WriteBarrier-cmm.35.

Indeed, I was looking the implementation in WriteBarrier repo, not the one inside Magma.
Anyway, that looks strange. You are saying that if you are running in Cog then you cannot uncompact any compact class?  The only ones you cannot uncompact are:
Array
LargeNegativeInteger
LargePositiveInteger
Float
MethodContext
 
Maybe this is not that important...

Cheers


 - Chris



On Sat, Dec 10, 2011 at 5:38 PM, Mariano Martinez Peck
<[hidden email]> wrote:
> Thanks now I understand why you asked about compact classes. However, you
> only implement canUncompact  ^ false
> in CompiledMethod and ContextPart, even if with Cog there are more classes
> that you *cannot* uncompact.
>
> Cheers
>
> On Sat, Dec 10, 2011 at 5:37 PM, Chris Muller <[hidden email]> wrote:
>>
>> > I would like to take a look to this. In which primitives you need to
>> > send
>> > #yourself for example? This is because otherwise the VM will fail /
>> > crash
>> > because it expects the parameters of a primitive to be of a certain type
>> > rather than a proxy ?
>>
>> Right, this is the problem that has been solved with the new extension.
>>
>> > Which are those subclases you mention that override the primitive
>> > methods?
>>
>> The ones that WriteBarrier dynamically instantiates for each class of
>> object added to the WB.  Please look at the WriteBarrier package (it's
>> a small, standalone package) and it will become crystal clear.
>>
>> > Thanks and congrats for the release.
>>
>> Thanks,
>>  Chris
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>



--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma