Xuanteng Huang
35df4eb959
gh-126072: do not add `None` to `co_consts` if there is no docstring (GH-126101)
2024-10-30 09:01:09 +00:00
Mark Shannon
faa3272fb8
GH-125837: Split `LOAD_CONST` into three. (GH-125972)
...
* Add LOAD_CONST_IMMORTAL opcode
* Add LOAD_SMALL_INT opcode
* Remove RETURN_CONST opcode
2024-10-29 11:15:42 +00:00
Mikhail Efimov
079875e395
gh-125038: Fix crash after genexpr.gi_frame.f_locals manipulations ( #125178 )
2024-10-22 09:00:25 -07:00
Michael Droettboom
c6127af868
gh-125063: Emit slices as constants in the bytecode compiler ( #125064 )
...
* Make slices marshallable
* Emit slices as constants
* Update Python/marshal.c
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* Refactor codegen_slice into two functions so it
always has the same net effect
* Fix for free-threaded builds
* Simplify marshal loading of slices
* Only return SUCCESS/ERROR from codegen_slice
---------
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-10-08 13:18:39 -04:00
Irit Katriel
78aeb38f7d
gh-124285: Fix bug where bool() is called multiple times for the same part of a boolean expression ( #124394 )
2024-09-25 15:51:25 +01:00
Irit Katriel
9aa1f60e2d
gh-124058: remove _PyCompile_IsNestedScope, roll it into _PyCompile_IsInteractive ( #124061 )
2024-09-16 06:58:18 -07:00
Irit Katriel
a9594a34c6
gh-124022: Fix bug where class docstring is removed in interactive mode ( #124023 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-13 14:06:06 +00:00
Irit Katriel
6e06e01881
gh-124019: do not call codegen_annotations_in_scope if there are no annotations ( #124020 )
2024-09-12 20:24:15 +01:00
Irit Katriel
8145ebea58
gh-124013: remove _PyCompile_IsTopLevelAwait ( #124014 )
2024-09-12 19:58:32 +01:00
Irit Katriel
e07154fd1e
gh-123958: apply docstring removal optimization in ast_opt instead of codegen ( #123959 )
2024-09-11 17:02:28 +00:00
Irit Katriel
a2d0818c85
gh-123881: make compiler add the .generic_base base class without constructing AST nodes ( #123883 )
2024-09-10 16:16:00 +00:00
Irit Katriel
1a9d8917a3
gh-121404: split compile.c into compile.c and codegen.c ( #123651 )
2024-09-09 18:21:51 +01:00