-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to using integer language revisions internally
Use 1+ revision numbers for language revisions where 1 stands for 6.c. I know this is a mega-commit, but due to the scale of the change it cannot be split into smaller parts as nearly anywhere we rely on the versioning there is no way to smoothly transition from legacy to the new one. The primary reason for the change is to simplify transitioning from Perl6-styled `v6.c` scheme to something new, like `v2015`, perhaps, or whatever would be the accepted solution in the problem-solving. The point is to separate the internal representation from the public one. Another advantage is simplification of version checks as the previsous `.lang-rev-before` method call can now be replaced with faster numeric comparisons. Notable changes: - CORE-SETTING-REV are now `Int`s with a helper `LanguageRevision` role mixin. The role is an implementation details, thus not published into the user space. The role acts somewhat like allomorphs except that it is revision-centric and may provide some extra related APIs in the future. Role name similarity to `Perl6::Metamodel::LanguageRevision` is rather accidental and I'd like it to remain self-explaining for when `CORE-SETTING-REV` is being introspected. - `Perl6::Metamodel::LanguageRevision` role has slightly changed semantics of its `language-revision` method which is considered a public API and is specced. The method now returns same type as `CORE-SETTING-REV`: `Int` with the mixin role. - For faster operations `Perl6::Metamodel::LanguageRevision` got a new `language_revision` method which returns just a plain `int`, same as `Perl6::Compiler` method of the same name does. - `Perl6::Compiler` got a new method `lvs` (Language Version Services). The methods returns a class which implements basic language version/revision manipulations like converting from public reprenstation into internal and vice versa. - Another new method on the compiler is `language_version_parts`. It returns list of parts of the version internal representation. I.e. for public `v6.e.PREVIEW` it would return `(3, 'PREVIEW')`. - Changed values in the compiler configuarion, but these are implementation details and should do not require detailed explanatation.
- Loading branch information
Showing
34 changed files
with
416 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.