Merged
Conversation
Simply assigning to a temporary symbol of the correct type and amending the type passed to the elaboration of the sub-array seems to suffice to properly initialise a multi-dimensional array.
df4d8ff to
0a53fbb
Compare
peterschrammel
approved these changes
Mar 23, 2017
tautschnig
reviewed
Mar 23, 2017
| for_loop.iter()=inc; | ||
| for_loop.body()=code_skipt(); | ||
| for_loop.body()=code_assignt(deref_expr, sub_java_new); | ||
| for_loop.body()=for_body; |
Collaborator
There was a problem hiding this comment.
Where does the recursion happen that one would (seemingly) need for, e.g., a three-dimensional array?
Contributor
Author
There was a problem hiding this comment.
The java-new-array expression created is one operand shorter, so if it's still 2 or longer we'll end up here again when we convert it
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Just realised my Java multinewarray fix had fallen by the wayside. Here it is again-- in current master
multinewarray(multi-dimensional array alloc) always fails with "unexpected assignment to empty" (deref of a void pointer); this gets at least basic functionality working (i.e. test multinewarray passes). Fixes #192