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

Feature/ls24003953/parm factor1 #606

Merged
merged 10 commits into from
Sep 11, 2024
Merged

Conversation

dom-apuliasoft
Copy link
Collaborator

Description

When using PARM with CALL operations, the first factor of the PARM can be used to specify where to put the "updated" value of the parameter when callee terminates its execution.

For instance in the following snippet, when PROCEDURE ends its execution, the new value of $A gets put in *IN36

     C                   CALL      'PROCEDURE'
     C     *IN36         PARM      *OFF          $A                1

This feature of PARM was unsupported.

From a technical standpoint changes concern:

  • The addition of a result field in PlistParam
  • The new AST creation rule for PARM factor 1
  • The new assignment rule in the execute method of CallStmt
  • The removal of a useless check in misc.kt during the creation of PlistParams

Related to:

  • LS24003953

Checklist:

  • If this feature involves RPGLE fixes or improvements, they are well-described in the summary.
  • There are tests for this feature.
  • RPGLE code used for tests is easily understandable and includes comments that clarify the purpose of this feature.
  • The code follows Kotlin conventions (run ./gradlew ktlintCheck).
  • The code passes all tests (run ./gradlew check).
  • Relevant documentation is included in the docs directory.

Copy link
Collaborator

@lanarimarco lanarimarco left a comment

Choose a reason for hiding this comment

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

If this feature allows to put the parameter output in more than one field, I would add in the test case another parameter.

@dom-apuliasoft
Copy link
Collaborator Author

@lanarimarco test coverage should now be improved.
There are also 2 things that were added after the previous revision:

  • A specific test where we check the behaviour when binding the same identifier to multiple parameters
  • The PlusExpr evaluation rule with StringValue and BooleanValue (used in the new test cases)

All these behaviours have been checked on AS400 thanks to the support of @davidepalladino-apuliasoft

Copy link
Collaborator

@lanarimarco lanarimarco left a comment

Choose a reason for hiding this comment

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

Another little change

@lanarimarco lanarimarco merged commit 91c69bd into develop Sep 11, 2024
1 check passed
@lanarimarco lanarimarco deleted the feature/LS24003953/parm-factor1 branch September 11, 2024 10:12
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.

2 participants