-
-
Notifications
You must be signed in to change notification settings - Fork 13
Replace Runtime Hooks with Templates #25
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
Comments
this is being worked on by Dan Printzell during GSoC 2019 |
CC @Vild |
@Vild maybe you can share what is the status of this project so that future contributors know where to pick it up from. |
I haven't had time to work on this for a long while now due to school, so I haven't been able to finish my "information extraction" document, but most important parts are there: https://github.com/Vild/GSOC2019/blob/master/TechnicalInformationExtraction/TechnicalInformationExtraction.org Generally the changes I've done contains hacks around security features. size_t a() pure {
int[] a;
a.length = 10;
return a.length;
} The array lengths setting is lowered to But even with all of this hacks it does not decrease the safety of how it was before, as the underlining code is (often) the same. I want to continue on my WIP druntime & dmd PRs, but I don't know when I will have time to invest on fixing them. So anyone can feel free to continue working on them. Generally what you need to do to translate a hook:
I would guess that most hook (if not all) should be moved to use a template entrypoint, that still calls the old hook function, before trying to rewrite the hook code. As there is a lot of usage of |
Given that this project has been ongoing for a few years now and is nearly completed, there's no reason for it to be on this list anymore. |
D’s betterC mode is an important tool to be able to use D on bare-metal and embedded platforms. By disabling, for example the class support, the compiles does not need to as many runtime functions and types to be implemented for the code to compile and link. This makes the life of a bare-metal developer much easier.
But there is a catch! A lot of the language features runtime hooks, which in turn requires the TypeInfo class to be able to function. One way of solving both of these problems is by moving runtime hooks to use templates instead. This solves the betterC by removing the dependency of classes (the TypeInfo class), and it solves the safety issue because now the compiler will have all the information about the hook and it can verify it itself and not just trust that the runtime developer remembered to mark the hook correctly.
This proposal will work on translating all the array hooks from using the TypeInfo class to templates.
Point of contact: @RazvanN7
The text was updated successfully, but these errors were encountered: