public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Hearn <mike@plan99.net>
To: Bryce McKinlay <bmckinlay@gmail.com>
Cc: Andrew Haley <aph@redhat.com>, GCC Java <java@gcc.gnu.org>
Subject: Re: Trouble building gcj 4.8.1
Date: Wed, 03 Jul 2013 13:43:00 -0000	[thread overview]
Message-ID: <CANEZrP1JEXSjTJ+q3OvzOt80+44wVdj=vY7fVUQNUgs=oELayw@mail.gmail.com> (raw)
In-Reply-To: <CANEZrP1tLxpu818cFGdgma+RVL32yRJJUOyb5m8QF=mhTZVueg@mail.gmail.com>

Well, the issue is I'm not sure how to implement them correctly. I did
a quick hack which involves using the existing methods that take
charset names and just calling them with Charset.forName() but I
seriously doubt this is really fully compatible or would pass the Java
test suite. Perhaps it doesn't matter all that much, but if String is
not special it'd be nice to move to the classpath version which seems
to be much more thorough.

On Wed, Jul 3, 2013 at 3:43 PM, Mike Hearn <mike@plan99.net> wrote:
> Well, the issue is I'm not sure how to implement them correctly. I did a
> quick hack which involves using the existing methods that take charset names
> and just calling them with Charset.forName() but I seriously doubt this is
> really fully compatible or would pass the Java test suite. Perhaps it
> doesn't matter all that much, but if String is not special it'd be nice to
> move to the classpath version which seems to be much more thorough.
>
>
> On Tue, Jul 2, 2013 at 4:53 PM, Bryce McKinlay <bmckinlay@gmail.com> wrote:
>>
>> 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-03 13:43 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
     [not found]                       ` <CANEZrP1tLxpu818cFGdgma+RVL32yRJJUOyb5m8QF=mhTZVueg@mail.gmail.com>
2013-07-03 13:43                         ` Mike Hearn [this message]
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='CANEZrP1JEXSjTJ+q3OvzOt80+44wVdj=vY7fVUQNUgs=oELayw@mail.gmail.com' \
    --to=mike@plan99.net \
    --cc=aph@redhat.com \
    --cc=bmckinlay@gmail.com \
    --cc=java@gcc.gnu.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).