On Feb 3, 2012, at 10:54 PM, Igor Stasenko wrote:
On 3 February 2012 21:42, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
lukas may be you should send that to the vm mailing-list. If you need we can ask igor :) (even if he is busy right now).
implementing it wont be a big deal.
i just trying to understand, what is "destructive" vs "non-destructive" behavior in replaceFrom:to:with:startingAt:
receiver replaceFrom: 3 to: 5 with: receiver startingAt: 2. Destructive: slots 3-5 all contains originals value from slot 2. Non-Destructive: slots 3-5 contains originals values from slots 2-4.
is it right in my understanding that you want to always meet a following criteria:
receiver replaceFrom: a to: b with: replacement startingAt: c.
a to: b do: [:i | self assert: (receiver at: i) == (replacement at: c + i - 1) ]
? (irrespectible, of course if receiver == replacement or not ) Yes. Basically the same thing you ensure in C by using memmove instead of memcpy.
Cheers. Henry