Replace codeversion with feature flags. #198
Merged
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.
The codeversion field is a little too heavy weight and makes it difficult to support parallel
compiler branches. We ideally need a major/minor system or a feature flag set. In this patch
we opt for feature flags since they also make it easier to develop experimental features.
The version has been bumped to 13 for this patch.
Newer compilers will still emit codeversion=11 by default. The feature bits will still be present,
but set to zero. This is legal since the file format requires ignoring extra data between the
header and code blob, and indeed all old VMs follow this rule.