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
Brandt Bucher
b4978ff872
GH-88691: Shrink the CALL caches (GH-103230)
2023-04-05 14:15:49 -07:00
Brandt Bucher
0444ae2487
GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)
2023-03-23 15:25:09 -07:00
Irit Katriel
3468c768ce
gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP ( #102870 )
2023-03-22 18:10:48 +00:00
Brandt Bucher
08b67fb34f
GH-90997: Shrink the LOAD_GLOBAL caches ( #102569 )
2023-03-10 17:01:16 -08:00
Irit Katriel
81e3aa835c
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function ( #101800 )
2023-02-14 11:54:13 +00:00
penguin_wwy
753fc8a5d6
gh-101632: Add the new RETURN_CONST opcode ( #101633 )
2023-02-07 22:32:21 +00:00
Irit Katriel
62251c3da0
gh-101454: fix documentation for END_ASYNC_FOR ( #101455 )
2023-02-01 12:49:59 +00:00
Mark Shannon
f02fa64bf2
GH-100762: Don't call `gen.throw()` in `gen.close()`, unless necessary. (GH-101013)
...
* Store exception stack depth in YIELD_VALUE's oparg and use it avoid expensive gen.throw() in gen.close() where possible.
2023-01-24 17:25:37 +00:00
Mark Shannon
7b14c2ef19
GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)
2023-01-16 12:35:21 +00:00
Matthieu Dartiailh
eecd422d1b
gh-96461: Improve docs for bytecode instructions (GH-96462)
...
* Clarify the meaning of the oparg for CACHE and COPY opcode in dis doc
* Use STACK to describe stack operation in analogy with a Python list
* Remove (delta) from BEFORE_WITH since BEFORE_WITH does not take an argument
* Fix the description of the stack impact of multiple opcodes
2023-01-12 18:23:50 +00:00
Mark Shannon
78068126a1
GH-99005: More intrinsics (GH-100774)
...
* Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
2023-01-06 14:47:57 +00:00