ImageSegment vs SmartRefStream

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

ImageSegment vs SmartRefStream

Mariano Martinez Peck
Hi folks. I have been analyzing the code and trying to understand what ImageSegment does and how. After that, I came up to SmartRefStream and here is where I have some questions:

1) which is the difference between ImageSegment and SmartRefStream ? what does each of them do ?

2) Who uses who ? ImageSegment uses SmartRefStream or vice-versa?  each one use the other?

Thank you for any hints you can give me.

Mariano


Reply | Threaded
Open this post in threaded view
|

Re: ImageSegment vs SmartRefStream

Mariano Martinez Peck
Sorry, and I forgot another one:

3) Which is the difference between ReferenceStream and SmartRefStream ?

Cheers

mariano

On Tue, Dec 22, 2009 at 2:02 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi folks. I have been analyzing the code and trying to understand what ImageSegment does and how. After that, I came up to SmartRefStream and here is where I have some questions:

1) which is the difference between ImageSegment and SmartRefStream ? what does each of them do ?

2) Who uses who ? ImageSegment uses SmartRefStream or vice-versa?  each one use the other?

Thank you for any hints you can give me.

Mariano



Reply | Threaded
Open this post in threaded view
|

Re: ImageSegment vs SmartRefStream

Lukas Renggli
In reply to this post by Mariano Martinez Peck
> 1) which is the difference between ImageSegment and SmartRefStream ? what
> does each of them do ?

ImageSegment depends on SmartRefStream. SmartRefStream is independent
of ImageSegment and can also be used alone.

> 2) Who uses who ? ImageSegment uses SmartRefStream or vice-versa?  each one
> use the other?

ImageSegment uses SmartRefStream to serialize itself. That includes
its internal state (the image segment object), the ByteArray that the
VM primitive produces, as well as incoming and outgoing references
(for example classes and symbols).

> 3) Which is the difference between ReferenceStream and SmartRefStream ?

SmartRefStream can handle class shape changes. ReferenceStream not.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: ImageSegment vs SmartRefStream

Mariano Martinez Peck


On Tue, Dec 22, 2009 at 2:17 PM, Lukas Renggli <[hidden email]> wrote:
> 1) which is the difference between ImageSegment and SmartRefStream ? what
> does each of them do ?

ImageSegment depends on SmartRefStream. SmartRefStream is independent
of ImageSegment and can also be used alone.


ok...
 
> 2) Who uses who ? ImageSegment uses SmartRefStream or vice-versa?  each one
> use the other?

ImageSegment uses SmartRefStream to serialize itself.

ok, can I ask where in the code is that?   Maybe when ImageSegment uses the method fileOutClass: nil andObject:   (in ImageSegment >> writeForExportOn:)  ?

But this is only used when you want to export an ImageSegment to another image. If you want to swap out an ImageSegment and then load it again, I think it doesn't use SmartRefStream because it just write to file the wordarray. (ImageSegment >> writeToFile)
 
I am correct ?

That includes
its internal state (the image segment object), the ByteArray that the
VM primitive produces, as well as incoming and outgoing references
(for example classes and symbols).

> 3) Which is the difference between ReferenceStream and SmartRefStream ?

SmartRefStream can handle class shape changes. ReferenceStream not.


Ok, thanks :)
 
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch