690 – ABI not fully documented

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 690 - ABI not fully documented
Summary: ABI not fully documented
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 blocker
Assignee: Walter Bright
URL: http://www.digitalmars.com/d/abi.html
Keywords: spec
Depends on:
Blocks: 677 3105
Show dependency tree / graph
Reported: 2006年12月16日 20:44 UTC by Stewart Gordon
Modified: 2014年02月15日 13:28 UTC (History)
3 users (show)

See Also:
smjg: d1.0blocker?


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Stewart Gordon 2006年12月16日 20:44:55 UTC
There are still many instances of "TBD" in the ABI. These need to be replaced with real documentation.
Comment 1 Tomas Lindquist Olsen 2008年09月15日 09:32:52 UTC
This is a blocker for LLVMDC. We need proper ABI documentation or it's impossible to live up to Don's pretty agressive stance on how ABI incompatibility basically creates a new language.
Not only is there a bunch on TBD's scattered all over it, it also has contradictory information, as well as differences to the actual code generated by DMD.
Comment 2 Walter Bright 2009年03月01日 04:39:50 UTC
I fleshed out all the TBDs. As you find other problems with it, please add specifics to this report.
Comment 3 Stewart Gordon 2009年03月01日 08:21:31 UTC
On a quick look, I've found one thing that's puzzling me. In the ABI for interfaces, where does the object pointer itself come in?
Comment 4 Tomas Lindquist Olsen 2009年03月01日 08:29:35 UTC
I think there should be some notes on what happens inside the class when an interface is implemented. It took some serious trial and error to get this working in LDC (we even fixed some issues DMD still has), but I'm not sure we're ABI compatible.
Comment 5 Tomas Lindquist Olsen 2009年03月01日 08:36:41 UTC
especially cases where multiple interfaces are implemented but each of these interface inherit the same base interface. also derived classes reimplementing an interface etc... all these special cases should be documented, as I already said, I spent a long time looking through the DMD sources and testing things on DMD/LDC, doing obj2asm and so on to get to something that *seems* to work identically!
Comment 6 Jerry Quinn 2009年03月11日 23:45:08 UTC
I would argue that associative arrays need more definition than "pointer to opaque type". If a compiler compiles a source file with an assoc array, and another compiler generates a reference to it, how will the 2nd compiler know how to use it?
An API is needed to make this happen. Because assoc arrays are part of the core language, there needs to be a shareable interface, even though it can allow for different definitions. Only then can one compiler use the assoc array generated by another compiler, if they don't share the same core runtime library.
Comment 7 Walter Bright 2009年03月12日 03:57:22 UTC
What issues does DMD still have with interfaces? Did you fix the dmd source?
Comment 8 Brad Roberts 2009年06月07日 15:56:03 UTC
This bug needs to gain some specifics or, preferably, be broken into several smaller bugs. It's been open for a long time and it's not clear exactly what's left to be done.
Thomas, the last comment was directed to you to add specifics about what LDC had done or changed related to interfaces.
Comment 9 Tomas Lindquist Olsen 2009年06月08日 03:10:48 UTC
I'm not sure about the interface differences anymore, I think they might be fixed in DMD, in any case we didn't change the frontend code, just the backend.
However, what happens when a class implements an interface is still not described in the spec. Especially the cases where multiple interface inheritance is involved, and the case where an interface is reimplemented, are not specified.
Comment 10 Walter Bright 2010年11月08日 18:11:50 UTC
http://www.dsource.org/projects/phobos/changeset/2139
Not perfect, but better.


AltStyle によって変換されたページ (->オリジナル) /