From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129857 invoked by alias); 9 Jul 2019 22:18:09 -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 129849 invoked by uid 89); 9 Jul 2019 22:18:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Jul 2019 22:18:07 +0000 Received: from [10.9.9.202] (helo=mailfront20.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1hkyR0-0004y5-1p; Wed, 10 Jul 2019 00:18:02 +0200 Received: by mailfront20.runbox with esmtpsa (uid:757155 ) (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1hkyQc-00029C-Sv; Wed, 10 Jul 2019 00:17:39 +0200 Subject: Re: Problem with storing types in variables To: Peter , kawa mailing list References: <87a7dndojd.fsf@nexoid.at> From: Per Bothner Message-ID: Date: Tue, 09 Jul 2019 22:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <87a7dndojd.fsf@nexoid.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00002.txt.bz2 On 7/9/19 11:57 AM, Peter wrote: > Hello ;) > > A quick question: > > (float[][] length: 10) > > works fine, as expected, however: > > (define faa float[][]) > (faa length: 10) > > does not. This used to work in earlier versions of kawa, but now I get: Currently, the length keyword is only supported when the array constructor expression is inlined (optimized at compile-time). However, it does not work when array construction is called in "reflexive" mode at run-time. (This broke when Kawa's 'apply' calling convention was re-done.) A work-around is to use define-constant or the ! operator: (define-constant faa float[][]) or: (! faa float[][]) This allows the compiler to optimize the use of faa. I'm working on fixing this. -- --Per Bothner per@bothner.com http://per.bothner.com/