We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46688ab commit 7ae93c9Copy full SHA for 7ae93c9
src/dmd/target.d
@@ -790,6 +790,13 @@ extern (C++) struct Target
790
{
791
if (global.params.isWindows)
792
793
+ // Win64 special case: by-value for slices and delegates due to
794
+ // high number of usages in druntime/Phobos (compiled without
795
+ // -preview=in but supposed to link against -preview=in code)
796
+ const ty = t.toBasetype().ty;
797
+ if (ty == Tarray || ty == Tdelegate)
798
+ return false;
799
+
800
// If size is larger than 8 or not a power-of-2, the Win64 ABI
801
// would require a hidden reference anyway.
802
return size > 8
0 commit comments