public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Arie van Wingerden <xapwing@gmail.com>
Cc: kawa@sourceware.org
Subject: Re: JavaFX unexpected warning
Date: Wed, 31 Oct 2018 17:23:00 -0000	[thread overview]
Message-ID: <43f199d7-e2e8-ecf3-726f-c0ddc6965f39@bothner.com> (raw)
In-Reply-To: <CADkALSHPXEM+MSA=U5BZz-_U+eGYjxCCCwAt7TGt5wcXZzHiWg@mail.gmail.com>

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/

  reply	other threads:[~2018-10-31 17:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  9:31 Arie van Wingerden
2018-10-31  9:49 ` Sudarshan S Chawathe
2018-10-31 11:17   ` Arie van Wingerden
2018-10-31 17:23     ` Per Bothner [this message]
2018-11-01  5:32       ` Per Bothner
2018-11-01 10:21         ` Arie van Wingerden
2018-11-01 13:41 Jamison Hope
2018-11-01 15:08 ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43f199d7-e2e8-ecf3-726f-c0ddc6965f39@bothner.com \
    --to=per@bothner.com \
    --cc=kawa@sourceware.org \
    --cc=xapwing@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).