Title: Bytecode parity: align borrow optimization with CFG traversal by youknowone · Pull Request #7773 · RustPython/RustPython · GitHub
Open Graph Title: Bytecode parity: align borrow optimization with CFG traversal by youknowone · Pull Request #7773 · RustPython/RustPython
X Title: Bytecode parity: align borrow optimization with CFG traversal by youknowone · Pull Request #7773 · RustPython/RustPython
Description: Summary Align LOAD_FAST_BORROW optimization with CPython-style CFG traversal instead of post-processing bytecode after borrow optimization. Details Marks assertion-success and unprotected debug>=4 tails before optimize_load_fast_borrow, so those blocks are excluded during traversal rather than rewritten afterward. Treats exception handlers that POP_EXCEPT and then return/continue normally as resuming handlers, avoiding over-deoptimization after conditional reraises. Narrows async-finally early-return borrow deoptimization so async-for GET_ANEXT/SEND iterator paths are not mistaken for relevant async-finally sends. Adds regression coverage for imaplib.Idler.__exit__-style debug tails and the test_compile.py async comprehension capture case. Validation cargo fmt cargo test -p rustpython-codegen test_match_async_comprehension_iter_keeps_capture_borrow -- --nocapture cargo test -p rustpython-codegen test_imap_idle_status_debug_tail_keeps_borrow -- --nocapture cargo test -p rustpython-codegen deopts -- --nocapture cargo build --release python scripts/compare_bytecode.py --filter 'test/test_compile.py' --detail --max-diffs 300 -j 1 -o /tmp/compare_test_compile.after_rebase.report python scripts/compare_bytecode.py --filter 'imaplib.py' --detail --max-diffs 200 -j 1 -o /tmp/compare_imaplib.after_rebase.report Summary by CodeRabbit Chores Updated spell-check word allowlist configuration with additional correctly-spelled terms for enhanced recognition. Improved symbol-table free-variable analysis within the compiler for more accurate scoping behavior in functions. Enhanced development tooling with better temporary file creation and explicit UTF-8 encoding support.
Open Graph Description: Summary Align LOAD_FAST_BORROW optimization with CPython-style CFG traversal instead of post-processing bytecode after borrow optimization. Details Marks assertion-success and unprotected debug>...
X Description: Summary Align LOAD_FAST_BORROW optimization with CPython-style CFG traversal instead of post-processing bytecode after borrow optimization. Details Marks assertion-success and unprotected debug&am...
Opengraph URL: https://github.com/RustPython/RustPython/pull/7773
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4ceaa4b3-1271-f743-54b2-113d69a4f3d3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E54E:2625C0:5D2BED:7BF356:6A5CCE0F |
| html-safe-nonce | 5edc5038b97c26c5f2abdfa76efed931e513a210a56e86c4a39626b17e62ab03 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTRFOjI2MjVDMDo1RDJCRUQ6N0JGMzU2OjZBNUNDRTBGIiwidmlzaXRvcl9pZCI6IjExODg5MjU5Mjk0NzA4NzMxMDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a54560ecc31e6c34eec650d67239f454b6a79991621442f58193dc367835efc7 |
| hovercard-subject-tag | pull_request:3622151769 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/7773/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | Summary Align LOAD_FAST_BORROW optimization with CPython-style CFG traversal instead of post-processing bytecode after borrow optimization. Details Marks assertion-success and unprotected debug>... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width