-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Support nocheck prefix #35491
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
Support nocheck prefix #35491
Conversation
Currently prefix has no behaviour, which is ECMA 335 compliant
|
I'd prefer if you didn't close the issue with a no-op implementation. Sure, it's ECMA-compliant and a good first step, but it does not really implement the feature I'm interested in. 😉 |
|
On a seperate branch I'm working on an actual functioning implementation. So far I've got the basic idea of range check elimination but it's hitting some assertions in morph |
|
At the moment, |
|
This is very interesting, and a language like F# could benefit greatly once this is implemented (meaning, if the nullcheck, rangecheck, typecheck are actually skipped). Esp the rangecheck is very beneficial, as in F# many code paths exist that are verifiably correct, but are not always optimized properly in JIT. The nullcheck is already skipped quite often by JIT, though it wouldn't hurt making this explicit in F# code, which has a lot non-nullable types. (I understand that, once this is implemented, such IL would not be verifiable itself, as the spec states.) |
|
Came back to this and managed to get |
|
Awesome stuff! |
|
@john-h-k this PR is getting a bit stale -- any plans to revive it, or should we close and revisit later? |
|
// Auto-generated message 69e114c which was merged 12/7 removed the intermediate src/coreclr/src/ folder. This PR needs to be updated as it touches files in that directory which causes conflicts. To update your commits you can use this bash script: https://gist.github.com/ViktorHofer/6d24f62abdcddb518b4966ead5ef3783. Feel free to use the comment section of the gist to improve the script for others. |
|
Sorry about that - been very busy. I'll revisit it on Friday night or Saturday and give an update on it when I do |
|
@john-h-k seems like maybe we should close this? |
|
I hope this could be resurrected, compilers could benefit greatly once this gets in. |
|
Draft Pull Request was automatically closed for inactivity. It can be manually reopened in the next 30 days if the work resumes. |
Resolves #10112
It is spec compliant, as it is just a hint, but right now it has no actual functionality (it is verified and immediately ignored). It needs test but I don't know how to write JIT tests yet
It does not allow multiple
no. prefixes, such asno. typecheck no. rangecheck ldelema- onlyno. typecheck | rangecheck ldelema