Hi Mario,

On Mon, Oct 21, 2013 at 4:15 PM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:

- Are #become: and #becomeForward: optimized for the case where both objects use the same amount of memory?

Yes.  This case simply swaps contents and adjusts the remembered table accordingly.  Tim also suggested optimizing the other case, copying into the smaller object and only allocating one extra clone, which I'll implement soon.

Just curious....This "simply swaps contents" isn't only for #become: ? Or there is a way to do something to avoid updating pointers for #becomeForward as well?

Forwarding is the case one needs for becomeForward:.  Think about the semantics; references to object A must change to be references to object B.  object B must be unchanged.  object A can be collected.  So one either forwards object A to object B or sweeps the heap replacing references to object A with references to object B.  There is no opportunity to swap contents with becomeForward:.  Do you agree?

 Maybe there is something related about lazy become / forwarding pointers / proxies or whatever that could help?

Yes, forwarding means all the system has to do is change object A into a forwarder to object B.  That's what Spur does.  No heap sweep.  It just (*) changes the class and format of object A to say "I'm a forwarder" and replaces the first slot with a reference to object B.

(*) in fact, it must then do more; ensuring that nothing along the superclass chain of any class in use is forwarded, because otherwise the VM would have to check for forwarding pointers when doing message lookup.  But this is a small subset of the heap to scan, all reachable from the class table.




On Sat, 21 Sep 2013, btc@openinworld.com wrote:

commits@source.squeak.org wrote:
 Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

==================== Summary ====================

Name: VMMaker.oscog-eem.399
Author: eem
Time: 20 September 2013, 6:28:56.308 pm
UUID: 89f8fefe-b59d-42d7-9c11-7f848d0e5131
Ancestors: VMMaker.oscog-eem.398

A few isIntegerObject:'s => isImmediate:'s in primitives.

More protocol.

The Spur VM now draws its first window!!

A cheer goes up in the crowd of interested spectators.
Probably lots still to do, but its a nice concrete milestone.
Contributing is beyond me at this time, so I especially like to thank you for this important initiative.

cheers -ben