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.
This pull request introduces support for a program status register in the code generation logic. The program status register is enabled when the value of
enable-program-status-registerin the configuration file isyes. It also includes minor test adjustments to accommodate these changes.Program status register support and variable visibility:
cobj/codegen.c, the code now checks if the program status register feature (cb_enable_program_status_register) is enabled. If so, it generates code to instantiate the program module, initialize it, and, after execution, exit using the value of theRETURN-CODEfield. ([cobj/codegen.cR6248-R6259](https://github.com/opensourcecobol/opensourcecobol4j/pull/735/files#diff-92e09701bd613a805e09be47306909e3e3abb869c44ad69ad4695ba84bb0c421R6248-R6259))CobolDataStoragemember forRETURN-CODEis set topublicinstead ofprivate, allowing external access when the program status register is enabled. ([cobj/codegen.cL5548-R5559](https://github.com/opensourcecobol/opensourcecobol4j/pull/735/files#diff-92e09701bd613a805e09be47306909e3e3abb869c44ad69ad4695ba84bb0c421L5548-R5559))Test adjustments:
tests/jp-compat.src/job-date.at,tests/jp-compat.src/spl-registers.at, the test forPROGRAM-STATUSis now enabled, allowing it to run and validate the new feature. ([tests/jp-compat.src/spl-registers.atL2](https://github.com/opensourcecobol/opensourcecobol4j/pull/735/files#diff-4714d38b00e36f9fafc1a07f9009dba6621c95dd48f6f14f22e18cd3bfea4067L2))