become: in VASmalltalk: one way or two way ?

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

become: in VASmalltalk: one way or two way ?

Marten Feldtmann-5

The method remark says its platform dependent ... so how is it under VA ?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e3cf4a3c-9abe-4ab8-a0cc-c9a7f9ee9d3dn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: become: in VASmalltalk: one way or two way ?

Mariano Martinez Peck-2
Which version are you working with? Because this method has been clarified recently. In 9.2.2 it looks like this:

become: otherObject

"Change all objects that refer to the receiver (via

instance variables) to now refer to @otherObject.

This is termed 'one way' become. 


Fail if the receiver is a immediate object:

(anSmallInteger, a Character, true, false, nil)

 

Arguments:

otherObject - <Object>

Answers:

<Object> self"


<primitive: VMprObjectBecome>

^self primitiveFailed


On Tue, Jul 21, 2020 at 12:22 PM Marten Feldtmann <[hidden email]> wrote:

The method remark says its platform dependent ... so how is it under VA ?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e3cf4a3c-9abe-4ab8-a0cc-c9a7f9ee9d3dn%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibHhsD6QW_xDKrU10ehA2f3eQ5JU900uCgFO2wbSnObegg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: become: in VASmalltalk: one way or two way ?

Marten Feldtmann-5
In my Windows 9.2.2 I have the following remark:

become: otherObject

    "Change all objects that refer to the receiver (via
     instance variables) to now refer to otherObject.

     The exact implementation of #become: is platform
     dependent. Some implementations may swap the
     references of the receiver and otherObject. This is
     termed 'two way' become. For 'two way' become, answer
     otherObject. Some implementations will only change
     the references that originally refer to the receiver
     leaving otherObject to be garbage collected. This is
     termed 'one way' become. For 'one way' become, Answer
     the changed receiver. A third alternative is 'one
     way' become, but Answer otherObject. The most
     conservative assumption is to assume 'one way' become.

     Fail if the receiver is a SmallInteger, a Character, true, false
     or nil."

    <primitive: VMprObjectBecome>
    ^self primitiveFailed

[hidden email] schrieb am Dienstag, 21. Juli 2020 um 17:28:34 UTC+2:
Which version are you working with? Because this method has been clarified recently. In 9.2.2 it looks like this:

become: otherObject

"Change all objects that refer to the receiver (via

instance variables) to now refer to @otherObject.

This is termed 'one way' become. 


Fail if the receiver is a immediate object:

(anSmallInteger, a Character, true, false, nil)

 

Arguments:

otherObject - <Object>

Answers:

<Object> self"


<primitive: VMprObjectBecome>

^self primitiveFailed


On Tue, Jul 21, 2020 at 12:22 PM Marten Feldtmann <[hidden email]> wrote:

The method remark says its platform dependent ... so how is it under VA ?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e3cf4a3c-9abe-4ab8-a0cc-c9a7f9ee9d3dn%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e1a286c2-55eb-4f88-9ce4-0ad7d181b60an%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: become: in VASmalltalk: one way or two way ?

Mariano Martinez Peck-2
Ups, sorry, my bad, that was integrated for the next release of VAST (not 922). Anyway, I think that answers your question ;)



On Tue, Jul 21, 2020 at 12:56 PM Marten Feldtmann <[hidden email]> wrote:
In my Windows 9.2.2 I have the following remark:

become: otherObject

    "Change all objects that refer to the receiver (via
     instance variables) to now refer to otherObject.

     The exact implementation of #become: is platform
     dependent. Some implementations may swap the
     references of the receiver and otherObject. This is
     termed 'two way' become. For 'two way' become, answer
     otherObject. Some implementations will only change
     the references that originally refer to the receiver
     leaving otherObject to be garbage collected. This is
     termed 'one way' become. For 'one way' become, Answer
     the changed receiver. A third alternative is 'one
     way' become, but Answer otherObject. The most
     conservative assumption is to assume 'one way' become.

     Fail if the receiver is a SmallInteger, a Character, true, false
     or nil."

    <primitive: VMprObjectBecome>
    ^self primitiveFailed

[hidden email] schrieb am Dienstag, 21. Juli 2020 um 17:28:34 UTC+2:
Which version are you working with? Because this method has been clarified recently. In 9.2.2 it looks like this:

become: otherObject

"Change all objects that refer to the receiver (via

instance variables) to now refer to @otherObject.

This is termed 'one way' become. 


Fail if the receiver is a immediate object:

(anSmallInteger, a Character, true, false, nil)

 

Arguments:

otherObject - <Object>

Answers:

<Object> self"


<primitive: VMprObjectBecome>

^self primitiveFailed


On Tue, Jul 21, 2020 at 12:22 PM Marten Feldtmann <[hidden email]> wrote:

The method remark says its platform dependent ... so how is it under VA ?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e3cf4a3c-9abe-4ab8-a0cc-c9a7f9ee9d3dn%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e1a286c2-55eb-4f88-9ce4-0ad7d181b60an%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibG-OhJRun9V4ve0XBmUrOXO1%3DoGfjm3UdkbM6EsRLRwMw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: become: in VASmalltalk: one way or two way ?

jtuchel
In reply to this post by Marten Feldtmann-5
Hi Marten,

this has been discussed here quite recently: https://groups.google.com/g/va-smalltalk/c/39hiC0t5HTg/m/7n6Xg6gsCAAJ

Marten Feldtmann schrieb am Dienstag, 21. Juli 2020 um 17:22:06 UTC+2:

The method remark says its platform dependent ... so how is it under VA ?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/8baffec3-cace-4440-a4d3-7d35fbf89d6fn%40googlegroups.com.