René's URL Explorer Experiment


Title: gh-87092: refactor assemble() to a number of separate functions, which do not need the compiler struct by iritkatriel · Pull Request #102562 · python/cpython · GitHub

Open Graph Title: gh-87092: refactor assemble() to a number of separate functions, which do not need the compiler struct by iritkatriel · Pull Request #102562 · python/cpython

X Title: gh-87092: refactor assemble() to a number of separate functions, which do not need the compiler struct by iritkatriel · Pull Request #102562 · python/cpython

Description: This PR: further breaks up the assemble() function, and extracts out of it the optimize_code_unit(), assemble_code_unit(), assemble_emit() and resolve_line_numbers() steps into separate functions....

Open Graph Description: This PR: further breaks up the assemble() function, and extracts out of it the optimize_code_unit(), assemble_code_unit(), assemble_emit() and resolve_line_numbers() steps into separate functions....

X Description: This PR: further breaks up the assemble() function, and extracts out of it the optimize_code_unit(), assemble_code_unit(), assemble_emit() and resolve_line_numbers() steps into separate functions....

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:0bd22ec8-baaf-c6b0-3218-c944c06fe07b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB6CC:46801:F526D9:1467B5F:69699132
html-safe-nonceb2c078802bc3b4a2566db4fe3f5dde7bc506295f82384d2c76a622770b27125d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkNDOjQ2ODAxOkY1MjZEOToxNDY3QjVGOjY5Njk5MTMyIiwidmlzaXRvcl9pZCI6IjEyMzA4ODU0ODc4OTkxNTI2OTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7d1b47918dd2309dd8505572ac19b5ff112a4a49bd046a26f867a619f6fb382a
hovercard-subject-tagpull_request:1270075162
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/102562/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/b6bbe6b7e92a5663cadb772e456af93180bd6d48871a4872ea7628cf5576fc71/python/cpython/pull/102562
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b6bbe6b7e92a5663cadb772e456af93180bd6d48871a4872ea7628cf5576fc71/python/cpython/pull/102562
og:image:altThis PR: further breaks up the assemble() function, and extracts out of it the optimize_code_unit(), assemble_code_unit(), assemble_emit() and resolve_line_numbers() steps into separate functions....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameiritkatriel
hostnamegithub.com
expected-hostnamegithub.com
None3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseaf80af7cc9e3de9c336f18b208a600950a3c187c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/102562#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F102562
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2F102562
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/102562
Reloadhttps://github.com/python/cpython/pull/102562
Reloadhttps://github.com/python/cpython/pull/102562
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/102562
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/102562
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 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
Jump to bottomhttps://github.com/python/cpython/pull/102562#issue-comment-box
iritkatrielhttps://github.com/iritkatriel
python:mainhttps://github.com/python/cpython/tree/main
iritkatriel:decouple_assemblerhttps://github.com/iritkatriel/cpython/tree/decouple_assembler
gh-87092: refactor assemble() to a number of separate functions, which do not need the compiler struct https://github.com/python/cpython/pull/102562#top
iritkatrielhttps://github.com/iritkatriel
python:mainhttps://github.com/python/cpython/tree/main
iritkatriel:decouple_assemblerhttps://github.com/iritkatriel/cpython/tree/decouple_assembler
Conversation 3 https://github.com/python/cpython/pull/102562
Commits 10 https://github.com/python/cpython/pull/102562/commits
Checks 0 https://github.com/python/cpython/pull/102562/checks
Files changed https://github.com/python/cpython/pull/102562/files
Please reload this pagehttps://github.com/python/cpython/pull/102562
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
Mar 9, 2023https://github.com/python/cpython/pull/102562#issue-1617734840
Please reload this pagehttps://github.com/python/cpython/pull/102562
Split compiler into code-gen, optimizer and assembler. #87092https://github.com/python/cpython/issues/87092
Please reload this pagehttps://github.com/python/cpython/pull/102562
iritkatrielhttps://github.com/iritkatriel
March 8, 2023 15:06https://github.com/python/cpython/pull/102562#commits-pushed-8b71935
https://github.com/iritkatriel
remove compiler as arg from some codegen functionshttps://github.com/python/cpython/pull/102562/commits/8b71935f6aba37e66411c3745c9d0b89cb5e0038
8b71935https://github.com/python/cpython/pull/102562/commits/8b71935f6aba37e66411c3745c9d0b89cb5e0038
https://github.com/iritkatriel
prepare_localsplus doesn't need the whole compiler structhttps://github.com/python/cpython/pull/102562/commits/ed9c7d2751c338751f021b9e83bd875a85ab905e
ed9c7d2https://github.com/python/cpython/pull/102562/commits/ed9c7d2751c338751f021b9e83bd875a85ab905e
https://github.com/iritkatriel
don't pass compiler around so much in assembler stagehttps://github.com/python/cpython/pull/102562/commits/1232d4150c3655e36040a6b795023d5154f7d1ae
1232d41https://github.com/python/cpython/pull/102562/commits/1232d4150c3655e36040a6b795023d5154f7d1ae
https://github.com/iritkatriel
extract optimize_code_unit() out of assemble()https://github.com/python/cpython/pull/102562/commits/dbf22d19693310f74951f388529bd70431aba2f2
dbf22d1https://github.com/python/cpython/pull/102562/commits/dbf22d19693310f74951f388529bd70431aba2f2
https://github.com/iritkatriel
_PyCompile_CodeGen doesn't need to construct a cfghttps://github.com/python/cpython/pull/102562/commits/db4b2b8feebb18b98d72b1cadeb298f462a9d677
db4b2b8https://github.com/python/cpython/pull/102562/commits/db4b2b8feebb18b98d72b1cadeb298f462a9d677
https://github.com/iritkatriel
refactor optimize_code_unit furtherhttps://github.com/python/cpython/pull/102562/commits/9071570f396b508542858bfa95937e179d968f12
9071570https://github.com/python/cpython/pull/102562/commits/9071570f396b508542858bfa95937e179d968f12
https://github.com/iritkatriel
unit tests run all of the optimization stage, not just optimize_cfghttps://github.com/python/cpython/pull/102562/commits/4e7857f10e5a2de76de9cebdfc2a046d58d03db8
4e7857fhttps://github.com/python/cpython/pull/102562/commits/4e7857f10e5a2de76de9cebdfc2a046d58d03db8
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
interpreter-core https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Ainterpreter-core
Mar 9, 2023https://github.com/python/cpython/pull/102562#event-8711049066
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
brandtbucherhttps://github.com/brandtbucher
markshannonhttps://github.com/markshannon
code ownershttps://github.com/python/cpython/blob/ca066bdbed85094a9c4d9930823ce3587807db48/.github/CODEOWNERS#L30
March 9, 2023 18:00https://github.com/python/cpython/pull/102562#event-8711049174
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Mar 9, 2023 https://github.com/python/cpython/pull/102562#ref-issue-1199051004
Split compiler into code-gen, optimizer and assembler. #87092 https://github.com/python/cpython/issues/87092
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Mar 9, 2023https://github.com/python/cpython/pull/102562#event-8711050032
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
Mar 9, 2023https://github.com/python/cpython/pull/102562#event-8711051444
https://github.com/iritkatriel
break up assemble() some morehttps://github.com/python/cpython/pull/102562/commits/d0166c4d2b35365ee0221c8a11ce5556956d4d2b
d0166c4https://github.com/python/cpython/pull/102562/commits/d0166c4d2b35365ee0221c8a11ce5556956d4d2b
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
Mar 10, 2023https://github.com/python/cpython/pull/102562#event-8717744426
https://github.com/iritkatriel
remove obsolete commenthttps://github.com/python/cpython/pull/102562/commits/c9fc294ab939f456211fd04feaaf976a4a855e43
c9fc294https://github.com/python/cpython/pull/102562/commits/c9fc294ab939f456211fd04feaaf976a4a855e43
https://github.com/markshannon
markshannonhttps://github.com/markshannon
Mar 10, 2023 https://github.com/python/cpython/pull/102562#pullrequestreview-1335337655
View reviewed changes https://github.com/python/cpython/pull/102562/files/c9fc294ab939f456211fd04feaaf976a4a855e43
markshannonhttps://github.com/markshannon
https://github.com/python/cpython/pull/102562#pullrequestreview-1335337655
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/102562
Lib/test/support/bytecode_helper.pyhttps://github.com/python/cpython/pull/102562/files/c9fc294ab939f456211fd04feaaf976a4a855e43#diff-ce71f1eeafea9d44637c79993bcf2f5d2f69b73e9261b9afddb94b3b3627afec
markshannonhttps://github.com/markshannon
Mar 10, 2023https://github.com/python/cpython/pull/102562#discussion_r1132679929
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/102562
iritkatrielhttps://github.com/iritkatriel
Mar 10, 2023https://github.com/python/cpython/pull/102562#discussion_r1132736438
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/102562
https://github.com/iritkatriel
tidy up the no-arg representation in unit test instruction sequenceshttps://github.com/python/cpython/pull/102562/commits/0f198b6ee313459ef2ab679be02387c4bf523b73
0f198b6https://github.com/python/cpython/pull/102562/commits/0f198b6ee313459ef2ab679be02387c4bf523b73
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
634cb61https://github.com/python/cpython/commit/634cb61909b1392f0eef3e749931777adb54f16e
Mar 13, 2023https://github.com/python/cpython/pull/102562#event-8733583778
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Mar 13, 2023https://github.com/python/cpython/pull/102562#event-8733584461
carljmhttps://github.com/carljm
Mar 14, 2023 https://github.com/python/cpython/pull/102562#ref-commit-6c5f269
https://github.com/carljm
Merge branch 'main' into inlinecomp2https://github.com/carljm/cpython/commit/6c5f269eceb005e4d7fe5de2320d81108cd6ad3c
6c5f269https://github.com/carljm/cpython/commit/6c5f269eceb005e4d7fe5de2320d81108cd6ad3c
pythongh-102674https://github.com/python/cpython/issues/102674
python#102685https://github.com/python/cpython/pull/102685
pythongh-102660https://github.com/python/cpython/issues/102660
pythongh-102661https://github.com/python/cpython/pull/102661
pythongh-102354https://github.com/python/cpython/issues/102354
python#102696https://github.com/python/cpython/pull/102696
pythongh-81057https://github.com/python/cpython/issues/81057
pythongh-102506https://github.com/python/cpython/pull/102506
pythonGH-94851https://github.com/python/cpython/issues/94851
python#102684https://github.com/python/cpython/pull/102684
pythongh-100315https://github.com/python/cpython/issues/100315
python#102621https://github.com/python/cpython/pull/102621
pythonGH-100227https://github.com/python/cpython/issues/100227
python#102682https://github.com/python/cpython/pull/102682
pythongh-102677https://github.com/python/cpython/pull/102677
pythongh-102013https://github.com/python/cpython/issues/102013
python#102014https://github.com/python/cpython/pull/102014
pythonGH-102670https://github.com/python/cpython/issues/102670
pythonGH-102649https://github.com/python/cpython/pull/102649
pythongh-102627https://github.com/python/cpython/issues/102627
python#102630https://github.com/python/cpython/pull/102630
pythongh-98831https://github.com/python/cpython/issues/98831
python#102409https://github.com/python/cpython/pull/102409
pythongh-101659https://github.com/python/cpython/issues/101659
pythongh-102659https://github.com/python/cpython/pull/102659
pythongh-101524https://github.com/python/cpython/issues/101524
pythongh-102655https://github.com/python/cpython/pull/102655
pythongh-102069https://github.com/python/cpython/issues/102069
python#102075https://github.com/python/cpython/pull/102075
pythongh-98169https://github.com/python/cpython/issues/98169
python#98170https://github.com/python/cpython/pull/98170
pythongh-102650https://github.com/python/cpython/issues/102650
python#102651https://github.com/python/cpython/pull/102651
pythonGH-100987https://github.com/python/cpython/issues/100987
python#102640https://github.com/python/cpython/pull/102640
pythongh-87092https://github.com/python/cpython/issues/87092
python#102562https://github.com/python/cpython/pull/102562
pythongh-102192https://github.com/python/cpython/issues/102192
python#102631https://github.com/python/cpython/pull/102631
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
March 19, 2023 11:51https://github.com/python/cpython/pull/102562#event-8787588051
Fidget-Spinnerhttps://github.com/Fidget-Spinner
Mar 27, 2023 https://github.com/python/cpython/pull/102562#ref-commit-aaca52a
https://github.com/iritkatriel
https://github.com/Fidget-Spinner
pythongh-87092https://github.com/python/cpython/issues/87092
: refactor assemble() to a number of separate functions…https://github.com/Fidget-Spinner/cpython/commit/aaca52a4fc4ad2954d886735f46ec8091e8971b1
aaca52ahttps://github.com/Fidget-Spinner/cpython/commit/aaca52a4fc4ad2954d886735f46ec8091e8971b1
python#102562https://github.com/python/cpython/pull/102562
warsawhttps://github.com/warsaw
Apr 11, 2023 https://github.com/python/cpython/pull/102562#ref-commit-4c6e7d5
https://github.com/iritkatriel
https://github.com/warsaw
pythongh-87092https://github.com/python/cpython/issues/87092
: refactor assemble() to a number of separate functions…https://github.com/warsaw/cpython/commit/4c6e7d5d0cddce8d6dc8855619aed3f3cff9e2d1
4c6e7d5https://github.com/warsaw/cpython/commit/4c6e7d5d0cddce8d6dc8855619aed3f3cff9e2d1
python#102562https://github.com/python/cpython/pull/102562
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F102562
https://github.com/markshannon
markshannon https://github.com/markshannon
https://github.com/python/cpython/pull/102562/files/c9fc294ab939f456211fd04feaaf976a4a855e43
https://github.com/brandtbucher
brandtbucher https://github.com/brandtbucher
interpreter-core https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Ainterpreter-core
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Please reload this pagehttps://github.com/python/cpython/pull/102562
https://github.com/iritkatriel
https://github.com/markshannon
https://github.com/bedevere-bot
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.