René's URL Explorer Experiment


Title: bpo-37213: Handle negative line deltas correctly in the peephole optimizer by pablogsal · Pull Request #13969 · python/cpython · GitHub

Open Graph Title: bpo-37213: Handle negative line deltas correctly in the peephole optimizer by pablogsal · Pull Request #13969 · python/cpython

X Title: bpo-37213: Handle negative line deltas correctly in the peephole optimizer by pablogsal · Pull Request #13969 · python/cpython

Description: Considering this code: if x: if (y and z): foo() else: bar() Before 2 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_FALSE 20 3 4 LOAD_GLOBAL 1 (y) 6 POP_JUMP_IF_FALSE 18 4 8 LOAD_GLOBAL 2 (z) 3 10 POP_JUMP_IF_FALSE 18 5 12 LOAD_GLOBAL 3 (foo) 14 CALL_FUNCTION 0 16 POP_TOP >> 18 JUMP_FORWARD 6 (to 26) 7 >> 20 LOAD_GLOBAL 4 (bar) 22 CALL_FUNCTION 0 24 POP_TOP >> 26 LOAD_CONST 0 (None) 28 RETURN_VALUE After 2 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_FALSE 20 3 4 LOAD_GLOBAL 1 (y) 6 POP_JUMP_IF_FALSE 26 4 8 LOAD_GLOBAL 2 (z) 3 10 POP_JUMP_IF_FALSE 26 5 12 LOAD_GLOBAL 3 (foo) 14 CALL_FUNCTION 0 16 POP_TOP 18 JUMP_FORWARD 6 (to 26) 7 >> 20 LOAD_GLOBAL 4 (bar) 22 CALL_FUNCTION 0 24 POP_TOP >> 26 LOAD_CONST 0 (None) 28 RETURN_VALUE For this other example: [x for x in a if x] Before 2 0 BUILD_LIST 0 2 LOAD_FAST 0 (.0) >> 4 FOR_ITER 12 (to 18) 3 6 STORE_FAST 1 (x) 8 LOAD_FAST 1 (x) 10 POP_JUMP_IF_FALSE 16 2 12 LOAD_FAST 1 (x) 14 LIST_APPEND 2 >> 16 JUMP_ABSOLUTE 4 >> 18 RETURN_VALUE After 2 0 BUILD_LIST 0 2 LOAD_FAST 0 (.0) >> 4 FOR_ITER 12 (to 18) 3 6 STORE_FAST 1 (x) 8 LOAD_FAST 1 (x) 10 POP_JUMP_IF_FALSE 4 2 12 LOAD_FAST 1 (x) 14 LIST_APPEND 2 16 JUMP_ABSOLUTE 4 >> 18 RETURN_VALUE https://bugs.python.org/issue37213

Open Graph Description: Considering this code: if x: if (y and z): foo() else: bar() Before 2 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_FALSE 20 3 ...

X Description: Considering this code: if x: if (y and z): foo() else: bar() Before 2 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_FALSE 20 3 ...

Opengraph URL: https://github.com/python/cpython/pull/13969

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c0e9253a-6d67-0262-e8ac-882c35f19771
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idABCC:30A6D1:5ACDEC:845C57:6A56104D
html-safe-noncefb8b732e0b814233549dba8847d1bc6ad47de9413663e397fbd7edf075d28034
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkNDOjMwQTZEMTo1QUNERUM6ODQ1QzU3OjZBNTYxMDREIiwidmlzaXRvcl9pZCI6IjI2MjIyNjM1OTgyNzAyNTUxODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7a04c5bc3150b7e63bea380ec9911cffec2eaf23f37e948076a7fdab466c99f2
hovercard-subject-tagpull_request:287017910
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/13969/files
twitter:imagehttps://avatars.githubusercontent.com/u/11718525?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/11718525?s=400&v=4
og:image:altConsidering this code: if x: if (y and z): foo() else: bar() Before 2 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_FALSE 20 3 ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef4368738fc918fecd9b3958f6b49218bbe60d4185f38e72e3954e11f1ad0213a
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release85a7179838b41e8b23f939d3b67b53f752ecfc54
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/13969/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F13969%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F13969%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/13969/files
Reloadhttps://github.com/python/cpython/pull/13969/files
Reloadhttps://github.com/python/cpython/pull/13969/files
Please reload this pagehttps://github.com/python/cpython/pull/13969/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/13969/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
pablogsalhttps://github.com/pablogsal
python:masterhttps://github.com/python/cpython/tree/master
pablogsal:bpo-37213https://github.com/pablogsal/cpython/tree/bpo-37213
Conversation 29 https://github.com/python/cpython/pull/13969
Commits 11 https://github.com/python/cpython/pull/13969/commits
Checks 0 https://github.com/python/cpython/pull/13969/checks
Files changed https://github.com/python/cpython/pull/13969/files
Please reload this pagehttps://github.com/python/cpython/pull/13969/files
bpo-37213: Handle negative line deltas correctly in the peephole optimizer https://github.com/python/cpython/pull/13969/files#top
Show all changes 11 commits https://github.com/python/cpython/pull/13969/files
c2eb0dc bpo-37213: Handle negative line deltas correctly in the peephole opti… pablogsal Jun 11, 2019 https://github.com/python/cpython/pull/13969/commits/c2eb0dceb62efef8d806099dc416bb6e3854acd6
49f99e5 Add NEWS entry pablogsal Jun 11, 2019 https://github.com/python/cpython/pull/13969/commits/49f99e5de54c9b7425038b0bf25b6bf98efdd55c
488f826 Merge comments pablogsal Jun 11, 2019 https://github.com/python/cpython/pull/13969/commits/488f826ed14c55cfa59e7f2aae5523aba8dd2f58
ec64233 Update Python/peephole.c pablogsal Jun 11, 2019 https://github.com/python/cpython/pull/13969/commits/ec6423366d2f0bad567e7875eabf9b171f1da495
1c82094 Add tests pablogsal Jun 11, 2019 https://github.com/python/cpython/pull/13969/commits/1c82094f340b324e9c423f69842982c69a84b4d4
cbe179d Regen importlib pablogsal Jun 11, 2019 https://github.com/python/cpython/pull/13969/commits/cbe179d0defc3cd46ae5c1b81a3524aab54fb013
4ce65ed fixup! Regen importlib pablogsal Jun 12, 2019 https://github.com/python/cpython/pull/13969/commits/4ce65ed9058d97a701c6af14728b1d9905c77ea6
7a441b1 fixup! fixup! Regen importlib pablogsal Jun 12, 2019 https://github.com/python/cpython/pull/13969/commits/7a441b10dcbda27e0b1c4ef212d48a3ccc7ec1a6
bad40df Fix comment indentation pablogsal Jun 12, 2019 https://github.com/python/cpython/pull/13969/commits/bad40df65aab4d2335ed2601bb3a57138533a2f4
a56c3bf fixup! Fix comment indentation pablogsal Jun 12, 2019 https://github.com/python/cpython/pull/13969/commits/a56c3bf32feeecf9c9981d8642dd2e8ce308a598
7c70683 fixup! fixup! Fix comment indentation pablogsal Jun 13, 2019 https://github.com/python/cpython/pull/13969/commits/7c70683a17c23ccdf73e37caaa98094c94cd08db
Clear filters https://github.com/python/cpython/pull/13969/files
Please reload this pagehttps://github.com/python/cpython/pull/13969/files
Please reload this pagehttps://github.com/python/cpython/pull/13969/files
test_peepholer.py https://github.com/python/cpython/pull/13969/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
2019-06-11-11-15-19.bpo-37213.UPii5K.rst https://github.com/python/cpython/pull/13969/files#diff-7b81ebd360a4c1b39f71349bf810dde78dbdb4c1d4e847430dfc2347304f4523
importlib.h https://github.com/python/cpython/pull/13969/files#diff-f22c3fe718474bf1830c047f516ef95818493a9a9fcf8f2d5b159b1b5b76ecd6
importlib_external.h https://github.com/python/cpython/pull/13969/files#diff-edaa85591e6f559d0fae8073b45dc3e9c8e251053d07623b2ce23392dfe97a7e
importlib_zipimport.h https://github.com/python/cpython/pull/13969/files#diff-885727a7f2320fa6a12abd49340cc1f516bc5e1bb4fdcb211da1e06e783adeef
peephole.c https://github.com/python/cpython/pull/13969/files#diff-3bc78aafc8aa0da74cdc1cbf79c5722d549b721c0b1c12f2943df3a531869846
Lib/test/test_peepholer.pyhttps://github.com/python/cpython/pull/13969/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
View file https://github.com/pablogsal/cpython/blob/7c70683a17c23ccdf73e37caaa98094c94cd08db/Lib/test/test_peepholer.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/13969/{{ revealButtonHref }}
https://github.com/python/cpython/pull/13969/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
https://github.com/python/cpython/pull/13969/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
https://github.com/python/cpython/pull/13969/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
https://github.com/python/cpython/pull/13969/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
Misc/NEWS.d/next/Core and Builtins/2019-06-11-11-15-19.bpo-37213.UPii5K.rsthttps://github.com/python/cpython/pull/13969/files#diff-7b81ebd360a4c1b39f71349bf810dde78dbdb4c1d4e847430dfc2347304f4523
View file https://github.com/pablogsal/cpython/blob/7c70683a17c23ccdf73e37caaa98094c94cd08db/Misc/NEWS.d/next/Core%20and%20Builtins/2019-06-11-11-15-19.bpo-37213.UPii5K.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/13969/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/13969/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.