summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dis.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) ↵Brandt Bucher2022-07-221-1/+1
| | | | | (GH-95143) (cherry picked from commit e402b26b7fb953a2f0c17a0044bb6d6cbd726e54)
* [3.11] gh-92228: disable the compiler's 'small exit block inlining' ↵Christian Heimes2022-07-071-10/+8
| | | | | | | | | | optimization for blocks that have a line number (GH-94592) (GH-94643) Inlining of code that corresponds to source code lines, can make it hard to distinguish later between code which is only reachable from except handlers, and that which is reachable in normal control flow. This caused problems with the debugger's jump feature. This PR turns off the inlining optimisation for code which has line numbers. We still inline things like the implicit "return None".. (cherry picked from commit bde06e1b8381f140b296a397ddd1deb1c784ff8e) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.11] gh-94485: Set line number of module's RESUME instruction to 0 as ↵Łukasz Langa2022-07-051-9/+9
| | | | | | | | | specified by PEP 626 (GH-94552) (GH-94562) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Mark Shannon <mark@hotpy.org> (cherry picked from commit 324d01944d16868b07df9e8eef6987766a31a36d)
* GH-91389: Fix dis position information for CACHEs (GH-93663) (GH-93921)Brandt Bucher2022-06-171-2/+34
| | | (cherry picked from commit f8e576be0a7cd38f753f31cf4178db81a602fc32)
* gh-92932: dis._unpack_opargs should handle EXTENDED_ARG_QUICK (gh-92945)Miss Islington (bot)2022-06-031-0/+21
| | | | | (cherry picked from commit b013804134b07894205b06744628f6b25b879d85) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* gh-92619: Fix bug where the compiler duplicates exit blocks unnecessarily ↵Miss Islington (bot)2022-05-101-15/+7
| | | | | | | | | (GH-92620) (GH-92621) (cherry picked from commit 7c6b7ade8df35355484d3944779fe35dcc560aab) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-90997: Show cached inline values in `dis` output (#92360)Brandt Bucher2022-05-061-0/+31
|
* gh-91276: revert the increase of dis output width (GH-92126)Irit Katriel2022-05-021-253/+265
|
* GH-88116: Use a compact format to represent end line and column offsets. ↵Mark Shannon2022-04-211-18/+5
| | | | | | | | | | | | (GH-91666) * Stores all location info in linetable to conform to PEP 626. * Remove column table from code objects. * Remove end-line table from code objects. * Document new location table format
* gh-90997: bpo-46841: Disassembly of quickened code (GH-32099)penguin_wwy2022-04-191-1/+140
|
* gh-91276: make space for longer opcodes in dis output (GH-91444)Irit Katriel2022-04-121-227/+215
|
* bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative (GH-32400)Irit Katriel2022-04-111-10/+18
|
* bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221)Irit Katriel2022-04-051-1/+2
|
* bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)Irit Katriel2022-04-011-42/+43
|
* bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD ↵Irit Katriel2022-03-311-6/+6
| | | | (GH-32115)
* Use low bit of LOAD_GLOBAL's oparg to indicate whether it should push an ↵Mark Shannon2022-03-171-185/+170
| | | | additional NULL. (GH-31933)
* bpo-46841: Use inline caching for calls (GH-31709)Brandt Bucher2022-03-071-148/+147
|
* bpo-46841: Use inline caching for attribute accesses (GH-31640)Brandt Bucher2022-03-031-1/+1
|
* bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622)Brandt Bucher2022-03-011-123/+123
|
* bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)Mark Shannon2022-02-281-172/+172
|
* bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543)Brandt Bucher2022-02-251-105/+105
|
* bpo-46329: Streamline calling sequence a bit. (GH-31465)Mark Shannon2022-02-211-19/+19
| | | | | | | | | | | | | | * Move handling of bound-methods to PRECALL. * Remove call_shape.postcall_shrink * Remove call_shape.callable * Remove call_shape.callable. Change CALL oparg to match PRECALL oparg. * Move KW_NAMES before PRECALL. * Update opcode docs in dis.rst
* bpo-46329: Change calling sequence (again) (GH-31373)Mark Shannon2022-02-181-181/+204
| | | | * Change calling sequence: Add PUSH_NULL. Merge PRECALL_FUNCTION and PRECALL_METHOD into PRECALL.
* bpo-46724: Fix dis support for overflow args (GH-31285)Saul Shanabrook2022-02-181-5/+28
|
* Remove offsets from expected output in test.test_dis (GH-31369)Mark Shannon2022-02-161-308/+360
|
* bpo-46329: Split calls into precall and call instructions. (GH-30855)Mark Shannon2022-01-281-190/+217
| | | | | | | | | | | | | | * Add PRECALL_FUNCTION opcode. * Move 'call shape' varaibles into struct. * Replace CALL_NO_KW and CALL_KW with KW_NAMES and CALL instructions. * Specialize for builtin methods taking using the METH_FASTCALL | METH_KEYWORDS protocol. * Allow kwnames for specialized calls to builtin types. * Specialize calls to tuple(arg) and str(arg).
* bpo-46458: emit code for else of a try block immediately after the try body ↵Irit Katriel2022-01-271-68/+60
| | | | (GH-30751)
* bpo-46528: Simplify the VM's stack manipulations (GH-30902)Brandt Bucher2022-01-261-2/+2
|
* bpo-45578: add a test case for `dis.findlabels` (GH-30058)Nikita Sobolev2022-01-261-0/+10
|
* bpo-46422: use `dis.Positions` in `dis.Instruction` (GH-30716)Nikita Sobolev2022-01-241-10/+18
| | | Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
* bpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544)Irit Katriel2022-01-131-24/+32
|
* bpo-45923: Handle call events in bytecode (GH-30364)Mark Shannon2022-01-061-405/+475
| | | | * Add a RESUME instruction to handle "call" events.
* bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)Irit Katriel2022-01-041-48/+59
| | | | | | * bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE * do not assume that an exception group is truthy
* bpo-45711: Remove type and traceback from exc_info (GH-30122)Irit Katriel2021-12-171-82/+76
| | | | | | | | * Do not PUSH/POP traceback or type to the stack as part of exc_info * Remove exc_traceback and exc_type from _PyErr_StackItem * Add to what's new, because this change breaks things like Cython
* bpo-44525: Split calls into PRECALL and CALL (GH-30011)Mark Shannon2021-12-141-26/+26
| | | | | | | | | | * Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
* bpo-45292: [PEP-654] add except* (GH-29581)Irit Katriel2021-12-141-30/+22
|
* bpo-44525: Copy free variables in bytecode to allow calls to inner functions ↵Mark Shannon2021-11-231-52/+56
| | | | | | | | | | | to be specialized (GH-29595) * Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
* bpo-45636: Merge all numeric operators (GH-29482)Brandt Bucher2021-11-111-9/+9
|
* bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495)Irit Katriel2021-11-101-89/+87
|
* bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG ↵Irit Katriel2021-11-091-0/+21
| | | | before a no-arg opcode (GH-29480)
* bpo-45578: add tests for `dis.distb` (GH-29332)Nikita Sobolev2021-11-031-0/+40
|
* Normalize jumps in compiler. All forward jumps to use JUMP_FORWARD. (GH-28755)Mark Shannon2021-10-061-2/+2
|
* bpo-45168: change dis output to omit missing values rather than replacing ↵Irit Katriel2021-09-141-8/+8
| | | | them by their index (GH-28313)
* bpo-45017: move opcode-related logic from modulefinder to dis (GH-28246)Irit Katriel2021-09-091-0/+33
|
* bpo-43950: support positions for dis.Instructions created through ↵Batuhan Taskaya2021-09-031-0/+5
| | | | dis.Bytecode (GH-28142)
* bpo-45056: Remove trailing unused constants from co_consts (GH-28109)Inada Naoki2021-09-021-5/+1
|
* bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to ↵Mark Shannon2021-08-091-60/+59
| | | | after CFG optimization. (GH-27656)
* bpo-44626: Merge basic blocks earlier to enable better handling of exit ↵Mark Shannon2021-07-151-17/+32
| | | | blocks without line numbers (GH-27138)
* bpo-43950: Add option to opt-out of PEP-657 (GH-27023)Ammar Askar2021-07-071-1/+3
| | | | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-44530: Add co_qualname field to PyCodeObject (GH-26941)Gabriele N. Tornetta2021-07-071-50/+44
|