class message

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

class message

mmimica
Hello!

What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?


--
Milan Mimica
http://sparklet.sf.net
Reply | Threaded
Open this post in threaded view
|

Re: class message

Mariano Martinez Peck


On Sat, May 26, 2012 at 8:31 PM, Milan Mimica <[hidden email]> wrote:
Hello!

What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?

no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
 


--
Milan Mimica
http://sparklet.sf.net



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

Reply | Threaded
Open this post in threaded view
|

Re: class message

mmimica
On 26 May 2012 20:32, Mariano Martinez Peck <[hidden email]> wrote:


On Sat, May 26, 2012 at 8:31 PM, Milan Mimica <[hidden email]> wrote:
Hello!

What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?

no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.

That is much better. Thanks! I like progress even if it breaks old code.


--
Milan Mimica
http://sparklet.sf.net
Reply | Threaded
Open this post in threaded view
|

Re: class message

Stéphane Ducasse
>
> What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?
>
> no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
>
> That is much better. Thanks! I like progress even if it breaks old code.

:)
But we always try to minimize else we would go much faster and btw class should not break older code :)
>
>
> --
> Milan Mimica
> http://sparklet.sf.net


Reply | Threaded
Open this post in threaded view
|

Re: class message

Mariano Martinez Peck
In reply to this post by mmimica


On Sat, May 26, 2012 at 8:36 PM, Milan Mimica <[hidden email]> wrote:
On 26 May 2012 20:32, Mariano Martinez Peck <[hidden email]> wrote:


On Sat, May 26, 2012 at 8:31 PM, Milan Mimica <[hidden email]> wrote:
Hello!

What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?

no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.

That is much better. Thanks! I like progress even if it breaks old code.

breaks? can you give us an example? beause it has to be something quite hacky or low level, has't it?
 


--
Milan Mimica
http://sparklet.sf.net



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

Reply | Threaded
Open this post in threaded view
|

Re: class message

mmimica
In reply to this post by Stéphane Ducasse
On 26 May 2012 20:53, Stéphane Ducasse <[hidden email]> wrote:
>
> What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?
>
> no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
>
> That is much better. Thanks! I like progress even if it breaks old code.

:)
But we always try to minimize else we would go much faster and btw class should not break older code :)

It did break Mocketry (http://www.squeaksource.com/Mocketry)
I would also suspect it breaks things like WriteBarrier and Magma and similar stuff performing magic. 


--
Milan Mimica
http://sparklet.sf.net
Reply | Threaded
Open this post in threaded view
|

Re: class message

Igor Stasenko
On 26 May 2012 20:59, Milan Mimica <[hidden email]> wrote:

> On 26 May 2012 20:53, Stéphane Ducasse <[hidden email]> wrote:
>>
>> >
>> > What has changed in implementation "class" message in between Pharo 1.3
>> > and 1.4? Is it compiled inline now or something like that?
>> >
>> > no, the other way around, now #class is NOT bytecoded, and therefore is
>> > managed as a normal message send.
>> >
>> > That is much better. Thanks! I like progress even if it breaks old code.
>>
>> :)
>> But we always try to minimize else we would go much faster and btw class
>> should not break older code :)
>
>
> It did break Mocketry (http://www.squeaksource.com/Mocketry)
> I would also suspect it breaks things like WriteBarrier and Magma and
> similar stuff performing magic.

but how you can make an omelet without breaking eggs? :)

> --
> Milan Mimica
> http://sparklet.sf.net



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: class message

Marcus Denker-4
In reply to this post by mmimica

On May 26, 2012, at 8:59 PM, Milan Mimica wrote:

> On 26 May 2012 20:53, Stéphane Ducasse <[hidden email]> wrote:
> >
> > What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?
> >
> > no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
> >
> > That is much better. Thanks! I like progress even if it breaks old code.
>
> :)
> But we always try to minimize else we would go much faster and btw class should not break older code :)
>
> It did break Mocketry (http://www.squeaksource.com/Mocketry)
> I would also suspect it breaks things like WriteBarrier and Magma and similar stuff performing magic.
>
normally it should do the opposite: as #class is not special, magic is much easier.

        Marcus



--
Marcus Denker -- http://marcusdenker.de


Reply | Threaded
Open this post in threaded view
|

Re: class message

Igor Stasenko
On 26 May 2012 22:10, Marcus Denker <[hidden email]> wrote:

>
> On May 26, 2012, at 8:59 PM, Milan Mimica wrote:
>
>> On 26 May 2012 20:53, Stéphane Ducasse <[hidden email]> wrote:
>> >
>> > What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?
>> >
>> > no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
>> >
>> > That is much better. Thanks! I like progress even if it breaks old code.
>>
>> :)
>> But we always try to minimize else we would go much faster and btw class should not break older code :)
>>
>> It did break Mocketry (http://www.squeaksource.com/Mocketry)
>> I would also suspect it breaks things like WriteBarrier and Magma and similar stuff performing magic.
>>
> normally it should do the opposite: as #class is not special, magic is much easier.
>

you have no trust, you're from academia :)

>        Marcus


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: class message

Stéphane Ducasse
In reply to this post by mmimica
> :)
> But we always try to minimize else we would go much faster and btw class should not break older code :)
>
> It did break Mocketry (http://www.squeaksource.com/Mocketry)
> I would also suspect it breaks things like WriteBarrier and Magma and similar stuff performing magic.

How mockery used the fact that class was not a send message?

Stef
Reply | Threaded
Open this post in threaded view
|

Re: class message

Denis Kudriashov
In reply to this post by mmimica
Hello

2012/5/26 Milan Mimica <[hidden email]>
On 26 May 2012 20:53, Stéphane Ducasse <[hidden email]> wrote:
>
> What has changed in implementation "class" message in between Pharo 1.3 and 1.4? Is it compiled inline now or something like that?
>
> no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
>
> That is much better. Thanks! I like progress even if it breaks old code.

:)
But we always try to minimize else we would go much faster and btw class should not break older code :)

It did break Mocketry (http://www.squeaksource.com/Mocketry)

Thank's for report.
Try to fix it today.
Now I dont know how #class message can broke something. When I found answer I try to explain

Best regards,
Denis
Reply | Threaded
Open this post in threaded view
|

Re: class message

Stéphane Ducasse
> > no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
> >
> > That is much better. Thanks! I like progress even if it breaks old code.
>
> :)
> But we always try to minimize else we would go much faster and btw class should not break older code :)
>
> It did break Mocketry (http://www.squeaksource.com/Mocketry)
>
> Thank's for report.
> Try to fix it today.
> Now I dont know how #class message can broke something. When I found answer I try to explain

Thanks denis.
I'm curious too.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: class message

Denis Kudriashov
I found problem.

Proxy classes in SMock and Mocketry are subclasses of ProtoObject which not implements #class.
But proxy classes use "self class" in some methods (like #printOn: implementation).

I add #class implementation from Object to ProtoObject and all SMock and Mocketry tests become green.

So questions:
Is ProtoObject should implement #class?
Can we move #class method from Object to ProtoObject?

2012/5/27 Stéphane Ducasse <[hidden email]>
> > no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
> >
> > That is much better. Thanks! I like progress even if it breaks old code.
>
> :)
> But we always try to minimize else we would go much faster and btw class should not break older code :)
>
> It did break Mocketry (http://www.squeaksource.com/Mocketry)
>
> Thank's for report.
> Try to fix it today.
> Now I dont know how #class message can broke something. When I found answer I try to explain

Thanks denis.
I'm curious too.

Stef

Reply | Threaded
Open this post in threaded view
|

Re: class message

Mariano Martinez Peck


On Sun, May 27, 2012 at 11:02 AM, Denis Kudriashov <[hidden email]> wrote:
I found problem.

Proxy classes in SMock and Mocketry are subclasses of ProtoObject which not implements #class.
But proxy classes use "self class" in some methods (like #printOn: implementation).

I add #class implementation from Object to ProtoObject and all SMock and Mocketry tests become green.

So questions:
Is ProtoObject should implement #class?
Can we move #class method from Object to ProtoObject?


ups....good catch! indeed, we should move it to ProtoObject.
 

2012/5/27 Stéphane Ducasse <[hidden email]>
> > no, the other way around, now #class is NOT bytecoded, and therefore is managed as a normal message send.
> >
> > That is much better. Thanks! I like progress even if it breaks old code.
>
> :)
> But we always try to minimize else we would go much faster and btw class should not break older code :)
>
> It did break Mocketry (http://www.squeaksource.com/Mocketry)
>
> Thank's for report.
> Try to fix it today.
> Now I dont know how #class message can broke something. When I found answer I try to explain

Thanks denis.
I'm curious too.

Stef




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

Reply | Threaded
Open this post in threaded view
|

Re: class message

mmimica
In reply to this post by Denis Kudriashov
On 27 May 2012 11:02, Denis Kudriashov <[hidden email]> wrote:

I add #class implementation from Object to ProtoObject and all SMock and Mocketry tests become green.

Yes, that fixes any problems I can think of with it.
Otherwise #class ends up in #doesNotUnderstand which is special for proxy objects...


--
Milan Mimica
http://sparklet.sf.net
Reply | Threaded
Open this post in threaded view
|

Re: class message

Igor Stasenko
In reply to this post by Mariano Martinez Peck
On 27 May 2012 11:40, Mariano Martinez Peck <[hidden email]> wrote:

>
>
> On Sun, May 27, 2012 at 11:02 AM, Denis Kudriashov <[hidden email]>
> wrote:
>>
>> I found problem.
>>
>> Proxy classes in SMock and Mocketry are subclasses of ProtoObject which
>> not implements #class.
>> But proxy classes use "self class" in some methods (like #printOn:
>> implementation).
>>
>> I add #class implementation from Object to ProtoObject and all SMock and
>> Mocketry tests become green.
>>
>> So questions:
>> Is ProtoObject should implement #class?
>> Can we move #class method from Object to ProtoObject?
>>
>
> ups....good catch! indeed, we should move it to ProtoObject.
>
mm.. why?
the more we put to ProtoObject, the more it looks like Object.
at some point you will see not difference between them, and then
someone will come
with a brilliant idea of having one more "clean" class ahead - ProtoProtoObject.


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: class message

Mariano Martinez Peck


On Sun, May 27, 2012 at 2:31 PM, Igor Stasenko <[hidden email]> wrote:
On 27 May 2012 11:40, Mariano Martinez Peck <[hidden email]> wrote:
>
>
> On Sun, May 27, 2012 at 11:02 AM, Denis Kudriashov <[hidden email]>
> wrote:
>>
>> I found problem.
>>
>> Proxy classes in SMock and Mocketry are subclasses of ProtoObject which
>> not implements #class.
>> But proxy classes use "self class" in some methods (like #printOn:
>> implementation).
>>
>> I add #class implementation from Object to ProtoObject and all SMock and
>> Mocketry tests become green.
>>
>> So questions:
>> Is ProtoObject should implement #class?
>> Can we move #class method from Object to ProtoObject?
>>
>
> ups....good catch! indeed, we should move it to ProtoObject.
>
mm.. why?

Because ALL objects do have a class. Right? if you want to change the semantics of #class then just subclass and change it.
This is not the real reason, but in addition because since previously #class used to have a special bytecode, it means it was understood by "everybody". So at least with this we don't break anything.
For me it does not make sense to get a #dnu for #class when the object really has a class.
 
the more we put to ProtoObject, the more it looks like Object.
at some point you will see not difference between them, and then
someone will come
with a brilliant idea of having one more "clean" class ahead - ProtoProtoObject.


You cannot tell that to me ;)  I was the one who spent 2 days to remove all the 10 menthods tryNamedPrimitive* from ProtoObject.
 

--
Best regards,
Igor Stasenko.




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

Reply | Threaded
Open this post in threaded view
|

Re: class message

Douglas Brebner
On 27/05/2012 13:46, Mariano Martinez Peck wrote:
>
> Because ALL objects do have a class. Right?

Wasn't one of the reasons for ProtoObject to enable building non-class
(e.g. prototype) object systems?


Reply | Threaded
Open this post in threaded view
|

Re: class message

Mariano Martinez Peck


On Sun, May 27, 2012 at 3:06 PM, Douglas Brebner <[hidden email]> wrote:
On 27/05/2012 13:46, Mariano Martinez Peck wrote:

Because ALL objects do have a class. Right?

Wasn't one of the reasons for ProtoObject to enable building non-class (e.g. prototype) object systems?


I don't know. I though it was for proxies because Object included already too much messages. 



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

Reply | Threaded
Open this post in threaded view
|

Re: class message

Denis Kudriashov
In reply to this post by Mariano Martinez Peck
Ok.

Now I just fix SMock by adding #class method.
And I publish new ConfigurationOfMocketry to squeaksource/MetacelloRepository.
All tests green

12