Remove unused rt.typeinfo.ti_AC#1782
Conversation
|
Can you please do the same for Typeinfo_ag? |
Done, actually just added it to this PR. |
|
Commit messages aren't very descriptive, grumble grumble. Doesn't matter here because they'll be squashed and the PR title will be used (I've updated that). |
|
I think |
|
I think @WalterBright meant just the |
|
@CyberShadow In my defense, the original commit was just a test, I was actually expecting to see compiler failures (well, much like there are now. Apparently ti_Ag.d is used). |
|
I'm looking to see where that reference is generated. |
|
I'm pretty sure nothing in the ti_Ag file would be possible without the |
|
It's |
Right :) |
|
Right, I'm just trying to find the special case in the compiler that generates it. |
|
Ah, found it in typinf.d: /* These decide if there's an instance for them already in std.typeinfo,
* because then the compiler doesn't need to build one.
*/
extern (C++) static bool builtinTypeInfo(Type t)
{
if (t.isTypeBasic() || t.ty == Tclass || t.ty == Tnull)
return !t.mod;
if (t.ty == Tarray)
{
Type next = t.nextOf();
// strings are so common, make them builtin
return !t.mod &&
(next.isTypeBasic() !is null && !next.mod ||
next.ty == Tchar && next.mod == MODimmutable ||
next.ty == Tchar && next.mod == MODconst);
}
return false;
} |
|
So... |
|
It may be better to have ti_Ag stay, and then remove it later if/when the "special case" is removed. |
|
Other option is to manually rewrite |
|
yeah, I agree. Worry about it later. |
|
@CyberShadow fixed the commit message ;) |
|
@WalterBright Do you want to make a bug report for the "special case", so it's not forgotten? |
|
I think there are more than just I can see a lot of green, and many of the |
FYI: CodeCov also provides a nice UI to browse the coverage of files: It can be reached via https://codecov.io/gh/dlang/druntime and then selecting a specific commit. https://codecov.io/gh/dlang/druntime/tree/86b0795f65e887d38dac33b175a7095d9c3a7437/src So there are a couple of other files that show up with 0% coverage - in some cases more rightfully than in others:
|
Can't find it anywhere in dmd sources, and it seems to have a non-standard implementation for comparison (lexicographical comparison is not used). Is it ever used? If so, this should show when it is.
DO NOT MERGE, this is only a test to see if it's even needed. If it's not needed, possibly we can merge this.Now, I'm pretty sure it's never used. I think we can drop this file and TypeInfo instance.