Bug 4719 – Clean up associative array runtime interface to enable precise GC

Status
REOPENED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-08-24T01:58:57Z
Last change time
2024-12-13T17:53:03Z
Keywords
patch
Assigned to
No Owner
Creator
nfxjfg
Blocks
3463
Moved to GitHub: dmd#18294 →

Comments

Comment #0 by nfxjfg — 2010-08-24T01:58:57Z
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.
Comment #1 by nfxjfg — 2010-09-09T06:55:48Z
Posted a patch for this in issue 3463. Adding patch keyword.
Comment #2 by leandro.lucarella — 2011-01-06T19:57:14Z
Hi, did you received an definitive official negative answer about this, or you're just assuming it will never happen as with most changes that doesn't come from people that usually don't agree with Walter? :)
Comment #3 by braddr — 2011-01-06T20:42:30Z
No, he just trashed bugzilla by closing all the bugs he filed as won't fix. I'm reopening them.
Comment #4 by robert.schadek — 2024-12-13T17:53:03Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18294 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB