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

Reintroduce caml_final_do_calls_exn #11039

Merged
merged 1 commit into from
Feb 21, 2022
Merged

Reintroduce caml_final_do_calls_exn #11039

merged 1 commit into from
Feb 21, 2022

Conversation

gadmm
Copy link
Contributor

@gadmm gadmm commented Feb 20, 2022

Reintroduce fix to minor bugs in Gc.{major,full_major,compact}.

This essentially completes the side-by-side review of runtime/finalise.c, a task of #10915.

@gadmm
Copy link
Contributor Author

gadmm commented Feb 20, 2022

(cc @sadiqj)

Copy link
Contributor

@sadiqj sadiqj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the unnecessary gotos, this looks good and cleans things up nicely in preparation for async callback safety. Thanks @gadmm

runtime/gc_ctrl.c Outdated Show resolved Hide resolved
runtime/gc_ctrl.c Show resolved Hide resolved
@gadmm
Copy link
Contributor Author

gadmm commented Feb 20, 2022

Regarding the gotos, here I advocated in favour of a systematic style that clearly separates the normal path from the error path: #8997 (comment). A systematic style makes it easier to read and evolve code (you can just ignore the error path).
For the break one, this crossed my mind. It is a bit of an extreme case, I do not really mind turning it into a break.

Reintroduce fix to minor bugs in Gc.{major,full_major,compact}
@gasche gasche merged commit 53a45c9 into ocaml:trunk Feb 21, 2022
@gasche
Copy link
Member

gasche commented Feb 21, 2022

Merged, thanks @gadmm for your work and @sadiqj for the review!

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

Successfully merging this pull request may close these issues.

None yet

3 participants