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

[c-ffi,dfmc-back-end] Fix nested structs by value. #846

Merged
merged 1 commit into from Jan 9, 2015

Conversation

Projects
None yet
2 participants
@waywardmonkeys
Member

waywardmonkeys commented Jan 9, 2015

In maybe-claim-heap-element-references-internal, when processing
a raw aggregate type (used for values whose type is a C struct
or union and not a pointer to a struct/union), process the member
types first, if necessary, then the type itself.

This ensures that they're in the heap-referenced-objects list
in the correct order and then emitted in C in the correct order
in emit-typedefs in the C backend. Without doing this, the C
output will be incorrect and compilation will fail.

[c-ffi,dfmc-back-end] Fix nested structs by value.
In maybe-claim-heap-element-references-internal, when processing
a raw aggregate type (used for values whose type is a C struct
or union and not a pointer to a struct/union), process the member
types first, if necessary, then the type itself.

This ensures that they're in the heap-referenced-objects list
in the correct order and then emitted in C in the correct order
in emit-typedefs in the C backend.  Without doing this, the C
output will be incorrect and compilation will fail.

housel added a commit that referenced this pull request Jan 9, 2015

Merge pull request #846 from waywardmonkeys/nested-structs-by-value
[c-ffi,dfmc-back-end] Fix nested structs by value.

@housel housel merged commit d7679c5 into dylan-lang:master Jan 9, 2015

@waywardmonkeys waywardmonkeys deleted the waywardmonkeys:nested-structs-by-value branch Jan 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment