Skip to content
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

Generate IR definitions by annotation processor #11498

Closed
Akirathan opened this issue Nov 6, 2024 · 13 comments
Closed

Generate IR definitions by annotation processor #11498

Akirathan opened this issue Nov 6, 2024 · 13 comments
Assignees

Comments

@Akirathan
Copy link
Member

In the current definition of the IR, there is a hierarchy of traits and case classes. Majority of the code inside these case classes is highly repetitive.

There is PoC in #11267 that already contains the definitions of the annotations and the processor.

The ultimate goal of this task is to:

  • Replace the Scala trait hierarchy with Java interface hierarchy
  • Replace Scala case classes by automatically generated Java classes.
  • Ensure that all the changes are compatible, that is, all the code inside runtime-compiler that manipulates with IR either stays completely the same, or is changed just cosmetically, like adding few more named arguments to a method call that previously had a default value.
@Akirathan
Copy link
Member Author

Initial step: Which specific IR element should get reimplemented via these annotations and estimate

@Akirathan
Copy link
Member Author

To prove that the generated IR elements can work, let's start with migrating the simplest possible IR element: Empty. The new implementation with annotations is in Empty.java. I will try to fix all the tests if that is simple enough.

@JaroslavTulach JaroslavTulach moved this from ⚙️ Design to 🔧 Implementation in Issues Board Dec 3, 2024
@enso-bot
Copy link

enso-bot bot commented Dec 3, 2024

Pavel Marek reports a new STANDUP for today (2024-12-03):

Progress: - Figuring out the very first step in the PoC PR: Migrate CallArgument It should be finished by 2024-12-15.

@enso-bot
Copy link

enso-bot bot commented Dec 4, 2024

Pavel Marek reports a new STANDUP for today (2024-12-04):

Progress: - Example of generated class published as gist - #11267 (comment)

@enso-bot
Copy link

enso-bot bot commented Dec 5, 2024

Pavel Marek reports a new STANDUP for today (2024-12-05):

Progress: - Revamped the implementation to the superclass approach.

@enso-bot
Copy link

enso-bot bot commented Dec 11, 2024

Pavel Marek reports a new STANDUP for yesterday (2024-12-10):

Progress: - Generated super class should be abstract.

  • Continue migration of CallArgument.Specified. It should be finished by 2024-12-15.

@enso-bot
Copy link

enso-bot bot commented Dec 24, 2024

Pavel Marek reports a new STANDUP for today (2024-12-24):

Progress: - Generated super class is abstract

@enso-bot
Copy link

enso-bot bot commented Dec 27, 2024

Pavel Marek reports a new STANDUP for today (2024-12-27):

Progress: - Small refactoring of pattern matches - #11943

  • Will make migration of CallArgument.Specified much easier It should be finished by 2025-01-10.

@enso-bot
Copy link

enso-bot bot commented Dec 30, 2024

Pavel Marek reports a new STANDUP for today (2024-12-30):

Progress: - The huge PR #11770 is now ready for review - I have managed to migrate CallArgument.Specified to the generated Java class. It should be finished by 2025-01-10.

@enso-bot
Copy link

enso-bot bot commented Jan 3, 2025

Pavel Marek reports a new STANDUP for today (2025-01-03):

Progress: - Generate jsut a single constructor matching subtype's ctor.

  • Generate copy method
  • Formatting: Prefer simple names in the generated code.
  • Locally, all tests in runtime-integration-tests passes, seems like we will be able to integrate soon. It should be finished by 2025-01-10.

@enso-bot
Copy link

enso-bot bot commented Jan 8, 2025

Pavel Marek reports a new STANDUP for the provided date (2025-01-06):

Progress: - Fixing issues with publishM2 task, comparing benchmarks. It should be finished by 2025-01-10.

@enso-bot
Copy link

enso-bot bot commented Jan 8, 2025

Pavel Marek reports a new STANDUP for today (2025-01-08):

Progress: - Still fixing some issues with publishM2 task.

@Akirathan
Copy link
Member Author

Done in #11770

@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🟢 Accepted in Issues Board Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🟢 Accepted
Development

Successfully merging a pull request may close this issue.

1 participant