public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bryce McKinlay <bmckinlay@gmail.com>
To: Andrew Haley <aph@redhat.com>
Cc: Mike Hearn <mike@plan99.net>, GCC Java <java@gcc.gnu.org>
Subject: Re: Trouble building gcj 4.8.1
Date: Tue, 02 Jul 2013 14:53:00 -0000	[thread overview]
Message-ID: <CALUNu-qbpH8omT=1uq9f0QaGUr-jO4f=bOkZ3PKbErUA9yDHKw@mail.gmail.com> (raw)
In-Reply-To: <51C9A783.40008@redhat.com>

On Tue, Jun 25, 2013 at 3:21 PM, Andrew Haley <aph@redhat.com> wrote:
> On 06/25/2013 03:15 PM, Mike Hearn wrote:
>>> I'm trying to find out what you want to do to java.lang.String.  Tell me
>>> that, and we'll take it from there.
>>
>> At the moment, supporting the methods that take java.nio.Charset. I'm
>> going to try and just hack it up with something like this:
>>
>>   public String(byte[] data, int offset, int count, Charset encoding)
>>     throws UnsupportedEncodingException
>>   {
>>     init (data, offset, count, encoding.name());
>>   }
>>
>> and then the same for getBytes().
>
> OK.  I think you can just add those methods.
>
>> But in general I anticipate that I'll continue to hit stubs or quirks
>> in classpath so I'm trying to figure out how best to reach my goal,
>> which will likely involve fixing up various things along the way. For
>> instance, my first yak-shaving goal is to run the test suite for the
>> core library of this app and then hack/fix until all the tests pass.
>
> In general, we follow Classpath except for a few core classes -- and
> String is one of those.  Major hacking on core classes requires compiler
> changes, so I strongly recommend you don't do that.  For example, better
> not add any fields.  But in general for almost the whole class library
> you won't have so much trouble.

I think it's only java.lang.Object and java.lang.Class that are
"special" - i.e. could conceivably require compiler changes if you
changed the field layout. As far as I can recall, String isn't really
treated specially in any way.

There should be no problem at all adding those methods and I would
encourage you to go ahead and submit a patch.

Bryce

  parent reply	other threads:[~2013-07-02 14:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 13:21 Mike Hearn
2013-06-24 16:48 ` Mike Hearn
2013-06-24 17:04   ` Andrew Haley
2013-06-24 17:17     ` Mike Hearn
2013-06-24 17:26       ` Andrew Haley
2013-06-24 20:36         ` Matthias Klose
2013-06-25 13:39         ` Mike Hearn
2013-06-25 13:53           ` Mike Hearn
2013-06-25 14:07             ` Andrew Haley
2013-06-25 14:05           ` Andrew Haley
2013-06-25 14:10             ` Mike Hearn
2013-06-25 14:12               ` Andrew Haley
2013-06-25 14:15                 ` Mike Hearn
2013-06-25 14:21                   ` Andrew Haley
2013-06-28  1:28                     ` Andïï
2013-06-28  9:06                       ` Andrew Haley
2013-07-02 14:53                     ` Bryce McKinlay [this message]
     [not found]                       ` <CANEZrP1tLxpu818cFGdgma+RVL32yRJJUOyb5m8QF=mhTZVueg@mail.gmail.com>
2013-07-03 13:43                         ` Mike Hearn
2013-07-03 13:47                           ` Andrew Haley
2013-07-03 21:31                             ` Bryce McKinlay
2013-06-25 14:05           ` Andrew Haley

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='CALUNu-qbpH8omT=1uq9f0QaGUr-jO4f=bOkZ3PKbErUA9yDHKw@mail.gmail.com' \
    --to=bmckinlay@gmail.com \
    --cc=aph@redhat.com \
    --cc=java@gcc.gnu.org \
    --cc=mike@plan99.net \
    /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).