Title: Compiler parity: docstring dedent, StopIteration wrapper, constant folding by youknowone · Pull Request #7530 · RustPython/RustPython · GitHub
Open Graph Title: Compiler parity: docstring dedent, StopIteration wrapper, constant folding by youknowone · Pull Request #7530 · RustPython/RustPython
X Title: Compiler parity: docstring dedent, StopIteration wrapper, constant folding by youknowone · Pull Request #7530 · RustPython/RustPython
Description: Fix clean_doc to skip first line in margin calculation (match CPython) Add PEP 479 StopIteration handler to generator/coroutine bodies (SETUP_CLEANUP + CALL_INTRINSIC_1(StopIterationError) + RERAISE) Remove yield-from/await -1 depth compensation in RESUME DEPTH1 Add constant condition elimination for if/while (if False, while True) Add POP_JUMP_IF_NONE/NOT_NONE for x is None patterns Add binary op constant folding (*, **, +, -, <<, >>, etc.) Add expr_constant() for compile-time boolean evaluation Summary by CodeRabbit Bug Fixes Generators/coroutines now follow PEP 479 semantics: StopIteration is converted and propagated correctly. Performance Added compile-time constant folding for binary ops and conditionals. Faster handling of large dict literals and optimized %-style string formatting. Faster null-check jumps. Improvements Enhanced bytecode/CFG optimization pipeline and line-tracking for monitoring. Symbol table children now hide certain inlined comprehensions.
Open Graph Description: Fix clean_doc to skip first line in margin calculation (match CPython) Add PEP 479 StopIteration handler to generator/coroutine bodies (SETUP_CLEANUP + CALL_INTRINSIC_1(StopIterationError) + RERAIS...
X Description: Fix clean_doc to skip first line in margin calculation (match CPython) Add PEP 479 StopIteration handler to generator/coroutine bodies (SETUP_CLEANUP + CALL_INTRINSIC_1(StopIterationError) + RERAIS...
Opengraph URL: https://github.com/RustPython/RustPython/pull/7530
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:23b30080-bbc1-8c42-4e1c-49f1fa8e0525 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E218:3926CB:97D732:C93521:6A5BA6FF |
| html-safe-nonce | 497a1b05bd1bb21663ac42dae4fa568ad33b7bb3a432aa6c59903f177f5a0715 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjE4OjM5MjZDQjo5N0Q3MzI6QzkzNTIxOjZBNUJBNkZGIiwidmlzaXRvcl9pZCI6Ijc5NDk5NzQ2MDU0MzU0Nzk4MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2674031a1ffd8480ffa4bb9a98ee5d0ab62a0ff092ec945fcd9b6e6ea3d1e528 |
| hovercard-subject-tag | pull_request:3460907928 |
| 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/7530/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 | Fix clean_doc to skip first line in margin calculation (match CPython) Add PEP 479 StopIteration handler to generator/coroutine bodies (SETUP_CLEANUP + CALL_INTRINSIC_1(StopIterationError) + RERAIS... |
| 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