This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: plan: VLA (Variable Length Arrays) and Fortran dynamic types


> I note that Ada already uses the concretizing approach.
> Maybe Joel could share their experiences with this.

We have been using this approach out of necessity. There are more
elegant ways to do this for sure, but we all know how much effort
it would take to implement them (a complete revamp of our type
structure, for instance).

Aside from that, it is actually pretty tricky to implement right,
because it's very easy to lose information.  Jerome and myself recently
spent at least a day of discussions and experimentation before we
figured out the correct way of dealing with Ada interface types. Things
also get tricky with respect to EVAL_AVOID_SIDE_EFFECT vs EVAL_NORMAL,
because, in avoid-side-effect mode, you don't have the data in order to
concretize the type.  There is also the problem of freeing the new
types, which may be taken care of, but may not be, and I haven't looked
at that myself (before my time).

Aside from that, it has the merit of existing, and it works pretty
well. If I was starting from scratch and I had an infinite amount
of time, I'd design a type structure that allows us to express
the dynamic characteristics of a given object.

-- 
Joel


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