Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA]: Make class_name_from_physname part of language vector
Date: Thu, 17 Jun 2004 02:18:00 -0000	[thread overview]
Message-ID: <20040617021814.GA23443@nevyn.them.org> (raw)
In-Reply-To: <40A5583B.7030802@redhat.com>

On Fri, May 14, 2004 at 07:37:31PM -0400, Jeff Johnston wrote:
> Index: jv-lang.c

> +  /* P now points at the `)' at the end of the argument list.  Walk
> +     back to the beginning.  */
> +  p--;
> +  depth = 1;
> +  while (p > name && depth > 0)
> +    {
> +      if (*p == '<' || *p == '(')
> +	depth--;
> +      else if (*p == '>' || *p == ')')
> +	depth++;
> +      p--;
> +    }
> +
> +  if (p == name)
> +    return NULL;
> +
> +  while (p > name && *p != '.')
> +    p--;

You've left in a lot of hokery from the C++ support which I'm
reasonably confident Java does not need.  I don't believe that Java
mangled names will ever have templates, or classes nested inside of
functions, or multiple argument lists - no depth at all.  Also, I'd
appreciate it if you called it something other than
find_last_component; the C++ version shouldn't have such a generic name
either, IMO.

Otherwise this looks fine.

-- 
Daniel Jacobowitz


  parent reply	other threads:[~2004-06-17  2:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 23:37 Jeff Johnston
2004-06-11 17:49 ` Jeff Johnston
2004-06-17  2:18 ` Daniel Jacobowitz [this message]
2004-07-05 20:21 Jeff Johnston
2004-07-05 21:50 ` Daniel Jacobowitz
2004-07-05 23:50   ` Jeff Johnston
2004-07-06 14:29     ` Daniel Jacobowitz
2004-07-06 19:29       ` Jeff Johnston

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=20040617021814.GA23443@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.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