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

Make smaller changes to compilers #5052

Merged
merged 3 commits into from
Feb 5, 2024
Merged

Conversation

RustanLeino
Copy link
Collaborator

@RustanLeino RustanLeino commented Feb 3, 2024

This PR contains some minor changes to the compilers. These changes have been carved off from a larger set of changes (for supporting general newtypes and is expressions), to simplify the reviewing of the latter.

The changes in this PR are:

  • Rename parameter of EmitDowncastVariableAssignment (collectionElementType to sourceType).
  • Add nativeType parameter to EmitBitvectorTruncation (to allow it to be different than bvType.NativeType).
  • In some places, don't assume that native type of bitvector type is always as wide as the bitvector. (This happens to be true today, but it may not be true in the future (i) when a newtype can have a bitvector base type, which will happen soon, and (ii) if IntBoundedPool starts supporting bitvector types.

How has this been tested?

Since the changes are meant to preserve current behaviors (but with an eye to the up-and-coming PRs with larger changes), this PR does not make any changes to tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@RustanLeino RustanLeino marked this pull request as ready for review February 3, 2024 05:28
@RustanLeino RustanLeino enabled auto-merge (squash) February 3, 2024 06:38
@RustanLeino RustanLeino merged commit d24172f into dafny-lang:master Feb 5, 2024
20 checks passed
@RustanLeino RustanLeino deleted the nn7 branch February 5, 2024 19:22
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.

None yet

2 participants