| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
* Don't attempt to specialize for LOAD_ATTR on instance if class has attribute
* Improvement to LOAD_ATTR and STORE_ATTR specialization stats.
|
| |
|
|
|
|
|
| |
Typo introduced in #100223.
Automerge-Triggered-By: GH:brandtbucher
|
|
|
|
|
|
| |
* Initialize `type_watchers` array to `NULL`s
* Optimize code watchers notification
* Optimize func watchers notification
|
| |
|
|
|
|
| |
unit. (GH-100223)
|
|
|
|
| |
warning) (#100215)
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
|
|
|
|
|
| |
* pystats off by default
* Add -Xpystats flag
* Always dump pystats, even if turned off
|
|
|
|
| |
(#100010)
|
|
|
| |
Closes #96715
|
|
|
|
|
| |
The build was broken by gh-100084.
https://github.com/python/cpython/issues/81057
|
|
|
|
|
|
| |
* Add version number to code object for better versioning of functions.
* Improves specialization for closures and list comprehensions.
|
|
|
| |
* Specialize FOR_ITER for tuples
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
|
| |
This makes it easier to see what changed in the generated code
when converting an instruction to super or macro.
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stack effects can now have a type, e.g. `inst(X, (left, right -- jump/uint64_t)) { ... }`.
Instructions converted to the non-legacy format:
* COMPARE_OP
* COMPARE_OP_FLOAT_JUMP
* COMPARE_OP_INT_JUMP
* COMPARE_OP_STR_JUMP
* STORE_ATTR
* DELETE_ATTR
* STORE_GLOBAL
* STORE_ATTR_INSTANCE_VALUE
* STORE_ATTR_WITH_HINT
* STORE_ATTR_SLOT, and complete the store_attr family
* Complete the store_subscr family: STORE_SUBSCR{,DICT,LIST_INT}
(STORE_SUBSCR was alread half converted,
but wasn't using cache effects yet.)
* DELETE_SUBSCR
* PRINT_EXPR
* INTERPRETER_EXIT (a bit weird, ends in return)
* RETURN_VALUE
* GET_AITER (had to restructure it some)
The original had mysterious `SET_TOP(NULL)` before `goto error`.
I assume those just account for `obj` having been decref'ed,
so I got rid of them in favor of the cleanup implied by `ERROR_IF()`.
* LIST_APPEND (a bit unhappy with it)
* SET_ADD (also a bit unhappy with it)
Various other improvements/refactorings as well.
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
| |
|
|
|
|
|
|
|
| |
(gh-99742)
_xxsubinterpreters is an internal module used for testing.
https://github.com/python/cpython/issues/99741
|
|
|
| |
builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
|
| |
|
|
|
|
|
| |
This cleanup up resolves a few subtle bugs and makes the implementation for multi-phase init much cleaner.
https://github.com/python/cpython/issues/99741
|
|
|
|
| |
(#99956)
|
|
|
|
|
| |
There were some minor issues that showed up while I was working on porting _xxsubinterpreters to multi-phase init. This fixes them.
https://github.com/python/cpython/issues/99741
|
|
|
|
|
|
| |
* Add API to allow extensions to set callback function on creation and destruction of PyCodeObject
Co-authored-by: Ye11ow-Flash <janshah@cs.stonybrook.edu>
|
| |
|
| |
|
|
|
|
| |
assembler stage (GH-99869)
|
| |
|
| |
|
|
|
|
| |
block (GH-99732)
|
|
|
| |
Replace "Py_DECREF(var); var = NULL;" with "Py_SETREF(var, NULL);".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newly supported interpreter definition syntax:
- `op(NAME, (input_stack_effects -- output_stack_effects)) { ... }`
- `macro(NAME) = OP1 + OP2;`
Also some other random improvements:
- Convert `WITH_EXCEPT_START` to use stack effects
- Fix lexer to balk at unrecognized characters, e.g. `@`
- Fix moved output names; support object pointers in cache
- Introduce `error()` method to print errors
- Introduce read_uint16(p) as equivalent to `*p`
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
|
|
|
|
|
|
| |
computed gotos aren't enabled (GH-98265)
Keep target labels when debugging, but don't warn about lack of use.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix potential race condition in code patterns:
* Replace "Py_DECREF(var); var = new;" with "Py_SETREF(var, new);"
* Replace "Py_XDECREF(var); var = new;" with "Py_XSETREF(var, new);"
* Replace "Py_CLEAR(var); var = new;" with "Py_XSETREF(var, new);"
Other changes:
* Replace "old = var; var = new; Py_DECREF(var)"
with "Py_SETREF(var, new);"
* Replace "old = var; var = new; Py_XDECREF(var)"
with "Py_XSETREF(var, new);"
* And remove the "old" variable.
|
|
|
|
| |
modified (#98175)
|
|
|
|
| |
Fix a reference bug in _imp.create_builtin() after the creation of
the first sub-interpreter for modules "builtins" and "sys".
|
|
|
|
|
|
|
|
| |
Fix a number of compile errors with GCC-12 on macOS:
1. In pylifecycle.c the compile rejects _Pragma within a declaration
2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS
3. _ctypes assumed that __builtin_available is always present on macOS
|
|
|
|
| |
Also complete cache effects for BINARY_SUBSCR family.
|
| |
|
| |
|
| |
|
|
|
|
| |
the GIL is not properly held at these times (GH-99543)
|
|
|
|
|
| |
We also move the global func version.
https://github.com/python/cpython/issues/81057
|
|
|
|
| |
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().
|
| |
|
|
|
|
|
| |
This is part of the effort to consolidate global variables, to make them easier to manage (and make it easier to later move some of them to PyInterpreterState).
https://github.com/python/cpython/issues/81057
|