The new language features in 5.2.0 also require the language level returned by parse version to be incremented. This probably should have been done for 5.1.0 too.
A question: so each time a new BIF or a new class gets added to ooRexx an increase to the language level should be undertaken?
What about adding new methods to existing classes or new arguments to existing BIFs?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Typically the language level has not been bumped for new methods on classes, but yes, new BIFs, new options to BIFs, new instructions, new keywords on instructions, new directives, new keywords on directives, and new builtin environment symbols all merit a bump in language level. Also, related to the other bug I opened, new features like that, when used, need to bump the interpreter level required to run a rexxc compiled image.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you!
Ad rexxc related bug entry [bugs:#2040]: wouldn't a bump to a new language level also take care of only running rexxc programs if the language level is at least at the level of the running interpreter?
Cf. interpreter/classes/support/ProgramMetaData.cpp, validate() in line # 204.
No, the image is marked with the interpreter level required to run the program. A big part of the work for 5.0.0 was to allow programs compiled with the latest version to still run on older interpreters as long as the program uses no new features that requires a higher level.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Bumping the language level to 606 (060600) would probably need to bump LanguageLevel.hpp MaximumLanguageLevel to 0606, keep the MinimumLanguageLevel to 0605, as the interpreter still would be able to execute level 0605?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The PackageClass is marked with the language level required to run the program when it is saved. This language level defaults to the level for the 5.0.0 release. If the parser finds that a newer feature is used, it needs to call the setLanguageLevel() method to update the required language level so that older versions of the interpreter does not try to run the program. If the program being processed does not use any new features, then the program can be compiled using the newer release, but still run on older releases.
I spotted a small bug with the setLanguageLevel() method. It should only update the requiredLanguageLevel if the new value is larger than the existing value.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, there is a small bug in Version.cpp which sets the Interpreter::languageLevel to "6.05" (it does not honor api\oorexxapi.h's REXX_CURRENT_LANGUAGE_LEVEL)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A question: so each time a new BIF or a new class gets added to ooRexx an increase to the language level should be undertaken?
What about adding new methods to existing classes or new arguments to existing BIFs?
Typically the language level has not been bumped for new methods on classes, but yes, new BIFs, new options to BIFs, new instructions, new keywords on instructions, new directives, new keywords on directives, and new builtin environment symbols all merit a bump in language level. Also, related to the other bug I opened, new features like that, when used, need to bump the interpreter level required to run a rexxc compiled image.
Thank you!
Ad rexxc related bug entry [bugs:#2040]: wouldn't a bump to a new language level also take care of only running rexxc programs if the language level is at least at the level of the running interpreter?
Cf. interpreter/classes/support/ProgramMetaData.cpp, validate() in line # 204.
Related
Bugs: #2040
No, the image is marked with the interpreter level required to run the program. A big part of the work for 5.0.0 was to allow programs compiled with the latest version to still run on older interpreters as long as the program uses no new features that requires a higher level.
It seems that these relate to the language level:
Bumping the language level to 606 (060600) would probably need to bump LanguageLevel.hpp MaximumLanguageLevel to 0606, keep the MinimumLanguageLevel to 0605, as the interpreter still would be able to execute level 0605?
The PackageClass is marked with the language level required to run the program when it is saved. This language level defaults to the level for the 5.0.0 release. If the parser finds that a newer feature is used, it needs to call the setLanguageLevel() method to update the required language level so that older versions of the interpreter does not try to run the program. If the program being processed does not use any new features, then the program can be compiled using the newer release, but still run on older releases.
I spotted a small bug with the setLanguageLevel() method. It should only update the requiredLanguageLevel if the new value is larger than the existing value.
Thanks for the information!
Also, there is a small bug in Version.cpp which sets the Interpreter::languageLevel to "6.05" (it does not honor api\oorexxapi.h's REXX_CURRENT_LANGUAGE_LEVEL)
Here is a patch which does the following:
Requesting comments (planning to apply the patch (for having Jenkins test it on all systems) by the end of the week).
---rony
Committed with [r13051], such that Jenkins can compile on all platforms.
Related
Commit: [r13051]