From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79710 invoked by alias); 31 Oct 2018 17:23:20 -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 79693 invoked by uid 89); 31 Oct 2018 17:23:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=now!, now 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; Wed, 31 Oct 2018 17:23:17 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1gHuD4-0003Q5-Hd; Wed, 31 Oct 2018 18:23:14 +0100 Received: by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1gHuD1-0001p1-T9; Wed, 31 Oct 2018 18:23:12 +0100 Subject: Re: JavaFX unexpected warning To: Arie van Wingerden Cc: kawa@sourceware.org References: <1301.1540979293@vpaur.eip10.org> From: Per Bothner Message-ID: <43f199d7-e2e8-ecf3-726f-c0ddc6965f39@bothner.com> Date: Wed, 31 Oct 2018 17:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00018.txt.bz2 On 10/31/18 4:17 AM, Arie van Wingerden wrote: > Thanks for the tip, works OK now! > > So I have to consider two things: > - I can specify type hints in Kawa I'm this particular case, it seems Kawa should be able to figure out the type of 'button', since it actually does figure out the type of the Button call. The complication is that this is a self-reference: 'button' is referenced in the initializing expression. To get this to work we have to defer analyzing the arguments to Button until after we've deduced the type for 'button'. This is in principle possible, but may be too complicated. For one thing it interacts to data flow analysis. (Everything is tied together and criss-crosses in the "InlineCall" analysis phase.) This could be fixed if we implemented an optimization which sets the 'button' variable before we set its fields. This has a big advantage in that it enables building self-referential data structures more easily, as well as data structures that mutually reference each other. It would have the side-effect of fixing this mini-bug. I've thought into doing the above optimization, but I don't remember how far I got. (There are lot of old corners in Kawa.) Anyway, I'm looking into it. > - and I'll have to get used to the underlying Java api then ;) 'Afraid so. There is no complete Kawa wrapper around the JavaFX API. However, Kawa does have a number of convenience features. For example: https://www.gnu.org/software/kawa/Allocating-objects.html -- --Per Bothner per@bothner.com http://per.bothner.com/