summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-45431: Rename CFrame to _PyCFrame in the C API (GH-31584)Victor Stinner2022-02-281-3/+3
| | | | | | Rename also struct _cframe to struct _PyCFrame. Add a comment suggesting using public functions rather than using directly the private _PyCFrame structure.
* bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)Mark Shannon2022-02-281-18/+20
|
* bpo-46841: Use inline caching for `UNPACK_SEQUENCE` (GH-31591)Brandt Bucher2022-02-281-14/+15
|
* bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame (GH-31583)Victor Stinner2022-02-251-41/+41
| | | | | Rename also struct _interpreter_frame to struct _PyInterpreterFrame. Reduce risk of name conflicts if a project includes pycore_frame.h.
* bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543)Brandt Bucher2022-02-251-6/+34
|
* bpo-45107: Specialize `LOAD_METHOD` for instances with dict. (GH-31531)Mark Shannon2022-02-241-2/+34
|
* bpo-46823: Implement LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE superinstruction ↵Dennis Sweeney2022-02-241-3/+77
| | | | (GH-31484)
* bpo-44337: Shrink the LOAD_ATTR/STORE_ATTR caches (GH-31517)Brandt Bucher2022-02-231-23/+16
|
* Fix reporting of specialization stats. (GH-31503)Mark Shannon2022-02-221-0/+2
|
* Move call specializations from CALL to PRECALL. (GH-31496)Mark Shannon2022-02-221-75/+132
|
* bpo-46329: Streamline calling sequence a bit. (GH-31465)Mark Shannon2022-02-211-118/+151
| | | | | | | | | | | | | | * 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-21/+11
| | | | * Change calling sequence: Add PUSH_NULL. Merge PRECALL_FUNCTION and PRECALL_METHOD into PRECALL.
* bpo-46709: check eval breaker in specialized `CALL` opcodes (GH-31404)Nikita Sobolev2022-02-181-0/+9
|
* bpo-46702: Specialize UNPACK_SEQUENCE (GH-31240)Brandt Bucher2022-02-161-33/+66
|
* Include length in stats for UNPACK_SEQUENCE. (GH-31254)Mark Shannon2022-02-141-2/+2
|
* bpo-45923: Add `RESUME_QUICK` (GH-31244)Brandt Bucher2022-02-101-7/+9
|
* Gather stats for PRECALL_METHOD. (GH-31259)Mark Shannon2022-02-101-2/+13
|
* bpo-46532: Reduce number of memory writes to update call_shape.kwnames. ↵Mark Shannon2022-02-101-7/+15
| | | | (GH-31231)
* Fix sys.getdxp() when configured with --enable-pystats. (GH-31251)Mark Shannon2022-02-101-1/+17
|
* Add stats for PRECALL_FUNCTION. (GH-31250)Mark Shannon2022-02-101-0/+5
|
* bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized ↵Eric Snow2022-02-081-56/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | global objects. (gh-30928) We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code. It is still used in a number of non-builtin stdlib modules. The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime. A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings). https://bugs.python.org/issue46541#msg411799 explains the rationale for this change. The core of the change is in: * (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros * Include/internal/pycore_runtime_init.h - added the static initializers for the global strings * Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState * Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings. That check is added to the PR CI config. The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()). This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *. The following are not changed (yet): * stop using _Py_IDENTIFIER() in the stdlib modules * (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API * (maybe) intern the strings during runtime init https://bugs.python.org/issue46541
* bpo-46675: Allow object value arrays and split key dictionaries larger than ↵Mark Shannon2022-02-081-3/+2
| | | | 16 (GH-31191)
* bpo-46072: Merge dxpairs into py_stats. (GH-31197)Mark Shannon2022-02-071-60/+17
|
* bpo-46670: Remove unused macros in ceval.c (GH-31196)Victor Stinner2022-02-071-7/+2
| | | Remove CHECKEXC() and EXT_POP() macros.
* Add miss stats for specialized instructions. (GH-31108)Mark Shannon2022-02-041-0/+1
|
* Collect stats for UNPACK_SEQUENCE. (GH-31105)Mark Shannon2022-02-031-0/+6
|
* Pass reference to func, as well as args, when pushing frame. (GH-31100)Mark Shannon2022-02-031-5/+5
|
* Add specialization stats for FOR_ITER. (GH-31079)Mark Shannon2022-02-021-0/+5
|
* bpo-46072: Add some frame stats. (GH-31060)Mark Shannon2022-02-021-1/+4
|
* fFx refleak in isinstance error path (GH-31005)Ken Jin2022-01-291-0/+1
|
* bpo-46072: Add simple stats for Python calls. (GH-30989)Mark Shannon2022-01-281-0/+4
|
* bpo-46329: Split calls into precall and call instructions. (GH-30855)Mark Shannon2022-01-281-190/+325
| | | | | | | | | | | | | | * 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-46528: Simplify the VM's stack manipulations (GH-30902)Brandt Bucher2022-01-261-59/+9
|
* Use existing unbound_local_error label in DELETE_FAST opcode (GH-30882)Kumar Aditya2022-01-261-6/+1
|
* bpo-46420: Use NOTRACE_DISPATCH() in specialized opcodes (GH-30652)Dennis Sweeney2022-01-251-26/+43
|
* bpo-43683: Streamline YIELD_VALUE and SEND (GH-30723)Mark Shannon2022-01-241-21/+14
| | | | | | | | * Split YIELD_VALUE into ASYNC_GEN_WRAP; YIELD_VALUE for async generators. * Split SEND into SEND; YIELD_VALUE. * Document new opcodes.
* bpo-46409: Make generators in bytecode (GH-30633)Mark Shannon2022-01-201-107/+88
| | | | | | | | | | | | * Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
* bpo-45953: Statically initialize all the non-object PyInterpreterState ↵Eric Snow2022-01-141-2/+0
| | | | | fields we can. (gh-30589) https://bugs.python.org/issue45953
* bpo-45953: Statically initialize all the PyThreadState fields we can. (gh-30590)Eric Snow2022-01-141-4/+0
| | | https://bugs.python.org/issue45953
* bpo-45953: Statically allocate the main interpreter (and initial thread ↵Eric Snow2022-01-121-1/+1
| | | | | | | | | state). (gh-29883) Previously, the main interpreter was allocated on the heap during runtime initialization. Here we instead embed it into _PyRuntimeState, which means it is statically allocated as part of the _PyRuntime global. The same goes for the initial thread state (of each interpreter, including the main one). Consequently there are fewer allocations during runtime/interpreter init, fewer possible failures, and better memory locality. FYI, this also helps efforts to consolidate globals, which in turns helps work on subinterpreter isolation. https://bugs.python.org/issue45953
* bpo-46347: Yet another fix in the erorr path of PyEval_EvalCodeEx (#30554)Yury Selivanov2022-01-121-1/+0
|
* bpo-46347: Fix PyEval_EvalCodeEx to correctly cleanup in error paths (#30551)Yury Selivanov2022-01-111-13/+9
|
* bpo-46347: Fix memory leak in PyEval_EvalCodeEx. (#30546)Yury Selivanov2022-01-111-7/+0
| | | First introduced in 0332e569c12d3dc97171546c6dc10e42c27de34b
* bpo-45923: Handle call events in bytecode (GH-30364)Mark Shannon2022-01-061-44/+73
| | | | * Add a RESUME instruction to handle "call" events.
* bpo-46031: add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE (GH-30019)penguin_wwy2022-01-061-0/+24
|
* bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372)Brandt Bucher2022-01-051-8/+5
|
* bpo-46009: Remove GEN_START (GH-30367)Brandt Bucher2022-01-041-8/+0
|
* bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)Irit Katriel2022-01-041-25/+0
| | | | | | * bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE * do not assume that an exception group is truthy
* bpo-46219, 46221: simplify except* implementation following exc_info ↵Irit Katriel2022-01-021-132/+1
| | | | changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289)
* bpo-46072: Add top level stats struct (GH-30169)Mark Shannon2021-12-171-23/+8
|