From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62932 invoked by alias); 25 Sep 2017 16:58:57 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 62920 invoked by uid 89); 25 Sep 2017 16:58:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=sk:www.the, sk:wwwthe, hypothetical, H*r:sk:kawa@so X-HELO: mail.theptrgroup.com Received: from mail.theptrgroup.com (HELO mail.theptrgroup.com) (71.178.251.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Sep 2017 16:58:55 +0000 Received: from [10.11.21.14] (unknown [10.11.21.14]) by mail.theptrgroup.com (Postfix) with ESMTPS id F0D30401A5 for ; Mon, 25 Sep 2017 12:58:53 -0400 (EDT) From: Jamison Hope Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: no class-of ? Date: Mon, 25 Sep 2017 16:58:00 -0000 References: <425B3BC8-31F3-4299-ADB1-9E064C1E8D3E@theptrgroup.com> <51a642b1-f20d-9f32-645d-ea96b935e3c2@bothner.com> <332863a5-3fdf-147e-e9c8-23253b0eff31@bothner.com> To: Kawa mailing list In-Reply-To: Message-Id: <7DB8779E-1D1D-4B80-8D4D-DA50375A1B02@theptrgroup.com> X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00081.txt.bz2 On Sep 24, 2017, at 5:52 PM, Per Bothner wrote: > > Instead, I implemented a somewhat more general mechanism: If an object that > needs to be referenced as a literal implements HasOwningField, we use the > getOwningField of that interface to find the corresponding static field. That's working, thanks. My validate-apply handler now looks like: (define-validate validateEnsureBoolean (exp required proc) ((exp:isSimple 1 1) (let* ((e0 (visit-exp (exp:getArg 0))) (t0 (e0:getType))) (cond ((eq? t0 boolean) e0) ((eq? t0 int) (apply-exp = e0 0)) ((eq? t0 void) (begin-exp e0 #t)) (else (gnu.expr.ErrorExp (format #f "unsupported expression type: ~a" t0) (get-compilation))))))) That looks very similar to my original hypothetical macro, so I'm content. Sorry for hijacking your thread, Sonny! -- Jamison Hope The PTR Group www.theptrgroup.com