diff options
author | Keith Seitz <keiths@redhat.com> | 2009-11-10 22:17:58 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2009-11-10 22:17:58 +0000 |
commit | 072bba3b0f3e2ee8d2cfc94e256d0f0ebc627afc (patch) | |
tree | 85866ec9e0e9094885d8fd85f03e0bb96bbab06c /gdb/c-exp.y | |
parent | 85feb311d32bf996c4da799a89be375b31d1b3e7 (diff) | |
download | fsf-binutils-gdb-072bba3b0f3e2ee8d2cfc94e256d0f0ebc627afc.zip fsf-binutils-gdb-072bba3b0f3e2ee8d2cfc94e256d0f0ebc627afc.tar.gz fsf-binutils-gdb-072bba3b0f3e2ee8d2cfc94e256d0f0ebc627afc.tar.bz2 |
* c-exp.y: Add new rule for resolving method overloads.
* eval.c (make_params): New function.
(free_param_types): New function.
(evaluate_subexp_standard): Pass expect_type to value_aggregate_elt.
Handle case TYPE_INSTANCE.
(evaluate_subexp_for_address): Pass expect_type to value_aggregate_elt.
* expression.h (enum exp_opcode): Add TYPE_INSTANCE.
(compare_parameters): Add declaration.
* parse.c (operator_length_standard): Add TYPE_INSTANCE.
* valops.c (value_aggregate_elt): Add new expect_type parameter.
Pass expect_type to value_struct_elt_for_reference.
(value_struct_elt_for_reference): Add expect_type parameter and use
compare_parameters.
Check for overload matches with and without artificial parameters.
Skip artificial methods.
(compare_parameters): New function.
* value.h (value_aggregate_elt): Add new expect_type parameter.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 6d604c4..5dd47fb 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -401,6 +401,18 @@ arglist : arglist ',' exp %prec ABOVE_COMMA { arglist_len++; } ; +exp : exp '(' nonempty_typelist ')' const_or_volatile + { int i; + write_exp_elt_opcode (TYPE_INSTANCE); + write_exp_elt_longcst ((LONGEST) $<ivec>3[0]); + for (i = 0; i < $<ivec>3[0]; ++i) + write_exp_elt_type ($<tvec>3[i + 1]); + write_exp_elt_longcst((LONGEST) $<ivec>3[0]); + write_exp_elt_opcode (TYPE_INSTANCE); + free ($3); + } + ; + rcurly : '}' { $$ = end_arglist () - 1; } ; |