-
Notifications
You must be signed in to change notification settings - Fork 323
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
[PoC] Generate IR definitions with annotation processor #11267
Draft
Akirathan
wants to merge
73
commits into
develop
Choose a base branch
from
wip/akirathan/java-ir
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
6e33120
Add parser-dsl and parser-processor projects
Akirathan 69f9247
Add JModule
Akirathan 0e4ceb0
Fix module declaration - no compiler module dependency
Akirathan 9891eb7
Add annotation processor testing.
Akirathan a3bf203
Rewrite some IR elements to IRNode annotated interfaces
Akirathan 08b0571
IRProcessor does some sanity checks
Akirathan 51796ba
IRNode does not have name parameter
Akirathan 3ea7a90
IRProcessor generates source file for record
Akirathan f6bf733
Add imports and overriden IR methods to generated record
Akirathan 1870ef2
Add field processing
Akirathan 826245d
IRProcessor generates classes, not records
Akirathan fc89b3d
IRProcessor generates overrides for user-defined parameterless methods
Akirathan 1fc0497
Add Field.isExpression method
Akirathan d2bb8c3
sbt picks up Scala case classes generated by Java annotation processor
Akirathan 68a070b
IRProcessor generates Scala classes.
Akirathan cf08781
Revert "sbt picks up Scala case classes generated by Java annotation …
Akirathan f930e53
Revert "IRProcessor generates Scala classes."
Akirathan 298c883
IRProcessor handles primitive fields
Akirathan bc1e9c9
Remove unused methods
Akirathan ef05c64
IRProcessor fails fast
Akirathan aa0a5b6
IRProcessor can collect fields from super interfaces
Akirathan c6def78
Fix collecting fields from super interfaces.
Akirathan 8cea491
Prepare IRNodeProcessor for processing multiple nested interfaces
Akirathan f5cb331
IRNodeProcessor handles multiple nested interfaces
Akirathan 2393e18
runtime-parser-processor does not depend on runtime-parser
Akirathan cf1d079
Move parser processor tests to a separate project
Akirathan f63bda1
runtime-parser-processor does not depend on runtime-parser
Akirathan 158a4f1
runtime-parser depends on runtime-parser-processor
Akirathan 1289374
IRProcessor adds package
Akirathan 73a9d31
ParserDependenciesTest ensures that IRNodeProcessor is on class path
Akirathan be4396c
runtime-parser-processor module provides annotation processor service
Akirathan 3665232
Fix getSimpleTypeName in ReferenceField
Akirathan 260d11d
No nested @IRNode annotation
Akirathan df95a4e
JModule extends IR
Akirathan 7918fd2
IRNodeProcessor handles parametrized List child
Akirathan 9ae8e3f
runtime-parser-processor-tests runs with enabled assertions
Akirathan cf264cf
Test IRNode with List of children
Akirathan 0f21885
All IR interfaces use scala list, not java.util.List
Akirathan 18b2d10
Do not process already overriden methods
Akirathan 26239a3
Enable IRProcessor in runtime-parser
Akirathan 9c3a580
Ensure that only fields from current interface and its super interfac…
Akirathan c6b1987
Implement passData, location and diagnostics methods
Akirathan 399ca43
Override duplicate method
Akirathan 7a97c61
Fix duplicate method generation
Akirathan 8acfa30
Move duplicate method generation to a separate class
Akirathan 7988276
Duplicate method duplicates also non-child fields
Akirathan c84ebb7
Simplify tests
Akirathan 8a778f0
During runtime-parser-processor-test compilation, IRNodeProcessor runs
Akirathan 86d1b0e
docs
Akirathan 8aa64bd
Add some IR interfaces to the testing code
Akirathan e91f09e
test generated list children
Akirathan dd34e5d
DuplicateMethodGenerator duplicates also meta fields
Akirathan 2a2b6d3
Builder allows setting meta fields
Akirathan 7def7b1
Add tests for duplicated metadata
Akirathan 66aba89
Add runtime-parser-processor-tests to the enso aggregate
Akirathan f6b75ed
Add IRCopyMethod annotation
Akirathan 9bccf1c
Iteration over super interfaces is handled only via SuperInterfaceVis…
Akirathan f027307
Simplify super interface iteration
Akirathan 687d0e1
Builder has a copy constructor
Akirathan bd9b7e4
Implement CopyMethodGenerator
Akirathan 98f4743
Fix all tests
Akirathan 92d9004
Test copy method generation
Akirathan 69728be
Do not try to override static or default methods
Akirathan 7709597
docs
Akirathan 7d012fe
Allow multiple copy methods
Akirathan cb06f03
CopyMethodGenerator generates copy method with correct order of param…
Akirathan c08c035
Test valid parameter names for copy method
Akirathan 43ed045
More tests
Akirathan 69258cf
Generate mapExpressions method
Akirathan f888cee
Add mock definition of JCallArgument
Akirathan 57c5bff
Use qualified type names in mapExpressions method
Akirathan be2d374
Implement JBlank.create factory method
Akirathan b828603
JExpression overrides duplicate and mapExpressions
Akirathan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
engine/runtime-parser/src/main/java/org/enso/compiler/core/ir/JExpression.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These sample
JXyz
interfaces should probably be moved outside of real code to tests. To separate what is demo and what is the supposed to be the production code.