Skip to content

Conversation

aviatesk
Copy link
Member

Trying to prototype a minimum compiler plugin system on top of #44197:

  • dynamic dispatch
  • OC-related segfaults
  • static dispatch

@aviatesk aviatesk marked this pull request as draft April 12, 2022 09:11
Base automatically changed from jb/ircode2oc to master April 28, 2022 22:26
@MasonProtter
Copy link
Contributor

What is needed to make progress on this PR?


# TODO more composable way
global PLUGIN_INTERPRETER::AbstractInterpreter = NativeInterpreter()
isplugin(interp::AbstractInterpreter) = let
Copy link
Contributor

@MasonProtter MasonProtter May 7, 2023

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.

Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants