guile-devel
[Top][All Lists]
Advanced

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

Re: GNU Guile branch, wip-peval-predicates, created. v2.0.5-100-g59c5570


From: Mark H Weaver
Subject: Re: GNU Guile branch, wip-peval-predicates, created. v2.0.5-100-g59c5570
Date: Fri, 13 Apr 2012 10:22:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Hi Andy,

> commit 59c557056cff1ce6146b4d689eeee922300b6278
> Author: Andy Wingo <address@hidden>
> Date:   Tue Apr 10 15:56:23 2012 -0700
>
>     peval: elide redundant predicates; eliminate some common subexpressions
>     
>     * module/language/tree-il/peval.scm (fold-constants): Returns #f instead
>       of the expression, as all continuations handle #f themselves.
>       (negate, bailout?, extract-facts, infer, infer-defined?)
>       (infer-struct-vtable): New helpers.

I haven't looked at the code, but it sounds like you are trying to
eliminate redundant 'struct-vtable' checks.  Unfortunately, it seems to
me that this cannot be done safely.  In practice, the checks look like:

  (eq? (struct-vtable s) <foo>)

Both of the values being compared here are fetched from mutable
locations.  The 'struct-vtable' field is mutable, and <foo> is usually a
top-level variable that is also mutable.  Furthermore, both of these
things are mutated in practice when a GOOPS class is redefined, IIUC.

Am I missing something?

    Thanks,
      Mark



reply via email to

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