-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
wip: scratch compiler plugin #44950
base: master
Are you sure you want to change the base?
wip: scratch compiler plugin #44950
Conversation
What is needed to make progress on this PR? |
|
||
# TODO more composable way | ||
global PLUGIN_INTERPRETER::AbstractInterpreter = NativeInterpreter() | ||
isplugin(interp::AbstractInterpreter) = let |
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.
Couldn't we just write
isplugin(interp::AbstractInterpreter) = false
and then when someone writes a plugin, they add an overload
CC.isplugin(interp::MyInterpreter) = true
I tested this locally and it appears to work.
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.
Ah I see the problem, this doesn't work with your way of dealing with dynamic dispatch. Is that the background for #46220 then?
Trying to prototype a minimum compiler plugin system on top of #44197: