This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Logical short circuiting with argument lists
- From: Tom Tromey <tom at tromey dot com>
- To: Richard Bunt <richard dot bunt at arm dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org, nd at arm dot com
- Date: Wed, 12 Sep 2018 05:38:31 -0600
- Subject: Re: [PATCH v2] Logical short circuiting with argument lists
- References: <79494820-f795-ad3c-8546-0ad288cd05b0@arm.com> <87mustueua.fsf@tromey.com> <2fd31db3-e0f7-262b-6b30-bd7a78cbabbf@arm.com>
>>>>> "Rich" == Rich Bunt <richard.bunt@arm.com> writes:
>> Though, another option is to do this in a fortran-specific way.
Rich> Are you able to provide some more details on this approach please?
Sure. Each language provides its own evaluation function. These
functions can change the interpretation -- or even, in collusion with
the language's expression parser the layout in memory -- of a given
opcode. Most languages just defer to the generic evaluator.
E.g., look at rust-lang.c:rust_evaluate_subexp. It changes UNOP_IND to
handle Rust trait objects, among other things.
Fortran doesn't have one of these as f_language_defn refers to
exp_descriptor_standard.
The whole expression data structure and approach is bad and should be
rewritten.
Anyway, doing this may be overkill, unless we think of some downside to
your approach.
Rich> However, if I had used a space between the array symbol name
Rich> and the parenthesizes this would have been a problem. This is
Rich> useful to know.
Yeah. A bit subtle for my taste, I feel certain I'll break this rule by
accident.
Tom