| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
(GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
|
| |
|
|
|
|
| |
(GH-11175)
|
|
|
| |
Fix also return type for few other functions (clear, releasebuffer).
|
|
|
|
| |
Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from
Include/objimpl.h to Include/internal/pycore_object.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename Include/internal/ headers:
* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h
Add missing headers to Makefile.pre.in and PCbuild:
* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename Include/internal/ header files:
* pyatomic.h -> pycore_atomic.h
* ceval.h -> pycore_ceval.h
* condvar.h -> pycore_condvar.h
* context.h -> pycore_context.h
* pygetopt.h -> pycore_getopt.h
* gil.h -> pycore_gil.h
* hamt.h -> pycore_hamt.h
* hash.h -> pycore_hash.h
* mem.h -> pycore_mem.h
* pystate.h -> pycore_state.h
* warnings.h -> pycore_warnings.h
* PCbuild project, Makefile.pre.in, Modules/Setup: add the
Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
with #include "pycore_mem.h".
|
|
|
|
|
|
|
|
|
| |
(GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments. This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
|
|
|
|
| |
Cast pointer difference from ssize_t to int: a frame is very unlikely
larger than 2 GB.
|
|
|
|
| |
into/out of an except block.
|
|
|
|
|
|
|
|
| |
* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.
|
|
|
| |
(cherry picked from commit e32bbaf376a09c149fa7c7f2919d7c9ce4e2a055)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
to compiler. (GH-5006)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
| |
|
|
|
|
| |
bpo-32468: Better frame repr()
|
|
|
| |
Move exception state information from frame objects to coroutine (generator/thread) object where it belongs.
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
|
|
|
|
|
|
|
|
| |
f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events
These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.
|
|
|
|
| |
Calling function is up to 5% faster.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When Python is not compiled with PGO, the performance of Python on call_simple
and call_method microbenchmarks depend highly on the code placement. In the
worst case, the performance slowdown can be up to 70%.
The GCC __attribute__((hot)) attribute helps to keep hot code close to reduce
the risk of such major slowdown. This attribute is ignored when Python is
compiled with PGO.
The following functions are considered as hot according to statistics collected
by perf record/perf report:
* _PyEval_EvalFrameDefault()
* call_function()
* _PyFunction_FastCall()
* PyFrame_New()
* frame_dealloc()
* PyErr_Occurred()
|
| |
|
|\
| |
| |
| | |
Patch by Xavier de Gaye.
|
| |
| |
| |
| | |
Patch by Xavier de Gaye.
|
| |
| |
| |
| | |
Patch by Demur Rumed.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26107: The format of the co_lnotab attribute of code objects changes to
support negative line number delta.
Changes:
* assemble_lnotab(): if line number delta is less than -128 or greater than
127, emit multiple (offset_delta, lineno_delta) in co_lnotab
* update functions decoding co_lnotab to use signed 8-bit integers
- dis.findlinestarts()
- PyCode_Addr2Line()
- _PyCode_CheckLineNumber()
- frame_setlineno()
* update lnotab_notes.txt
* increase importlib MAGIC_NUMBER to 3361
* document the change in What's New in Python 3.6
* cleanup also PyCode_Optimize() to use better variable names
|
|/ |
|
|
|
|
| |
macro Py_SETREF.
|
| |
|
|
|
|
| |
when frame.clear() has been called.
|
|
|
|
|
|
|
| |
crash when a generator is created in a C thread that is destroyed while the
generator is still used. The issue was that a generator contains a frame, and
the frame kept a reference to the Python state of the destroyed C thread. The
crash occurs when a trace function is setup.
|
|
|
|
| |
string for "__builtins__" literal string
|
|
|
|
|
| |
exceptions when merging fast locals into f_locals of a frame.
PyEval_GetLocals() now raises an exception and return NULL on failure.
|
|
|
|
| |
expensive details (local variables) and break reference cycles.
|
|
|
|
| |
multiprocessing.h: remove unused MIN and MAX macros
|
|
|
|
| |
(Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
|
|
|
|
| |
reference cycle.
|
| |
|
|
|
|
| |
allocation issues
|
|
|
|
|
| |
PyObject_GC_Resize() with incorrect error handling. In case of errors,
the original object would be leaked. This checkin fixes those cases.
|
|
|
|
|
|
| |
It is now possible to use a custom type for the __builtins__ namespace, instead
of a dict. It can be used for sandboxing for example. Raise also a NameError
instead of ImportError if __build_class__ name if not found in __builtins__.
|
|\ |
|
| |
| |
| |
| | |
(closes #14612)
|
| |
| |
| |
| |
| |
| |
| | |
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.
Patch mostly from Mark Shannon with a few tweaks by me.
|
| | |
|
|/ |
|
| |
|