From: Per Bothner <per@bothner.com>
To: Jamison Hope <jhope@alum.mit.edu>, kawa@sourceware.org
Subject: Re: define-simple-class fields with ConstantValue attribute?
Date: Mon, 1 Jun 2020 22:10:10 -0700 [thread overview]
Message-ID: <18544777-b924-047e-6b87-03bb51701210@bothner.com> (raw)
In-Reply-To: <CA+ghDQ8qrUCJ2BhXB3z4r_3ARkE6rS6+kaRPQj2km5cPA+VWVA@mail.gmail.com>
On 6/1/20 11:16 AM, Jamison Hope wrote:
> Is there a field initialization syntax for define-simple-class which
> will cause the field to have a ConstantValue attribute set?
I got this sort-of-working (with some testsuite failures,
that are probably fixable), by hacking object.java (which is used
to "syntax-expand" define-simple-class).
However, I think it might be more general and less fragile
to change this at bytecode-generating time, in SetExp.java.
(A minor downside is you might get a useless empty <clinit>
method, but that's acceptable, I think.)
I'll look into this approach shortly, perhaps in the morning.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
prev parent reply other threads:[~2020-06-02 5:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 18:16 Jamison Hope
2020-06-02 5:10 ` Per Bothner [this message]
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=18544777-b924-047e-6b87-03bb51701210@bothner.com \
--to=per@bothner.com \
--cc=jhope@alum.mit.edu \
--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).