From: Per Bothner <per@bothner.com>
To: Peter <craven@gmx.net>, kawa mailing list <kawa@sourceware.org>
Subject: Re: Problem with storing types in variables
Date: Tue, 09 Jul 2019 22:18:00 -0000 [thread overview]
Message-ID: <b1cb3370-426e-4b24-34af-0ef6168ecbff@bothner.com> (raw)
In-Reply-To: <87a7dndojd.fsf@nexoid.at>
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/
next prev parent reply other threads:[~2019-07-09 22:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 18:57 Peter
2019-07-09 22:18 ` Per Bothner [this message]
2019-07-10 3:02 ` 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=b1cb3370-426e-4b24-34af-0ef6168ecbff@bothner.com \
--to=per@bothner.com \
--cc=craven@gmx.net \
--cc=kawa@sourceware.org \
/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).