8000 gh-109979: Auto-generate the target for DEOPT_IF() by gvanrossum · Pull Request #110193 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-109979: Auto-generate the target for DEOPT_IF() #110193

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

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

gvanrossum
Copy link
Member
@gvanrossum gvanrossum commented Oct 1, 2023

@gvanrossum gvanrossum changed the title Attempt to auto-generate the target for DEOPT_IF() gh-109979: Attempt to auto-generate the target for DEOPT_IF() Oct 1, 2023
@gvanrossum gvanrossum marked this pull request as ready for review October 2, 2023 18:05
@gvanrossum gvanrossum changed the title gh-109979: Attempt to auto-generate the target for DEOPT_IF() gh-109979: Auto-generate the target for DEOPT_IF() Oct 2, 2023
@gvanrossum
Copy link
Member Author

Reviewers (@markshannon, @brandtbucher): There's one slightly unpleasant thing in this PR.

All of the DEOPT_IF() macro needs to be on a single line, otherwise the string-based substitutions in Instruction.write_body() doesn't work. This requires us to occasionally violate the line length guidelines, or use some other trick (e.g. you could assign the condition to a temporary variable). An error is printed if this is detected (DEOPT_IF on a line that doesn't match the regex), though it could be smoother; if you miss or ignore that error, you get an ugly error from the C compiler.

To fix this, I would have to switch to AST-based substitutions, which is a much more complicated refactor than I feel like taking on right now.

@gvanrossum gvanrossum merged commit d67edcf into python:main Oct 3, 2023
@gvanrossum gvanrossum deleted the auto-deopt branch October 3, 2023 17:13
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 3.x has failed when building commit d67edcf.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/529/builds/5096) and take a look at the build logs.
  4. Check if the failure is related to this commit (d67edcf) or if it is a false positive.
  5. 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/all/#builders/529/builds/5096

Failed tests:

  • test_pty

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 15, done.        
remote: Counting objects:   6% (1/15)        
remote: Counting objects:  13% (2/15)        
remote: Counting objects:  20% (3/15)        
remote: Counting objects:  26% (4/15)        
remote: Counting objects:  33% (5/15)        
remote: Counting objects:  40% (6/15)        
remote: Counting objects:  46% (7/15)        
remote: Counting objects:  53% (8/15)        
remote: Counting objects:  60% (9/15)        
remote: Counting objects:  66% (10/15)        
remote: Counting objects:  73% (11/15)        
remote: Counting objects:  80% (12/15)        
remote: Counting objects:  86% (13/15)        
remote: Counting objects:  93% (14/15)        
remote: Counting objects: 100% (15/15)        
remote: Counting objects: 100% (15/15), done.        
remote: Compressing objects:   7% (1/14)        
remote: Compressing objects:  14% (2/14)        
remote: Compressing objects:  21% (3/14)        
remote: Compressing objects:  28% (4/14)        
remote: Compressing objects:  35% (5/14)        
remote: Compressing objects:  42% (6/14)        
remote: Compressing objects:  50% (7/14)        
remote: Compressing objects:  57% (8/14)        
remote: Compressing objects:  64% (9/14)        
remote: Compressing objects:  71% (10/14)        
remote: Compressing objects:  78% (11/14)        
remote: Compressing objects:  85% (12/14)        
remote: Compressing objects:  92% (13/14)        
remote: Compressing objects: 100% (14/14)        
remote: Compressing objects: 100% (14/14), done.        
remote: Total 15 (delta 3), reused 4 (delta 1), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to 'd67edcf0b361c9ee0d29ed719562c58a85304cd0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at d67edcf0b3 gh-109979: Auto-generate the target for DEOPT_IF() (#110193)
Switched to and reset branch 'main'

make: *** [Makefile:2020: buildbottest] Error 5

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024