VM Maker: VMMaker.oscog-eem.774.mcz

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

VM Maker: VMMaker.oscog-eem.774.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.774.mcz

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

Name: VMMaker.oscog-eem.774
Author: eem
Time: 15 June 2014, 3:01:35.066 pm
UUID: 665ef9a5-4139-4f97-85c0-0d0df9eea422
Ancestors: VMMaker.oscog-eem.773

Restore the accuracy of the comment in followForwarded:
back to Igor's original.

=============== Diff against VMMaker.oscog-eem.773 ===============

Item was changed:
  ----- Method: SpurMemoryManager>>followForwarded: (in category 'forwarding') -----
  followForwarded: objOop
+ "Follow a forwarding pointer.  THis must be a loop because we cannot prevent forwarders to
+ forwarders being created by lazy become.  Consider the following example by Igor Stasenko:
- "Follow a forwarding pointer.  Alas we cannot prevent forwarders to forwarders
- being created by lazy become.  Consider the following example by Igor Stasenko:
  array := { a. b. c }.
+ - array at: 1 points to &a. array at: 2 points to &b. array at: 3 points to &c
- - array at: 1 points to a. array at: 2 points to b. array at: 3 points to c
  a becomeForward: b
+ - array at: 1 still points to &a. array at: 2 still points to &b. array at: 3 still points to &c
- - array at: 1 still points to a. array at: 2 still points to b. array at: 3 still points to c
  b becomeForward: c.
+ - array at: 1 still points to &a. array at: 2 still points to &b. array at: 3 still points to &c
- - array at: 1 still points to a. array at: 2 still points to b. array at: 3 still points to c
  - when accessing array first one has to follow a forwarding chain:
+ &a -> &b -> c"
- a -> b -> c"
  <api>
  | referent |
  self assert: (self isForwarded: objOop).
  referent := self fetchPointer: 0 ofMaybeForwardedObject: objOop.
  [(self isOopForwarded: referent)] whileTrue:
  [referent := self fetchPointer: 0 ofMaybeForwardedObject: referent].
  ^referent!