Conversation
|
Thanks for your pull request and interest in making D better, @TurkeyMan! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2309" |
20f8499 to
796137b
Compare
Really? We're rolling ancient compilers here? :( |
The auto-tester builds with VS2013, string_view was added in VS2017. |
796137b to
974509f
Compare
|
Removed the Win64 test. I'll add it back whenever the auto-tester can run it. |
|
This is done. Can has review? |
418ea36 to
65c0cbd
Compare
|
This is super-useful, because can finally pass D-strings between D/C++ with no local hacks! |
65c0cbd to
2f4162e
Compare
Oh FFS... these testers are all vintage machines! >_< We just have to trust that this one works, since CI can't run any of the tests (they work for me locally!) |
2f4162e to
8cc8116
Compare
4921101 to
2fe690c
Compare
|
Please rebase |
2fe690c to
5c08f1e
Compare
|
Difficult to test, because very few CI machines support C++17, including the Windows CI machines... |
|
Hmm, clearly some of them do. Why do we not have Appveyor for druntime? Then you could disable the autotester's windows builds and rely on that instead. |
|
I think we might just need to merge this on faith until all the CI machines get with the now.. I use it locally, people will report bugs if it doesn't work, but honestly, it will likely get VERY low usage in the short term, since it's not that common even in C++ yet. |
|
Ahh I see that you haven't enabled the test. |
|
This is pretty critical for D interaction though; it allows you to pass string slices to/from D. This is the C++ slice ABI that people keep complaining we need to have. |
|
Heh, I'd love to get |
|
Yeah, it would be nice... but if we have |
|
Remove |
|
Done. Ping me when you're ready. |
The problem is that the ABI for D strings and a struct with a corresponding layout doesn't match on Windows. D strings are passed in registers but not structs. So we would need to change the ABI as well in addition to the mangling for |
|
Sadly, the struct ABI is less efficient than the register pair. I would discourage changing the ABI, and instead, just use some other proxy struct in the argument list instead (ie, std::string_view, or std::span?) |
Are those structs treated specially by the compiler to better optimize? |
|
No. They will perform the same as if you remove D's slice ABI optimisation. I'm saying, don't change the slice ABI, just use another struct instead (perhaps these). |
|
I was thinking to change it only for |
|
And extern(C)? |
I didn't think of that. There's no mangling for C functions so the mangling problem doesn't exist there. But the ABI mismatch does, I guess. |
|
I think most perf loss can be averted with (cross language) LTO |
|
VS LTO is not supported by any 3rd party toolchains. |
|
Of course,grumble,grumble. It does work fine for LDC/Clang and I presume GDC/G++. |
No description provided.