From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: GNU Guile branch, wip-peval-predicates, created. v2.0.5-100-g59c5570 Date: Fri, 13 Apr 2012 13:07:40 -0400 Message-ID: <87sjg74l2b.fsf@netris.org> References: <87zkaf4sov.fsf@netris.org> <8762d34mvv.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334336892 7266 80.91.229.3 (13 Apr 2012 17:08:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2012 17:08:12 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 13 19:08:10 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SIjyj-0008DB-Qd for guile-devel@m.gmane.org; Fri, 13 Apr 2012 19:08:09 +0200 Original-Received: from localhost ([::1]:55475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIjyj-0003hP-23 for guile-devel@m.gmane.org; Fri, 13 Apr 2012 13:08:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIjyc-0003fY-OD for guile-devel@gnu.org; Fri, 13 Apr 2012 13:08:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIjyX-00051N-Ry for guile-devel@gnu.org; Fri, 13 Apr 2012 13:08:02 -0400 Original-Received: from world.peace.net ([96.39.62.75]:52429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIjyX-000517-N6 for guile-devel@gnu.org; Fri, 13 Apr 2012 13:07:57 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SIjyP-0008Ej-JY; Fri, 13 Apr 2012 13:07:49 -0400 In-Reply-To: <8762d34mvv.fsf@pobox.com> (Andy Wingo's message of "Fri, 13 Apr 2012 09:28:20 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14265 Archived-At: Hi Andy, Andy Wingo writes: > On Fri 13 Apr 2012 07:22, Mark H Weaver 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?) >>> (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. > > The identity of the vtable does not change when it is redefined. If the > vtable is redefined, the equality check still succeeds. There are > comments in the source. Okay, I've just reread: http://wingolog.org/archives/2009/11/09/class-redefinition-in-guile and I see that I had some misconceptions about this. Point taken: when a class is redefined, the result of 'struct-vtable' on the instances remain the same. 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 have been 'set!'. Regards, Mark