Iirc we use forwarding addresses whenever we move during GC. Since maps are
in map space, there is not a differentiation between minor and major GC.

This info may be outdated though :)

Yang

On Sat, Jun 22, 2019, 11:11 Ben Noordhuis <[email protected]> wrote:

> On Wed, Jun 19, 2019 at 6:17 PM billti via v8-dev
> <[email protected]> wrote:
> >
> > Trying to clarify how the Map tagged pointer on objects is modified
> during GC. The MapWord class (objects.h) has the below comment I can't
> quite parse - specifically in the parens at the end. Am I reading right
> that the Map word isn't a heap object pointer during a full GC? Or is this
> comment incorrect/outdated?
> >
> >   // True if this map word is a forwarding address for a scavenge
> >   // collection.  Only valid during a scavenge collection (specifically,
> >   // when all map words are heap object pointers, i.e. not during a full
> GC).
> >   inline bool IsForwardingAddress() const;
>
> The comment at the top of class MapWord in src/objects/objects.h explains
> it:
>
>   // Heap objects typically have a map pointer in their first word.
> However,
>   // during GC other data (e.g. mark bits, forwarding addresses) is
> sometimes
>   // encoded in the first word.  The class MapWord is an abstraction of the
>   // value in a heap object's first word.
>
> More specifically, when MapWord::IsForwardingAddress() returns true,
> the map word is a SMI, not a HeapObject (i.e., bit 0 is clear.)
>
> I'm not 100% sure but I think that condition can arise during both
> minor and major GCs.
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/CAHQurc9BLw4k53GPQBOusOPR2-aprRnb2iNy6iE%2BnOBr_wnwvA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAFSTc_i%2BfcxmfUy6m9Bidefj5BH2vXgrS7jqm62hfnfbbtgQgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to