Jeong, YunWon
9140ef583a
Bytecode parity - boolop, comprehension, CFG passes ( #7631 )
...
* Bytecode parity - boolop, comprehension, CFG passes
- Flatten nested same-op BoolOp and add IfExpr to jump_if
- Simplify is_name_imported to module-level only
- Enable inlined comprehensions in module/class scope
- Add TweakInlinedComprehensionScopes with fast_hidden tracking
- Track fb_range in FBlockInfo for with-statement line info
- Add constant subscript folding and unary Not folding
- Add emit_return_const_no_location for implicit returns
- Use JumpNoInterrupt for ternary/except jumps
- Add STACK_USE_GUIDELINE threshold for collection building
- Reorder CFG pipeline: inline small blocks earlier, resolve
line numbers before cold block extraction
- Add redirect_empty_unconditional_jump_targets,
reorder_conditional_chain_and_jump_back_blocks,
materialize_empty_conditional_exit_targets,
duplicate_shared_jump_back_targets passes
- Add borrow deoptimization for multi-handler, named-except,
protected conditional tail, and protected import joins
- Run folding/optimization passes twice around peephole
* Bytecode parity - slice augassign, async comp inline
- Augmented assignment with two-part slices uses BINARY_SLICE/STORE_SLICE
- Inline async comprehensions (remove await/async guards)
- Inlined comprehension cleanup jump uses JumpNoInterrupt
- Class firstlineno uses first decorator line when decorated
- Recurse into nested functions for static attribute collection
- Fold unary positive complex constants (+0.0j)
- Add deoptimize_borrow_for_folded_nonliteral_exprs pass
- Add inline_single_predecessor_artificial_expr_exit_blocks pass
- Skip shared artificial expr-stmt exit blocks in small-block inlining
- Mark folded boolop tail as folded_from_nonliteral_expr
* apply reviews
2026-04-21 00:10:00 +09:00
Jeong, YunWon
c57f4decd5
Fix test_code: compiler and code object improvements
...
- Add CO_NESTED flag (0x10) for nested function scopes
- Emit LOAD_SMALL_INT for integers 0..=255 instead of LOAD_CONST
- Eliminate dead constant expression statements (no side effects)
- Ensure None in co_consts for functions with no other constants
- Add code.__replace__() for copy.replace() support
- Mark test_co_lnotab and test_invalid_bytecode as expectedFailure
2026-03-17 10:54:12 +09:00
Jeong, YunWon
47c2acd40e
Fix code_offset_to_line handling
2026-03-16 15:25:29 +09:00
CPython Developers
2b06a0b172
Upgrade test_code from CPython 3.14.3
2026-03-16 15:25:29 +09:00
Jeong, YunWon
e79a1a1a66
Fix traceback ( #6569 )
...
* Fix traceback
* Update traceback from CPython 3.13.11
* unmark test_traceback
* fix code
* fix debug range
* fix tests
2025-12-30 16:58:53 +09:00
Jeong, YunWon
f22aed2614
Fix PyCode constructor/replace ( #6193 )
...
* Fix PyCode constructor
* Reuse MarshalError
2025-10-22 21:09:42 +09:00
Jeong, YunWon
b666c52df9
code object linetable ( #6150 )
...
* Code.replace
* implement linetable
2025-09-16 21:49:54 +09:00
Jeong, YunWon
18d7c1baf1
codeobj.qualname ( #5929 )
2025-07-10 10:27:03 +09:00
Blues-star
572053df82
est_co_lnotab_is_deprecated, 'test_invalid_bytecode' and est_code_hash_uses_bytecode test exceptions, add TODO
2024-02-19 20:30:06 +08:00
Blues-star
def5661728
Update test_code.py from CPython v3.12.0
2024-02-19 20:13:59 +08:00
zhangbl
0fbe57f96b
Update test_code.py code.py from CPython v3.11.
2023-08-27 02:13:11 +09:00
Gyubong
a6c07bc58f
Update test_code.py from CPython v3.12.0a0
2022-10-04 10:55:13 +09:00