At 12:35 PM 10/16/2001 +0200, Bart Lateur wrote:
>On Mon, 15 Oct 2001 22:12:58 -0400 (EDT), Dan Sugalski wrote:
>
> >>doing:
> >>   save  S0
> >>   restore S1
> >>
> >>(since there's no set S1,S0)
> >>
> >>binds the registers together, so a change to one is a change to
> >>both...which doesn't happen on int registers.
>
> >Right. Save on a string register pushes the pointer to the string
> >structure in the register onto the stack. The same thing happens with
> >PMCs, or will when they're implemented.
> >
> >The assumption is that, when you push a register onto the stack, you'll
> >then stomp on the contents of the register. (Rather than what the register
> >points to...) Otherwise a push would need to create a copy of the string
> >structure and a copy of the string contents.
>
>Aren't you the guy who kept shouting "Copy on Write! Copy on Write!" all
>the time? ;-)

Nah, that was someone else. ;) It was also in relation to PMCs, not strings.

>Of course, there's a level at which this also must be implemented, and
>likely the level has become just too low to do something still as
>magical at this time. Perhaps it is time just to implement this copy on
>write scheme, right here.

I think we'd probably be better off hoisting COW to the PMC level and let 
the strings stay the way they are. (I may come to regret this, but for now...)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to