| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it.
* Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector.
* Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation.
* Move ownership of InterpreterFrame in generator from frame object to generator object.
* Do not create frame objects for Python calls.
* Do not create frame objects for generators.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is basically something that I noticed up while fixing test runs for another issue. It is really common to have multiline calls, and when they fail the display is kind of weird since we omit the annotations. E.g;
```
$ ./python t.py
Traceback (most recent call last):
File "/home/isidentical/cpython/cpython/t.py", line 11, in <module>
frame_1()
^^^^^^^^^
File "/home/isidentical/cpython/cpython/t.py", line 5, in frame_1
frame_2(
File "/home/isidentical/cpython/cpython/t.py", line 2, in frame_2
return a / 0 / b / c
~~^~~
ZeroDivisionError: division by zero
```
This patch basically adds support for annotating the rest of the line, if the instruction covers multiple lines (start_line != end_line).
Automerge-Triggered-By: GH:isidentical
|
| |
|
| |
|
|
|
|
|
| |
(GH-27299)" (GH-27331)
This reverts commit 8072a1181dd64135f700b44372fbf7bf91e68072.
|
|
|
|
| |
(GH-27313)
|
|
|
|
|
| |
Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
| |
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Denis Laxalde <denis@laxalde.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix MSVC warnings in getargs.c
* apply suggestions
Co-Authored-By: Batuhan Taskaya <batuhan@python.org>
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
|
|
|
|
| |
(GH-27199)
|
|
|
|
| |
missing one (GH-27197)
|
|
|
|
|
| |
(GH-27167)" (#27194)
This reverts commit 000e70ad5246732fcbd27cf59268185cbd5ad734.
|
|
|
| |
Implement support for `*args` in AC, and port `print()` to use it.
|
| |
|
| |
|
|
|
|
| |
blocks without line numbers (GH-27138)
|
| |
|
|
|
|
| |
(GH-27160)
|
| |
|
|
|
|
| |
keys (GH-27131)
|
|
|
|
| |
artificial (GH-27109)
|
|
|
|
|
| |
(GH-6766)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
| |
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
| |
|
| |
|
|
|
| |
* Remove an unnecessary cache of shared object handles.
|
|
|
|
|
| |
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
| |
|
|
|
|
|
|
|
|
| |
The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location
to print carets on the specific expressions involved in a traceback.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new resizing system works like this;
```
$ cat t.py
a + a + a + b + c + a + a + a + b + c + a + a + a + b + c + a + a + a + b + c
[repeated 99 more times]
$ ./python t.py
RESIZE: prev len = 32, new len = 66
FINAL SIZE: 56
-----------------------------------------------------
RESIZE: prev len = 32, new len = 66
RESIZE: prev len = 66, new len = 134
RESIZE: prev len = 134, new len = 270
RESIZE: prev len = 270, new len = 542
RESIZE: prev len = 542, new len = 1086
RESIZE: prev len = 1086, new len = 2174
RESIZE: prev len = 2174, new len = 4350
RESIZE: prev len = 4350, new len = 8702
FINAL SIZE: 8004
```
So now we do considerably lower number of `_PyBytes_Resize` calls.
Automerge-Triggered-By: GH:isidentical
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR is part of PEP 657 and augments the compiler to emit ending
line numbers as well as starting and ending columns from the AST
into compiled code objects. This allows bytecodes to be correlated
to the exact source code ranges that generated them.
This information is made available through the following public APIs:
* The `co_positions` method on code objects.
* The C API function `PyCode_Addr2Location`.
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
| |
|
|
|
|
| |
instructions. (GH-26954)
|
|
|
|
| |
(GH-26677)
|
| |
|
|
|
|
| |
marshal.dumps (GH-26961)
|
|
|
|
|
|
|
|
|
| |
(GH-26809)
A TypeError is now raised instead of an AttributeError in
"with" and "async with" statements for objects which do not
support the context manager or asynchronous context manager
protocols correspondingly.
|
|
|
|
| |
handling exception in body of a with statement. (GH-26890)
|
|
|
|
|
|
| |
All uses of this flag are either setting it
or in doc or tests for it. So we should be
able to get rid of it completely.
|
|
|
|
|
| |
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.
|
|
|
| |
* Make sure that modules always have a dictionary.
|
|
|
| |
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
| |
Managing it as a bare pointer to malloc'ed bytes is just too awkward in a few places.
|
| |
|
|
|
|
| |
The faulthandler module now detects if a fatal error occurs during a
garbage collector collection (only if all_threads is true).
|