summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dis.py
Commit message (Collapse)AuthorAgeFilesLines
* GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. ↵Mark Shannon2024-06-181-184/+202
| | | | | | | | | (#120640) * Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions. * Add LOAD_SPECIAL instruction * Reimplement `with` and `async with` statements using LOAD_SPECIAL
* gh-119180: PEP 649 compiler changes (#119361)Jelle Zijlstra2024-06-111-20/+9
|
* gh-93554: add test for quickening of code in loops ending with conditional ↵Irit Katriel2024-05-291-0/+30
| | | | statement (#119485)
* gh-119180: Add LOAD_COMMON_CONSTANT opcode (#119321)Jelle Zijlstra2024-05-221-117/+117
| | | | | | | | | | The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* GH-118095: Use broader specializations of CALL in tier 1, for better tier 2 ↵Mark Shannon2024-05-041-1/+1
| | | | | | | | | | support of calls. (GH-118322) * Add CALL_PY_GENERAL, CALL_BOUND_METHOD_GENERAL and call CALL_NON_PY_GENERAL specializations. * Remove CALL_PY_WITH_DEFAULTS specialization * Use CALL_NON_PY_GENERAL in more cases when otherwise failing to specialize
* gh-112383: teach dis how to interpret ENTER_EXECUTOR (#117171)Irit Katriel2024-03-231-10/+1
|
* gh-112720: make it easier to subclass and modify dis.ArgResolver's jump arg ↵Irit Katriel2024-02-161-0/+16
| | | | resolution (#115564)
* GH-112354: `END_FOR` instruction to only pop one value. (GH-114247)Mark Shannon2024-01-241-116/+120
| | | | * Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.
* gh-114265: move line number propagation before cfg optimization, remove ↵Irit Katriel2024-01-191-10/+4
| | | | guarantee_lineno_for_exits (#114267)
* gh-107901: jump leaving an exception handler doesn't need an eval break ↵Irit Katriel2024-01-111-2/+2
| | | | check (#113943)
* gh-107901: synthetic jumps which are not at end of loop no longer check the ↵Irit Katriel2024-01-061-28/+28
| | | | eval breaker (#113721)
* GH-112383: Fix test_loop_quicken when an executor is installed (GH-113153)Brandt Bucher2023-12-151-2/+7
|
* gh-112720: Move dis's cache output code to the Formatter, labels lookup to ↵Irit Katriel2023-12-151-4/+13
| | | | the arg_resolver. Reduce the number of parameters passed around. (#113108)
* gh-112962: in dis module, put cache information in the Instruction instead ↵Irit Katriel2023-12-131-7/+34
| | | | of creating fake Instructions to represent it (#113016)
* gh-112720: Move instruction formatting from the dis.Instruction class to a ↵Irit Katriel2023-12-091-4/+11
| | | | new class dis.InstructionFormatter. Add the ArgResolver class. (#112722)
* gh-112620: Fix dis error on show_cache with labels (#112621)Irit Katriel2023-12-031-0/+12
|
* gh-112137: change dis output to show no-lineno as -- instead of None (#112335)Irit Katriel2023-11-231-15/+15
|
* gh-112137: change dis output to display labels instead of offsets (#112138)Irit Katriel2023-11-221-754/+697
|
* gh-111969: refactor to make it easier to construct a dis.Instruction object ↵Irit Katriel2023-11-121-0/+17
| | | | (#111970)
* gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and ↵Irit Katriel2023-11-031-137/+137
| | | | frame state (#111648)
* gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 ↵Irit Katriel2023-11-021-138/+138
| | | | (#111459)
* gh-109923: set line number on the POP_TOP that follows a RETURN_GENERATOR ↵Irit Katriel2023-09-271-10/+4
| | | | (#109924)
* gh-105658: fix excess trace events for except block ending with a ↵Irit Katriel2023-09-141-5/+7
| | | | conditional block (#109384)
* GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)Brandt Bucher2023-09-131-23/+23
|
* gh-109256: allocate opcode IDs for internal opcodes in their own range (#109269)Irit Katriel2023-09-121-176/+176
|
* gh-109039: Branch prediction for Tier 2 interpreter (#109038)Guido van Rossum2023-09-111-109/+113
| | | | | | | | | | | This adds a 16-bit inline cache entry to the conditional branch instructions POP_JUMP_IF_{FALSE,TRUE,NONE,NOT_NONE} and their instrumented variants, which is used to keep track of the branch direction. Each time we encounter these instructions we shift the cache entry left by one and set the bottom bit to whether we jumped. Then when it's time to translate such a branch to Tier 2 uops, we use the bit count from the cache entry to decided whether to continue translating the "didn't jump" branch or the "jumped" branch. The counter is initialized to a pattern of alternating ones and zeros to avoid bias. The .pyc file magic number is updated. There's a new test, some fixes for existing tests, and a few miscellaneous cleanups.
* GH-108614: Add `RESUME_CHECK` instruction (GH-108630)Mark Shannon2023-09-071-145/+145
|
* gh-107932: Fix merge conflict in test_dis (GH-108478)Mark Shannon2023-08-251-2/+2
| | | Fix merge conflict in test_dis
* gh-107932: Fix dis module for bytecode that does not have an associated ↵Corvin2023-08-251-387/+416
| | | | source line (GH-107988)
* gh-105481: generate op IDs from bytecode.c instead of hard coding them in ↵Irit Katriel2023-08-161-185/+184
| | | | opcode.py (#107971)
* GH-105848: Simplify the arrangement of CALL's stack (GH-107788)Brandt Bucher2023-08-091-28/+28
|
* GH-104584: Miscellaneous fixes for -Xuops (GH-106908)Brandt Bucher2023-07-201-1/+5
|
* GH-106008: Make implicit boolean conversions explicit (GH-106003)Brandt Bucher2023-06-291-107/+130
|
* gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)hms2023-06-291-8/+8
| | | | | | This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
* GH-77273: Better bytecodes for f-strings (GH-6132)Mark Shannon2023-06-141-4/+6
|
* GH-105678: Split MAKE_FUNCTION into MAKE_FUNCTION and SET_FUNCTION_ATTRIBUTE ↵Mark Shannon2023-06-131-29/+35
| | | | (GH-105680)
* gh-102676: Add more convenience properties to `dis.Instruction` (#103969)Tomas R2023-06-111-176/+300
| | | | | | | | Adds start_offset, cache_offset, end_offset, baseopcode, baseopname, jump_target and oparg to dis.Instruction. Also slightly improves the disassembly output by allowing opnames to overflow into the space reserved for opargs.
* gh-104635: Eliminate redundant STORE_FAST instructions in the compiler ↵Dong-hee Na2023-06-071-2/+3
| | | | (gh-105320)
* GH-105229: Replace some superinstructions with single instruction ↵Mark Shannon2023-06-051-26/+23
| | | | equivalent. (GH-105230)
* GH-104584: Plugin optimizer API (GH-105100)Mark Shannon2023-06-021-112/+113
|
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-12/+21
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-103963: Make dis display names of args for intrinsics opcodes (#104029)Juhi Chandalia2023-05-031-1/+40
|
* GH-103804: Add test for dis.disco (#103901)Juhi Chandalia2023-04-281-0/+7
|
* GH-99944: Make dis display the value of oparg of KW_NAMES (#103856)Juhi Chandalia2023-04-261-0/+24
| | | | Co-authored-by: chilaxan <chilaxan@gmail.com>
* GH-103804: Add test for dis.findlinestarts (#103806)Juhi Chandalia2023-04-251-0/+8
|
* gh-102114: Make dis print more concise tracebacks for syntax errors in str ↵chgnrdv2023-04-151-0/+7
| | | | inputs (#102115)
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-121-14/+12
| | | | | | | | | | (GH-103083) * The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
* GH-88691: Shrink the CALL caches (GH-103230)Brandt Bucher2023-04-051-129/+129
|
* GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022)Brandt Bucher2023-03-291-1/+1
|
* gh-103046: Display current line correctly for `dis.disco()` with CACHE ↵gaogaotiantian2023-03-271-0/+29
| | | | entries (#103047)