-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
Call finalisers for embedded fields when parent type has no finalizer. #1629
Conversation
501b27f
to
522126d
Compare
src/libponyc/reach/reach.c
Outdated
{ | ||
if(ast_id(member) == TK_EMBED) | ||
{ | ||
if(embed_has_finaliser(ast_type(member), str_final)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this be refactored to be a part of the above if
statement, using &&
?
522126d
to
1501add
Compare
I've rebased on latest master to pick up the changes merged from #1621. |
src/libponyc/reach/reach.c
Outdated
embed_has_finaliser(ast_type(member), str_final)) | ||
{ | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the braces are needed here, and the indentation is a bit off.
This commit changes how the Windows memory allocation/commitment is done by switching from committing all memory immediately to only committing memory dynamically as it gets allocated. This resolves the Windows errors that PR ponylang#1614 and PR ponylang#1629 have been encountering related to `ponyint_virt_alloc` and `The paging file is too small for this operation to complete.`
97b1943
to
21d37aa
Compare
1501add
to
470dc51
Compare
I've rebased on latest master after the merge of #1677. |
The new tests are causing a segfault on Linux and I can't reproduce it. I'll try to investigate. |
7f88686
to
aa0cae2
Compare
This fixes a case overlooked in 087ebc7. In that commit, the finaliser of an embedded field was only called if the parent object (or actor) had an explicit finaliser. This change adds implicit finalisers to objects that must finalise an embedded field, including recursively.
a1269d8
to
bb8aac4
Compare
The tests are passing. I've also made the changes you requested @jemc. |
This fixes a case overlooked in 087ebc7. In that commit, the finaliser of an embedded field was only called if the parent object (or actor) had an explicit finaliser. This change adds implicit finalisers to objects that must finalise an embedded field, including recursively.
PS: If this gets merged before the pending release this shouldn't get a changelog entry since it is covered by the one from #1586.