www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7008] New: Associative array ABI is under-specified

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7008

           Summary: Associative array ABI is under-specified
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: websites
        AssignedTo: nobody puremagic.com
        ReportedBy: jlquinn optonline.net



---
The current ABI describes associative arrays as an opaque type.
However, for a debugger to work with them, it must understand the
structure.  For 2 compilers to be able to generate compatible code, they must
agree on the structure.  Currently the ABI specifies an AA as an opaque
implementation-defined type.

This means that multiple compilers will not be able to guarantee compatibility
since the AA ABI is not specified.  Also, debuggers must refer to the source
code of the compiler druntime in order to know how to work with the contents of
an AA.

Specifying C functions to manipulate the opaque pointer solves the debugger
issue, but not the issue of ensuring compatibility across compilers.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 25 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7008


dawg dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dawg dawgfoto.de



The functions are only partly helpful for a debugger.

IMHO we should switch completely to using
AssociativeArray from object.
The current situation of using it only in
certain cases is messy.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 26 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7008


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com



20:48:29 PST ---
Being an opaque pointer means that the implementation of associative arrays is
entirely up to the runtime, not the compiler. The compiler should emit no
dependencies on how it is implemented.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 26 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7008




---

 Being an opaque pointer means that the implementation of associative arrays is
 entirely up to the runtime, not the compiler. The compiler should emit no
 dependencies on how it is implemented.
To make this work, the compiler has to have a documented interface to the AA. I feel we need a documented set of calls that will be output by the compiler, just as $ is documented as being translated to length. At the moment, the only documentation is "read this file in druntime". It's not a guarantee of how the compiler-AA interface works. Without the guarantee another compiler cannot safely generate compatible code, and debuggers can't be guaranteed to know how to look at the contents of the AA. Am I missing something in this request? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 11 2011