public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: Project Archer <archer@sourceware.org>
Subject: Re: [RFC] Koenig lookup patch 2
Date: Thu, 30 Apr 2009 00:19:00 -0000	[thread overview]
Message-ID: <m3iqkndmck.fsf@fleche.redhat.com> (raw)
In-Reply-To: <49F87751.8050405@redhat.com> (Sami Wagiaalla's message of "Wed\, 29 Apr 2009 11\:50\:41 -0400")

>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:

Sami>     Recommit: Added support for ADL function lookup. Patch 2.

Thanks.

Sami>        * c-exp.y: Created token UNKOWN_NAME.

FYI, a typo in the ChangeLog -- missing an "N".

A couple quick notes.  I don't have time to pick nits... there were
some formatting issues and whatnot -- these have to be fixed but are
not very important overall.

Sami> @@ -2083,9 +2086,37 @@ find_overload_match (struct value **argvec, int nargs,

With the current code is there a need to have the values here?
Or could this be reverted to the trunk's approach?

Sami> +  for (ix = 1; ix <= nargs; ix++){
Sami>      arg_types[ix - 1] = value_type (argvec[ix]);

BTW, my earlier note about needing the formal types was in error.
I think GDB really only deals in formal types, unless it does special
work to find the dynamic type.

Sami> +        if(cindex != NULL){
Sami> +          prefix_len = (int)(cindex - type_name) - 1;
Sami> +          prefix = alloca(prefix_len+1);
Sami> +          strncpy(prefix, type_name, prefix_len);
Sami> +          prefix[prefix_len] = '\0';
Sami> +
Sami> +          concatenated_name = alloca (strlen (prefix) + 1 + strlen (name) + 1);
Sami> +          strcpy(concatenated_name, prefix);
Sami> +          strcat(concatenated_name, "::");
Sami> +          strcat(concatenated_name, name);

This could be reduced to a single allocation.

Sami> +          fsym = lookup_symbol(concatenated_name,NULL, VAR_DOMAIN, (int *) NULL);

Does this really do the right thing in the case where the call has
multiple arguments, each of which has a type from a different
namespace?  I don't understand how those would get added to the
overload set.

Tom

  reply	other threads:[~2009-04-30  0:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 19:58 [RFC] Koenig lookup patch Sami Wagiaalla
2009-03-13 22:10 ` Tom Tromey
2009-03-17 18:39   ` Sami Wagiaalla
2009-03-17 21:25     ` Tom Tromey
2009-04-29 15:51   ` [RFC] Koenig lookup patch 2 Sami Wagiaalla
2009-04-30  0:19     ` Tom Tromey [this message]
2009-08-27 14:35       ` Sami Wagiaalla
2009-08-27 21:49         ` Tom Tromey
2009-10-14 20:29           ` [RFC] Koenig lookup patch 3 Sami Wagiaalla
2009-10-14 21:01             ` Sami Wagiaalla
2009-10-15 20:48               ` Tom Tromey
2009-11-02 19:11                 ` Sami Wagiaalla
2009-11-09 19:29                   ` Tom Tromey
2009-11-17 16:04                     ` Sami Wagiaalla
2009-11-17 20:51                       ` Tom Tromey

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=m3iqkndmck.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=swagiaal@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).