Lang spec v3 - #244
Conversation
…ld steps for Clava and Lara-JS
Checkouts correct branch of specs-java-libs
… generator. This is a massive (but imcomplete) commit. - Replaced the old XML-based Language Specification with the new Java embedded-DSL one. - Updated joinpoint concrete classes to extend their respective abstract classes with a generic CRTP pattern Self type parameter. - Simplified concrete types by having a single direct class hierarchy enforced by the generator. - Concretes no longer declare the node field. That is done in the basae abstract jp in LARA. - Refactored methods to use getNodeImpl() for consistency in accessing underlying AST nodes. - Updated ClavaDirective and ClavaPragmas to use the new AJoinpoint interface. - Adjusted ClavaAstMethods to accommodate changes in JoinPoint interface.
…rchy and the generator.
…vaException import
…ing' from actions into attributes.
… to escape forbidden Java keywords.
… a few type casting problems. They warrant further analysis.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7466f14582
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| retVal.detach(); | ||
| const op1 = ClavaJoinPoints.binaryOp( | ||
| "=", | ||
| OpKind.eq, |
There was a problem hiding this comment.
Use assignment operators for outlined return plumbing
When outlining a region containing a value-returning statement, OpKind.eq generates *result == returnValue instead of the previous assignment. The second OpKind.eq below likewise compares rather than setting the return flag, so the caller never observes the outlined return and may continue with an uninitialized result. Both operators need to remain assignments (OpKind.assign).
Useful? React with 👍 / 👎.
| case "replace": | ||
| NodeInsertUtils.replace(function, newNode); | ||
| return new AJoinPoint[]{CxxJoinpoints.create(newNode, getWeaverEngine())}; | ||
| case REPLACE: |
There was a problem hiding this comment.
Preserve AROUND insertion for functions
When a script calls the retained insert(InsertPosition.around, code) overload on a function, this switch now reaches the default branch and throws. Before the enum migration, the function-specific implementation handled "around" together with "replace", so AROUND should be handled alongside REPLACE here.
Useful? React with 👍 / 👎.
|
|
||
| case "around": | ||
| case "replace": | ||
| case REPLACE: |
There was a problem hiding this comment.
Preserve AROUND insertion for body scopes
For non-nested body joinpoints, CxxScope.insertImpl routes string insertion to this method, but InsertPosition.AROUND now falls through to the exception. The previous string-based switch treated "around" like "replace", clearing the body and adding the supplied statement, so the enum conversion should retain that case.
Useful? React with 👍 / 👎.




No description provided.