GeezerVison is showing github.com — GH-135379: Remove types from stack items in code generator. by markshannon · Pull Request #135384 · python/cpython
Conversation
markshannon
commented
Jun 11, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This removes the types from stack items in the code generator.
E.g
op(_SEND_GEN_FRAME, (receiver, v -- receiver, gen_frame: _PyInterpreterFrame *)) {
becomes
op(_SEND_GEN_FRAME, (receiver, v -- receiver, gen_frame) {
and the cast from _PyStackRef to _PyInterpreterFrame * is made explicit in the op definition.
This is a net zero change in terms of code size, but removes fiddly code generator code and replaces it with simple casts.
This also means that any future changes to the code generator, specifically for TOS caching, do not have to worry about inserting casts.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
efimov-mikhail reacted with thumbs up emoji
…in the instruction definitions
|
Looks good. However, can you add a news entry please? Downstream forks use the DSL now (like Cinder), so I think this should have a news entry. It's also big enough that it warrants it.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I know Cinder uses it, but it isn't part of any public API and we don't want it to be.
I guess a change note is fine, as long as it doesn't go in "what's new".
|
Fidget-Spinner reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Yeah I don't think it should be documented or in What's New either.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot s390x RHEL9 3.x (tier-3) has failed when building commit c87b5b2.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1565/builds/2457) and take a look at the build logs.
- Check if the failure is related to this commit (c87b5b2) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1565/builds/2457
Failed tests:
- test.test_multiprocessing_fork.test_processes
Failed subtests:
- test_interrupt - test.test_multiprocessing_fork.test_processes.WithProcessesTestProcess.test_interrupt
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 588, in test_interrupt
exitcode = self._kill_process(multiprocessing.Process.interrupt)
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 570, in _kill_process
self.assertEqual(join(), None)
~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 250, in __call__
return self.func(*args, **kwds)
~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/multiprocessing/process.py", line 156, in join
res = self._popen.wait(timeout)
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/multiprocessing/popen_fork.py", line 44, in wait
return self.poll(os.WNOHANG if timeout == 0.0 else 0)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/multiprocessing/popen_fork.py", line 28, in poll
pid, sts = os.waitpid(self.pid, flag)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 566, in handler
raise RuntimeError('join took too long: %s' % p)
RuntimeError: join took too long: <Process name='Process-1' pid=3964973 parent=3964971 started daemon>
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 588, in test_interrupt
exitcode = self._kill_process(multiprocessing.Process.interrupt)
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 570, in _kill_process
self.assertEqual(join(), None)
~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 250, in __call__
return self.func(*args, **kwds)
~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/multiprocessing/process.py", line 156, in join
res = self._popen.wait(timeout)
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/multiprocessing/popen_fork.py", line 44, in wait
return self.poll(os.WNOHANG if timeout == 0.0 else 0)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/multiprocessing/popen_fork.py", line 28, in poll
pid, sts = os.waitpid(self.pid, flag)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-rhel9-s390x/build/Lib/test/_test_multiprocessing.py", line 566, in handler
raise RuntimeError('join took too long: %s' % p)
RuntimeError: join took too long: <Process name='Process-158' pid=3956945 parent=3954168 started daemon>
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|