[Issue 4719] New: Clean up associative array runtime interface to enable precise GC
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 24 01:59:06 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4719
Summary: Clean up associative array runtime interface to enable
precise GC
Product: D
Version: D1 & D2
Platform: Other
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: nfxjfg at gmail.com
--- Comment #0 from nfxjfg at gmail.com 2010-08-24 01:58:57 PDT ---
Currently, the AA implementation (in aaA.d) has no way of knowing what the type
of an AA is. All it gets is the key TypeInfo and the value type's size. This
makes precise GC impossible. (Issue 3463 has a compiler patch that adds pointer
bitmaps to TypeInfo. The AA implementation needs these to allocate the AA data
in a way that enables precise scanning.)
This enhancement suggests to clean up the AA runtime interface, that consists
of functions starting with "_aa" (e.g. _aaGet). All of these functions should
carry a TypeInfo_AssociativeArray reference as parameter.
Note that would actually _reduce_ the number of parameters these runtime
functions typically have, which I find funny.
There may be compatibility concerns. This is simple to solve: the compiler can
just define a new version symbol to signal that a new AA ABI is used. Or if
actual binary compatibility with old code is desired, the old interface could
be emulated in aaA.d by still providing the old functions; the new interface
would use different function names.
PS: not attempting to write a patch, because even if this enhancement gets
accepted, Walter most likely would rewrite the patch himself.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list