---------- Forwarded message ----------
From:
Bishop, John E <john.e.bishop@intel.com>
Date: 26 March 2012 21:11
Subject: DWARF issue 100504, "Extensions for D arrays, associative arrays, and delegates"
To: "
robert@octarineparrot.com" <
robert@octarineparrot.com>
Robert,
I'm a member of the DWARF committee. In our last meeting, I was assigned the task of understanding your proposal and helping to turn it into a formal proposal (with page reference, edit directions and the final formal text).
If you don't mind, I'd like to know a bit more about the background of the proposal.
For example, are you working with a compiler, a debugger or both? Are these concepts core features of D or standard user features (e.g., are they like Fortran COMMON, which is a core feature with important semantics or like Pascal WITH, which is a notational convenience)? Are these D features primitives (like C++'s "bool") or the result of composition (like "const long long int")?
As I understand your suggestion, I think it's possible to get the same effect with a smaller change to DWARF. For example we could add a new attribute and define dynamic array types this way:
DW_TAG_structure_type // A structure
DW_AT_D_language_dynamic_array_descriptor // Attribute tells consumer what this is
DW_AT_name [pointer to "darray"]
[specification of an size_t named "length"}
[specification of a T* pointer named "ptr"]
In other words, as though it were this C code but with the D-language flag added and something useful where I have "...":
typedef ... T;
typedef struct darray_struct {
size_t length;
T *ptr;
} darray;
Similarly we could add DW_AT_D_language_associative_array and DW_A_D_language_delegate to standard structure definitions.
Would this simpler proposal work as well for your purposes?
Thanks for any help you can give me,
-John