Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-101072: support default and kw default in PyEval_EvalCodeEx for 3.11+ ↵ | Matthieu Dartiailh | 2023-02-07 | 1 | -3/+0 |
| | | | | | (#101127) Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | gh-98831: rewrite COPY and SWAP in the instruction definition DSL (#101620) | Irit Katriel | 2023-02-06 | 3 | -22/+21 |
| | |||||
* | gh-59956: Partial Fix for GILState API Compatibility with Subinterpreters ↵ | Eric Snow | 2023-02-06 | 1 | -21/+4 |
| | | | | | | | | | | | (gh-101431) The GILState API (PEP 311) implementation from 2003 made the assumption that only one thread state would ever be used for any given OS thread, explicitly disregarding the case of subinterpreters. However, PyThreadState_Swap() still facilitated switching between subinterpreters, meaning the "current" thread state (holding the GIL), and the GILState thread state could end up out of sync, causing problems (including crashes). This change addresses the issue by keeping the two in sync in PyThreadState_Swap(). I verified the fix against gh-99040. Note that the other GILState-subinterpreter incompatibility (with autoInterpreterState) is not resolved here. https://github.com/python/cpython/issues/59956 | ||||
* | gh-98831: rewrite MAKE_FUNCTION and BUILD_SLICE in the instruction ↵ | Irit Katriel | 2023-02-03 | 3 | -54/+53 |
| | | | | definition DSL (#101529) | ||||
* | gh-98831: rewrite SEND, GET_YIELD_FROM_ITER, RETURN_GENERATOR in the ↵ | Irit Katriel | 2023-02-03 | 3 | -42/+40 |
| | | | | instruction definition DSL (#101516) | ||||
* | gh-98831: rewrite RERAISE and CLEANUP_THROW in the instruction definition ↵ | Irit Katriel | 2023-02-02 | 3 | -34/+34 |
| | | | | DSL (#101511) | ||||
* | gh-98831: Modernize the LOAD_GLOBAL family (#101502) | Guido van Rossum | 2023-02-01 | 3 | -77/+66 |
| | |||||
* | gh-98831: rewrite PUSH_EXC_INFO and conditional jumps in the instruction ↵ | Irit Katriel | 2023-02-01 | 4 | -98/+97 |
| | | | | definition DSL (#101481) | ||||
* | gh-98831: Modernize the LOAD_ATTR family (#101488) | Guido van Rossum | 2023-02-01 | 3 | -230/+205 |
| | |||||
* | GH-100288: Skip extra work when failing to specialize LOAD_ATTR (GH-101354) | Brandt Bucher | 2023-01-31 | 1 | -60/+24 |
| | |||||
* | gh-98831: rewrite BEFORE_ASYNC_WITH and END_ASYNC_FOR in the instruction ↵ | Irit Katriel | 2023-01-31 | 3 | -38/+40 |
| | | | | definition DSL (#101458) | ||||
* | gh-98831: rewrite GET_LEN, GET_ITER, BEFORE_WITH and a few simple opcodes in ↵ | Irit Katriel | 2023-01-31 | 3 | -69/+59 |
| | | | | the instruction definition DSL (#101443) | ||||
* | gh-99955: use SUCCESS/ERROR return values in optimizer and assembler. Use ↵ | Irit Katriel | 2023-01-31 | 1 | -189/+142 |
| | | | | RETURN_IF_ERROR where appropriate. Fix a couple of bugs. (#101412) | ||||
* | gh-101400: Fix incorrect lineno in exception message on continue/break which ↵ | Dong-hee Na | 2023-01-30 | 1 | -2/+4 |
| | | | | are not in a loop (#101413) | ||||
* | gh-59956: Clarify Runtime State Status Expectations (gh-101308) | Eric Snow | 2023-01-30 | 3 | -149/+387 |
| | | | | | | | | | | | | | A PyThreadState can be in one of many states in its lifecycle, represented by some status value. Those statuses haven't been particularly clear, so we're addressing that here. Specifically: * made the distinct lifecycle statuses clear on PyThreadState * identified expectations of how various lifecycle-related functions relate to status * noted the various places where those expectations don't match the actual behavior At some point we'll need to address the mismatches. (This change also includes some cleanup.) https://github.com/python/cpython/issues/59956 | ||||
* | GH-101291: Refactor the `PyLongObject` struct into object header and ↵ | Mark Shannon | 2023-01-30 | 5 | -22/+22 |
| | | | | PyLongValue struct. (GH-101292) | ||||
* | gh-98831: Support conditional effects; use for LOAD_ATTR (#101333) | Guido van Rossum | 2023-01-30 | 3 | -51/+35 |
| | |||||
* | gh-39615: fix warning on return type mismatch (#101407) | Irit Katriel | 2023-01-30 | 1 | -1/+1 |
| | |||||
* | gh-39615: Add warnings.warn() skip_file_prefixes support (#100840) | Gregory P. Smith | 2023-01-28 | 2 | -34/+143 |
| | | | | | `warnings.warn()` gains the ability to skip stack frames based on code filename prefix rather than only a numeric `stacklevel=` via a new `skip_file_prefixes=` keyword argument. | ||||
* | Fix typos in pystate.c file (#101348) | Виталий Дмитриев | 2023-01-26 | 1 | -5/+5 |
| | |||||
* | gh-98831: rewrite RAISE_VARARGS in the instruction definition DSL (#101306) | Irit Katriel | 2023-01-25 | 3 | -16/+16 |
| | |||||
* | gh-98831: add variable stack effect support to cases generator (#101309) | Irit Katriel | 2023-01-25 | 2 | -176/+864 |
| | |||||
* | Fix some comments in ceval.c and fix lltrace output (#101297) | Guido van Rossum | 2023-01-24 | 1 | -6/+4 |
| | | | | | The comment at the top was rather outdated. :-) Also added a note about the dangers of dump_stack(). | ||||
* | gh-98831: rewrite pattern matching opcodes in the instruction definition DSL ↵ | Irit Katriel | 2023-01-24 | 3 | -69/+46 |
| | | | | (#101287) | ||||
* | GH-100762: Don't call `gen.throw()` in `gen.close()`, unless necessary. ↵ | Mark Shannon | 2023-01-24 | 4 | -6/+4 |
| | | | | | | (GH-101013) * Store exception stack depth in YIELD_VALUE's oparg and use it avoid expensive gen.throw() in gen.close() where possible. | ||||
* | gh-98831: rewrite CHECK_EG_MATCH opcode in the instruction definition DSL ↵ | Irit Katriel | 2023-01-24 | 4 | -60/+29 |
| | | | | (#101269) | ||||
* | gh-59956: Allow the "Trashcan" Mechanism to Work Without a Thread State ↵ | Eric Snow | 2023-01-23 | 1 | -0/+16 |
| | | | | | | | | | | | | (gh-101209) We've factored out a struct from the two PyThreadState fields. This accomplishes two things: * make it clear that the trashcan-related code doesn't need any other parts of PyThreadState * allows us to use the trashcan mechanism even when there isn't a "current" thread state We still expect the caller to hold the GIL. https://github.com/python/cpython/issues/59956 | ||||
* | Fix typo in comment in compile.c (#101194) | Ikko Eltociear Ashimine | 2023-01-20 | 1 | -1/+1 |
| | |||||
* | gh-101181: Fix `unused-variable` warning in `pystate.c` (#101188) | Nikita Sobolev | 2023-01-20 | 1 | -0/+3 |
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | ||||
* | gh-59956: Fix Function Groupings in pystate.c (gh-101172) | Eric Snow | 2023-01-20 | 1 | -237/+352 |
| | | | | | This is a follow-up to gh-101161. The objective is to make it easier to read Python/pystate.c by grouping the functions there in a consistent way. This exclusively involves moving code around and adding various kinds of comments. https://github.com/python/cpython/issues/59956 | ||||
* | gh-101169: reduce the implementation of except* by one bytecode instruction ↵ | Irit Katriel | 2023-01-19 | 1 | -16/+11 |
| | | | | (#101170) | ||||
* | gh-59956: Clarify GILState-related Code (gh-101161) | Eric Snow | 2023-01-19 | 3 | -219/+344 |
| | | | | | | | | | | The objective of this change is to help make the GILState-related code easier to understand. This mostly involves moving code around and some semantically equivalent refactors. However, there are a also a small number of slight changes in structure and behavior: * tstate_current is moved out of _PyRuntimeState.gilstate * autoTSSkey is moved out of _PyRuntimeState.gilstate * autoTSSkey is initialized earlier * autoTSSkey is re-initialized (after fork) earlier https://github.com/python/cpython/issues/59956 | ||||
* | gh-100712: make it possible to disable specialization (for debugging) (#100713) | Irit Katriel | 2023-01-19 | 3 | -0/+60 |
| | |||||
* | GH-98831: Move assorted macros from ceval.h to a new header (#101116) | Guido van Rossum | 2023-01-18 | 3 | -383/+358 |
| | |||||
* | GH-98831: Implement array support in cases generator (#100912) | Guido van Rossum | 2023-01-17 | 3 | -121/+95 |
| | | | | | | | | You can now write things like this: ``` inst(BUILD_STRING, (pieces[oparg] -- str)) { ... } inst(LIST_APPEND, (list, unused[oparg-1], v -- list, unused[oparg-1])) { ... } ``` Note that array output effects are only partially supported (they must be named `unused` or correspond to an input effect). | ||||
* | GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983) | Mark Shannon | 2023-01-16 | 6 | -202/+199 |
| | |||||
* | GH-100892: consolidate `HEAD_LOCK/HEAD_UNLOCK` macros (#100953) | Kumar Aditya | 2023-01-15 | 2 | -9/+0 |
| | |||||
* | GH-98831: Identify instructions that don't use oparg (#100957) | Guido van Rossum | 2023-01-14 | 1 | -57/+57 |
| | | | | | | | For these the instr_format field uses IX instead of IB. Register instructions use IX, IB, IBBX, IBBB, etc. Also: Include the closing '}' in Block.tokens, for completeness | ||||
* | gh-86682: Adds sys._getframemodulename as an alternative to using _getframe ↵ | Steve Dower | 2023-01-13 | 2 | -1/+108 |
| | | | | | (GH-99520) Also updates calls in collections, doctest, enum, and typing modules to use _getframemodulename first when available. | ||||
* | GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924) | Mark Shannon | 2023-01-11 | 5 | -67/+68 |
| | |||||
* | GH-98831: Refactor instr format code and change to enum (#100895) | Guido van Rossum | 2023-01-09 | 1 | -168/+169 |
| | |||||
* | GH-100126: Skip incomplete frames in more places (GH-100613) | Brandt Bucher | 2023-01-09 | 4 | -22/+8 |
| | |||||
* | gh-87447: Fix walrus comprehension rebind checking (#100581) | Nikita Sobolev | 2023-01-08 | 1 | -1/+2 |
| | | | | Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> | ||||
* | Update copyright years to 2023. (gh-100848) | Benjamin Peterson | 2023-01-08 | 1 | -1/+1 |
| | |||||
* | GH-90829: Fix empty iterable error message in min/max (#31181) | Nnarol | 2023-01-08 | 1 | -1/+1 |
| | |||||
* | gh-100776: Fix misleading default value in help(input) (#100788) | Shantanu | 2023-01-08 | 2 | -4/+4 |
| | |||||
* | gh-88696: clean up dead argument to compiler_make_closure (GH-100806) | Carl Meyer | 2023-01-07 | 1 | -23/+7 |
| | |||||
* | gh-100758: Refactor initialisation of frame headers into a single function ↵ | Irit Katriel | 2023-01-06 | 3 | -44/+11 |
| | | | | (_PyFrame_Initialize) (GH-100759) | ||||
* | GH-99005: More intrinsics (GH-100774) | Mark Shannon | 2023-01-06 | 6 | -88/+50 |
| | | | * Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics. | ||||
* | gh-98831: Regenerate Python/opcode_metadata.h (GH-100778) | Zachary Ware | 2023-01-05 | 1 | -4/+1 |
| |