This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Koenig lookup patch 2

>>>>> "Sami" == Sami Wagiaalla <> writes:

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]