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

2012-04-16 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com skribis: But OK, the question here is, what if another thread is concurrently mutating X and Y? If this were C++ or Java, the answer would be that they can still fold, because access to a multithreaded mutable needs to be

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

2012-04-15 Thread David Kastrup
Andy Wingo wi...@pobox.com writes: But OK, the question here is, what if another thread is concurrently mutating X and Y? If this were C++ or Java, the answer would be that they can still fold, because access to a multithreaded mutable needs to be synchronized. I think this is reasonable.

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

2012-04-15 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com skribis: But OK, the question here is, what if another thread is concurrently mutating X and Y? If this were C++ or Java, the answer would be that they can still fold, because access to a multithreaded mutable needs to be synchronized. I think this is

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

2012-04-14 Thread Andy Wingo
Hi, On Fri 13 Apr 2012 10:07, Mark H Weaver m...@netris.org writes: Nonetheless, the vtable checks involve comparisons with a mutable top-level variable. Whenever unknown code is run (e.g. when a top-level procedure is called) you must assume the worst: that any top-level variable might

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

2012-04-13 Thread Mark H Weaver
Hi Andy, commit 59c557056cff1ce6146b4d689922300b6278 Author: Andy Wingo wingo-e+axbwqsrlaavxtiumw...@public.gmane.org Date: Tue Apr 10 15:56:23 2012 -0700 peval: elide redundant predicates; eliminate some common subexpressions * module/language/tree-il/peval.scm

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

2012-04-13 Thread Noah Lavine
At first I thought you were right. But then I realized there's an even deeper problem here. Imagine implementing a record mutator like this: (define (set-foo-a! foo new-value) (if (is-foo? foo) (%unsafe-set-foo-a! foo new-value) (error))) That code is incorrect, by the same logic you

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

2012-04-13 Thread Andy Wingo
Hi, On Fri 13 Apr 2012 07:22, Mark H Weaver m...@netris.org writes: * 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?)

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

2012-04-13 Thread Mark H Weaver
Hi Andy, Andy Wingo wi...@pobox.com writes: On Fri 13 Apr 2012 07:22, Mark H Weaver m...@netris.org writes: * module/language/tree-il/peval.scm (fold-constants): Returns #f instead of the expression, as all continuations handle #f themselves. (negate, bailout?, extract-facts,

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

2012-04-13 Thread Ludovic Courtès
Noah Lavine noah.b.lav...@gmail.com skribis: I'm somewhat afraid, however, that the real solution is changing how we deal with parallelism, and that is a much bigger problem. And this is where functional setters come in. ;-) Ludo’.

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

2012-04-13 Thread Noah Lavine
On Fri, Apr 13, 2012 at 3:59 PM, Ludovic Courtès l...@gnu.org wrote: Noah Lavine noah.b.lav...@gmail.com skribis: I'm somewhat afraid, however, that the real solution is changing how we deal with parallelism, and that is a much bigger problem. And this is where functional setters come in.