crux-mir: remove default initialValue for crucible::any::Any #947
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.
Previously, locals of type
Any
would be initialized to a (useless) default value. If the local was declared under a symbolic branch, then the value assigned under that branch would then get muxed with the default value, producing an error ("Attempted to mux ANY values of different runtime type") since the value assigned almost never had the same concrete/runtime type as the default. This was a major problem for #945, which halts simulation when that error occurs instead of turning it into an assertion failure.With this branch, we no longer set a default value for
Any
-typed locals. (I forget the exact mechanism that allows this - probably something involvingMaybeType
- but the same mechanism is already used for various other non-defaultable types, like function pointers.) Removing the default value eliminates the unnecessary mux and the associated error.