Documentation improvements for native stack switching functions#11059
Merged
xavierleroy merged 4 commits intoocaml:trunkfrom Feb 28, 2022
Merged
Documentation improvements for native stack switching functions#11059xavierleroy merged 4 commits intoocaml:trunkfrom
xavierleroy merged 4 commits intoocaml:trunkfrom
Conversation
…; remove spurious HEADER WORD in the stack diagram; move NUM_STACK_SIZE_CLASSES to where it is used
…sume} assembly stubs
xavierleroy
reviewed
Feb 25, 2022
Contributor
xavierleroy
left a comment
There was a problem hiding this comment.
The additional documentation definitely helps. Thanks! Very minor remarks below.
Comment on lines
+112
to
+115
| * In native compilation the stack switching primitives Prunstack, | ||
| * Pperform, Preperform and Presume make use of corresponding functions | ||
| * implemented in the assembly files for an architecture (such as | ||
| * runtime/amd64.S). |
Contributor
There was a problem hiding this comment.
For completeness, you could mention what happens in bytecode? I.e. that these primitives are mapped to instructions of the abstract machine.
xavierleroy
approved these changes
Feb 28, 2022
Contributor
xavierleroy
left a comment
There was a problem hiding this comment.
Thanks a lot for all the information. Let's merge!
16 tasks
EduardoRFS
pushed a commit
to esy-ocaml/ocaml
that referenced
this pull request
Mar 1, 2022
…l#11059) * Remove struct caml_context to avoid confusion * fibers: Improve comments for struct stack_handler & struct stack_info; remove spurious HEADER WORD in the stack diagram; move NUM_STACK_SIZE_CLASSES to where it is used * Document the functionality of the caml_{runstack,perform,reperform,resume} assembly stubs * Addition of documentation for the bytecode implementation of stack switching
This was referenced Oct 13, 2022
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.
This PR adds comments to
fiber.hfor the native code specifications ofcaml_runstack,caml_perform,caml_reperform,caml_resume.The PR also adds more comments for the data structures (
struct stack_info,struct stack_handler) representing an OCaml stack.I decided the stack switching documentation belongs in
fiber.halongside the data structures because a reader of the assembly files will need to see both of these. However I'm open to other locations for the documentation.