Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the Clava weaver architecture to support multiple concurrent weaver instances by eliminating static singleton patterns. The main change is threading a CxxWeaver instance through all joinpoint constructors and factory methods instead of relying on static getCxxWeaver() calls.
Changes:
- Refactored all joinpoint classes to accept and store a
CxxWeaverinstance in their constructors - Updated
CxxJoinpointsfactory to use instance methods instead of static singleton access - Modified TypeScript API layer to pass weaver instance from
Weaver.getWeaverEngine()to all factory methods - Updated GitHub workflows to use improved branch selection logic and updated dependencies
Reviewed changes
Copilot reviewed 115 out of 115 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| CxxWeaver.java | Removed static getCxxWeaver() method, made factory methods non-static |
| CxxJoinpoints.java | Changed from FunctionClassMap to BiFunctionClassMap to accept weaver parameter |
| ACxxWeaverJoinPoint.java | Added constructor requiring weaver, updated to use instance methods |
| AstFactory.java | All factory methods now require weaver as first parameter |
| CxxActions.java | Updated to pass weaver instance through action methods |
| All Cxx* joinpoint classes | Constructors updated to accept and pass weaver to parent classes |
| ClavaJoinPoints.ts | All factory methods updated to pass Weaver.getWeaverEngine() |
| Clava.ts | API calls updated to pass weaver instance |
| package.json | Dependency versions updated |
| GitHub workflows | Improved branch selection logic with fallback to PR target or default branch |
| core.ts | Removed (legacy compatibility file) |
| AstNodes.js | Removed unused Ast API test code |
| public static AExpression doubleLiteral(String floating) { | ||
| return doubleLiteral(Double.parseDouble(floating)); | ||
| public static AExpression doubleLiteral(CxxWeaver weaver, String floating) { | ||
| return doubleLiteral(weaver, Double.parseDouble(floating)); |
There was a problem hiding this comment.
Potential uncaught 'java.lang.NumberFormatException'.
| public static AExpression integerLiteral(String integer) { | ||
| return integerLiteral(Integer.parseInt(integer)); | ||
| public static AExpression integerLiteral(CxxWeaver weaver, String integer) { | ||
| return integerLiteral(weaver, Integer.parseInt(integer)); |
There was a problem hiding this comment.
Potential uncaught 'java.lang.NumberFormatException'.
- Updated constructors in joinpoint classes to accept CxxWeaver as a parameter. - Modified method calls to CxxJoinpoints.create to pass the weaver engine where necessary. - Enhanced the integration of the weaver engine in the joinpoint creation process, ensuring better management of joinpoints in the Clava framework.
…WeaverJoinPoint.java
cbe3ed2 to
4eaf44d
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.