This repository was archived by the owner on Feb 13, 2025. It is now read-only.
forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 61
Stackless issue #283: concentrate platform dependent code in slp_transfer.c and eliminate pycore_slp_platformselect.h #283
Merged
akruis
merged 13 commits into
stackless-dev:main-slp
from
akruis:slp38-eliminate-platformselect.h
Jul 9, 2021
Merged
Stackless issue #283: concentrate platform dependent code in slp_transfer.c and eliminate pycore_slp_platformselect.h #283
akruis
merged 13 commits into
stackless-dev:main-slp
from
akruis:slp38-eliminate-platformselect.h
Jul 9, 2021
Conversation
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
Per tasklet profiling and tracing state information is no stored in the tasklet itself. This increases the size of tasklet objects a bit, but saves a lot of code.
They were removed by the previous commit.
Previously "pycore_slp_platformselect.h" was included by many *.c files and by "pycore_slp_pystate.h". I try to get rid of most platform specific code and concentrate the remaining platform specific code within a single C source "slp_transfer.c". Current state: work in progress
Decouple the cleanup logic for initial stubs of sub-interpreters from the stack handling. Previously this logic depended on the value of SLP_CSTACK_GOODGAP being positive.
slp38-eliminate-platformselect.h
Extract the platform specific stack handling form "slp_eval_frame" into a new function "slp_cstack_set_base_and_goodgap" in slp_transfer.c.
Move the definition of SLP_DO_NOT_OPTIMIZE_AWAY from pycore_stackless.h to slp_transfer.c, because it is only used there.
Remove commented code.
Integrate include "pycore_slp_platformselect.h" into slp_transfer.c and remove this include.
Move "slp_transfer.c" form "Stackless/core" to "Stackless/platf", because it depends on the platform.
Add a changelog entry.
Move all pycore_slp_switch_*.h includes from Include/internal to Stackless/platf. These headers are included by "slp_transfer.c" only.
kristjanvalur
approved these changes
Jul 7, 2021
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.
Sounds very sensible.
akruis
pushed a commit
that referenced
this pull request
Jul 11, 2021
The list of Stackless code directories needed an update.
akruis
pushed a commit
that referenced
this pull request
Jul 11, 2021
slp_transfer.c and eliminate pycore_slp_platformselect.h Restore the definition of SLP_CSTACK_MAXCACHE.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In order to simplify changes of the hard-switching implementation (see #278) I propose to move all platform dependent source
files to Stackless/platf and to concentrate platform specific source code in "Stackless/platf/slp_transfer.c".
Because this source file would be the sole consumer of the header "pycore_slp_platformselect.h" we can also
integrate this header into "slp_transfer.c".
This change has two benefits:
make install
no longer installs platform specific files. Same for Windows packages.Because of 2) it is no longer a problem to add the source of Stackman or Tealet somewhere below "Stackless/".
This pull request depends on pull request #281 and pull request #282.