Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb@sourceware.org
Subject: Re: plan: VLA (Variable Length Arrays) and Fortran dynamic types
Date: Thu, 29 Nov 2012 22:09:00 -0000	[thread overview]
Message-ID: <20121129220907.GN3540@adacore.com> (raw)
In-Reply-To: <874nk83wok.fsf@fleche.redhat.com>

> 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


  reply	other threads:[~2012-11-29 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 14:49 Jan Kratochvil
2012-11-29 21:51 ` Tom Tromey
2012-11-29 22:09   ` Joel Brobecker [this message]
2012-11-30 15:50   ` Jan Kratochvil

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=20121129220907.GN3540@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@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