-
-
Notifications
You must be signed in to change notification settings - Fork 672
refactor intrinsic op #10656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor intrinsic op #10656
Conversation
|
Thanks for your pull request and interest in making D better, @thewilsonator! 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 + dmd#10656" |
735ed0a to
1ebb8fb
Compare
1ebb8fb to
6864f61
Compare
|
@thewilsonator - thanks, I always get mild irritation whenever I amend this list. ;-) |
|
Np problems. Next I suppose is the same thing in |
ibuclaw
left a comment
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.
Seems reasonable to me.
|
I agree this is easier to maintain than the list of mangled names and decoupled op arrays. It is dropping the check for function attributes and arguments, though. Is that unnecessary or can it cause trouble later on? |
Attributes, yes. Arguments, sometimes, when there is no 64-bit version available (either outright, or because we're targeting a 32bit CPU).
Modulo availability (described above), I think it is unnecessary. Also it should be easy to add back if for some reason it is determined to be important. |
| if (op == OPbsf || op == OPbsr ) { | ||
| //_D4core5bitop3bsfFNaNbNiNfxZi | ||
| // index of x == 26, m == ulong | ||
| if (mangleExact(fd)[26] == 'm') |
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.
If the attributes of core.bitop.bsf change, this might read garbage.
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.
Yeah I don't like that either, but its much faster than a strcmp and for some reason I couldn't get a type check on fd to do what I wanted: const bool isFirstArgUlong = fd.parameters && (*fd.parameters)[0].type == Type.tuns64;
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.
This PR already avoids a lot of string comparisons, so I think adding one is fine here. You could implement a small local endsWith to skip the attribute checks.
| int op = NotIntrinsic; | ||
| fd = fd.toAliasFunc(); | ||
| const char *name = mangleExact(fd); | ||
| if (fd.isDeprecated()) |
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.
Is this additional check necessary?
|
This broke EDIT: Reduced to |
|
Maybe we should revert this until we come up with a solution? Having our PR pipeline stalled for so long is counter-productive. |
The issues of this PR should be fixed by #10665. AFAICT the PR queue is plagued by networking issues. |
|
This caused a regression: https://issues.dlang.org/show_bug.cgi?id=20446 |
cc @ibuclaw
Since you were changing the intrinsic detection I thought I’d have one last crack at getting it to work like this.
Rebases #8942