There are still many instances of "TBD" in the ABI. These need to be replaced with real documentation.
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.
I fleshed out all the TBDs. As you find other problems with it, please add specifics to this report.
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?
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.
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!
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.
What issues does DMD still have with interfaces? Did you fix the dmd source?
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.
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.
http://www.dsource.org/projects/phobos/changeset/2139 Not perfect, but better.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル