emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Note on 109327


From: Dmitry Antipov
Subject: Re: Note on 109327
Date: Wed, 01 Aug 2012 08:34:55 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0

On 08/01/2012 01:47 AM, Thien-Thi Nguyen wrote:

    > I think to do this well you will need separate macros for getting
    > and setting.

    Sure, but it's almost impossible to do this at once.

Why?

As an exercise, try this for 'contents' member of Lisp_Vector.


    At the very beginning, it's possible to "overestimate" barrier
    assuming that each XVAR (obj, field) changes FIELD in OBJ; in the
    future, reads and writes may be separated, thus giving a precise
    write barrier.

I think you're saying that you prefer to do:

a1. substitute object access (whether LHS or RHS) w/ XVAR (obj, field)
a2. distinguish LHS (which could benefit from optimization) from RHS
a3. substitue LHS ‘XVAR (...) = value’ w/ SETVAR (obj, field, value)

instead of:

b1. distinguish LHS (which could benefit from optimization) from RHS
b2. substitute LHS object access w/ SETVAR (obj, field, value)
b3. substitute RHS object access w/ XVAR (obj, field)

Is my understanding correct?

a1) is definitely the first, since this gives a base to design an
"overestimated" write barrier (each XVAR (obj, field) issues the
barrier). Next, it should be possible to  implement generational
pass for GC (which collects only an objects changed since the last
collection). This is expected to be very inefficient because write
barrier is hugely overestimated. Finally, it's time for a3) or b2),
i.e. removing the barrier from XVAR (obj, field) and installing it
only at XSETVAR (obj, field, value), thus reducing "overestimation"
of the barrier.

Dmitry





reply via email to

[Prev in Thread] Current Thread [Next in Thread]