Bénédikt Tran
07f0bf5aa4
gh-123165: update docs signature for `dis.disassemble` ( #123808 )
2024-09-10 15:25:27 +01:00
jlallas384
bac0e115b8
gh-123550: Fix code snippet of `BUILD_TUPLE` in `dis` docs ( #123551 )
2024-09-01 07:11:40 +01:00
Bénédikt Tran
b1d3bd2e09
gh-123165: make `dis` functions render positions on demand ( #123168 )
2024-08-21 14:46:24 +01:00
mathysEthical
e9287ea426
fix typo in dis.rst ( #121612 )
2024-08-17 14:20:58 +05:30
Irit Katriel
1422500d02
gh-121367: [doc] BUILD_TUPLE arg can be 0 ( #122663 )
2024-08-05 10:17:55 +01:00
Mark Shannon
2e14a52cce
GH-122160: Remove BUILD_CONST_KEY_MAP opcode. (GH-122164)
2024-07-25 16:24:29 +01:00
Kirill Podoprigora
98e5bdef0e
Docs: Fix typo in description of ``INTRINSIC_ASYNC_GEN_WRAP`` ( #122004 )
2024-07-19 08:30:01 +01:00
Mark Shannon
9cefcc0ee7
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. ( #120640 )
...
* Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions.
* Add LOAD_SPECIAL instruction
* Reimplement `with` and `async with` statements using LOAD_SPECIAL
2024-06-18 12:17:46 +01:00
David Lowry-Duda
5bdc87b885
gh-120178: Documentation typo corrections ( #120179 )
2024-06-06 14:35:24 -07:00
Irit Katriel
770f3c1ead
gh-114616: Improve docs regarding changes to caches representation in dis ( #120033 )
2024-06-04 23:00:02 +00:00
Jelle Zijlstra
98e855fcc1
gh-119180: Add LOAD_COMMON_CONSTANT opcode ( #119321 )
...
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>
2024-05-22 00:46:39 +00:00
Ned Batchelder
bcb435ee8f
docs: module page titles should not start with a link to themselves ( #117099 )
2024-05-08 20:34:40 +01:00
Xie Yanbo
9762122235
Fix several typos in documentation (GH-118625)
2024-05-07 09:23:06 +00:00
Christopher Chianelli
a17f313e39
gh-117339: Use NULL instead of None for LOAD_SUPER_ATTR in dis docs (GH-117343)
2024-03-29 06:26:56 +08:00
Ned Batchelder
474204765b
docs: use consistent .append() in dis.rst ( #115434 )
...
The STACK variable is described as like a Python list, so pushing to it should be done with .append() consistently throughout.
2024-02-15 02:14:03 -05:00
Mark Shannon
981d172f7f
GH-112354: `END_FOR` instruction to only pop one value. (GH-114247)
...
* Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.
2024-01-24 15:10:17 +00:00
Kirill Podoprigora
6d30cbee01
Docs: Fix typo in code snippet (GH-114421)
2024-01-22 17:56:30 +02:00
Alex Waygood
f1f8392432
Document the `co_lines` method on code objects ( #113682 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 19:29:24 +00:00
denballakh
f7c5a7a0f9
fix bullet-list in `LOAD_SUPER_ATTR` documentation on `dis` page ( #113461 )
2023-12-24 12:28:39 -08:00
Irit Katriel
428c9812cb
gh-112962: in dis module, put cache information in the Instruction instead of creating fake Instructions to represent it ( #113016 )
2023-12-13 12:00:21 +00:00
Alex Waygood
e9707d3c3d
gh-101100: Improve documentation of code object attributes ( #112781 )
2023-12-06 20:15:46 +00:00
Alex Waygood
d109f637c0
gh-101100: Properly document frame object attributes ( #112735 )
2023-12-05 19:27:59 +00:00
Irit Katriel
10e1a0c916
gh-112137: change dis output to display labels instead of offsets ( #112138 )
2023-11-22 22:36:55 +00:00
Irit Katriel
d49aba5a7a
gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and frame state ( #111648 )
2023-11-03 10:01:36 +00:00
Irit Katriel
52cc4af6ae
gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 ( #111459 )
2023-11-02 10:18:43 +00:00
Matthieu Dartiailh
198aa67d4c
gh-107457: update dis documentation with changes in 3.12 ( #108900 )
2023-10-17 12:59:34 +00:00
Radislav Chugunov
0d805b998d
gh-108826: Document `dis` module CLI and rename `_test` function to `main` ( #108827 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-10-10 16:31:28 -06:00
Brandt Bucher
22e65eecaa
GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)
2023-09-13 10:25:45 -07:00
Oleksandr Kravets
a0c06a4f93
Fix variable name in dis documentation example (GH-109343)
...
BINARY_SUBSCR example erroneously uses two different names `key` and `index` to refer to the same variable. STORE_SUBSCR and DELETE_SUBSCR use only `key` in the same context. Changing `index` to `key` for consistency.
2023-09-13 08:07:56 +03:00
Irit Katriel
b303d3ad3e
gh-109319: deprecate dis.HAVE_ARGUMENT ( #109320 )
2023-09-12 16:45:35 +01:00
Irit Katriel
8b55adfa8f
gh-109256: allocate opcode IDs for internal opcodes in their own range ( #109269 )
2023-09-12 10:36:17 +00:00
Erlend E. Aasland
cb1184280b
Docs: Resolve Sphinx warnings in dis.rst ( #108476 )
...
- Link to the code objects reference
- Suppress link to deliberately undocumented builtins.__build_class__
- Suppress links for example methods
2023-08-25 13:28:47 +02:00
Corvin
24aa249a66
gh-107932: Fix dis module for bytecode that does not have an associated source line (GH-107988)
2023-08-25 09:31:26 +01:00
Brandt Bucher
a9caf9cf90
GH-105848: Simplify the arrangement of CALL's stack (GH-107788)
2023-08-09 18:19:39 +00:00
Dong-hee Na
a24e25d74b
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)
2023-07-31 00:40:37 +09:00
Serhiy Storchaka
fcc816dbff
gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920)
2023-07-21 10:52:07 +03:00
Irit Katriel
40f3f11a77
gh-105481: Generate the opcode lists in dis from data extracted from bytecodes.c ( #106758 )
2023-07-18 19:42:44 +01:00
Brandt Bucher
7b2d94d875
GH-106008: Make implicit boolean conversions explicit (GH-106003)
2023-06-29 13:49:54 -07:00
hms
8bff940ad6
gh-105775: Convert LOAD_CLOSURE to a pseudo-op ( #106059 )
...
This enables super-instruction formation,
removal of checks for uninitialized variables,
and frees up an instruction.
2023-06-29 09:34:00 -07:00
Irit Katriel
14d01262da
gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and replace by their new versions ( #105865 )
2023-06-17 17:00:16 +01:00
Carl Meyer
b356a4749a
gh-105678: document SET_FUNCTION_ATTRIBUTE ( #105843 )
2023-06-16 12:36:59 -05:00
Alex Doe
486b52a315
bpo-44530: Document the change in MAKE_FUNCTION behavior ( #93189 )
...
* bpo-44530: Document the change in MAKE_FUNCTION behavior
Fixes dis module documentation for MAKE_FUNCTION due to 2f180ce2cb
(bpo-44530, released as part of 3.11) removes the qualified name at TOS
2023-06-15 19:04:57 -05:00
Mark Shannon
1d857da7f0
GH-77273: Better bytecodes for f-strings (GH-6132)
2023-06-14 16:15:08 +01:00
Tomas R
18d16e93b6
gh-102676: Add more convenience properties to `dis.Instruction` ( #103969 )
...
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.
2023-06-11 08:50:34 -07:00
Jelle Zijlstra
060277d96b
gh-103921: Document PEP 695 ( #104642 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-26 10:48:17 -07:00
Nyakku Shigure
3bc94e678f
docs: fix wrong indentation causing rendering error in dis page ( #104661 )
2023-05-19 23:11:21 +03:00
Carl Meyer
c3b595e73e
gh-97933: (PEP 709) inline list/dict/set comprehensions ( #101441 )
...
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-09 11:02:14 -06:00
Adam Turner
f5088006ca
GH-97950: Use new-style index directive ('builtin') ( #104164 )
...
* Uncomment builtin removal in pairindextypes
* Use new-style index directive ('builtin') - C API
* Use new-style index directive ('builtin') - Extending
* Use new-style index directive ('builtin') - Library
* Use new-style index directive ('builtin') - Reference
* Use new-style index directive ('builtin') - Tutorial
2023-05-06 06:54:08 +03:00
Jelle Zijlstra
ed29f524cf
Various small fixes to dis docs ( #103923 )
...
- Fix description of MAKE_CELL, which appeared to be inverted from the
actual behavior
- Fix stray ".:" (sphinx-contrib/sphinx-lint#63 )
- Fix inconsistent indentation
- Add some missing code blocks
- Slight style improvements
2023-04-29 00:02:21 -07:00
Carl Meyer
0dc8b50d33
gh-87729: add LOAD_SUPER_ATTR instruction for faster super() ( #103497 )
...
This speeds up `super()` (by around 85%, for a simple one-level
`super().meth()` microbenchmark) by avoiding allocation of a new
single-use `super()` object on each use.
2023-04-24 22:22:14 +00:00