Skip to content

Lang spec v3 - #244

Open
lm-sousa wants to merge 20 commits into
multi-weaverfrom
langSpecV3
Open

Lang spec v3#244
lm-sousa wants to merge 20 commits into
multi-weaverfrom
langSpecV3

Conversation

@lm-sousa

Copy link
Copy Markdown
Member

No description provided.

lm-sousa and others added 20 commits January 20, 2026 19:08
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.
… a few type casting problems. They warrant further analysis.
Copilot AI lite review requested due to automatic review settings August 28, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants