-
-
Notifications
You must be signed in to change notification settings - Fork 420
Conversation
Thanks for your pull request and interest in making D better, @edi33416! 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#2506" |
If you want this to be replaced with templates, is there any reason to do this refactoring? Will more of the code now be reusable if/when this code is replaced with templates? |
Since I had, at one time, an interest in reducing druntime's dependency on I'm not sure what's motivating this PR. It appears to be simply reducing some boilerplate and increasing code re-use. That's fine, but that does not address the fundamental issue with The fundamental problem with druntime's use of void main()
{
auto bArray = new byte[5];
bArray.length = 8; // gets lowered to `_d_arraysetlengthT`
}
Although it was before my time, my understanding for why things are currently implemented with runtime There is another problem, however, when converting these runtime hooks to templates. In the compiler, the lowerings are performed after the semantic phase in e2ir.d. This means that currently, for example, setting the length of a dynamic array can be done in a So, I don't know what's motivating this PR, but it doesn't seem to address the fundamental problem with |
/** | ||
* TypeInfo support code. | ||
* | ||
* Copyright: Copyright Digital Mars 2004 - 2009. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update year to 2019
private template Array(T) | ||
if (isIntegralTypeInfoT!T) | ||
{ | ||
bool equals(T[] s1, T[] s2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally there'd be some @trusted
here and stuff.
Codecov Report
@@ Coverage Diff @@
## master #2506 +/- ##
==========================================
+ Coverage 73.7% 74.38% +0.67%
==========================================
Files 146 137 -9
Lines 16607 16426 -181
==========================================
- Hits 12241 12219 -22
+ Misses 4366 4207 -159
Continue to review full report at Codecov.
|
This is a first step towards refactoring TypeInfo_Array. Ideally, imho, we would replace all the inheritance chain with templates.