mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-44945: Specialize BINARY_ADD (GH-27967)
This commit is contained in:
parent
245f1f2605
commit
d3eaf0cc5b
9 changed files with 253 additions and 78 deletions
|
@ -307,6 +307,7 @@ int _Py_Specialize_StoreAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *nam
|
|||
int _Py_Specialize_LoadGlobal(PyObject *globals, PyObject *builtins, _Py_CODEUNIT *instr, PyObject *name, SpecializedCacheEntry *cache);
|
||||
int _Py_Specialize_LoadMethod(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name, SpecializedCacheEntry *cache);
|
||||
int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_CODEUNIT *instr);
|
||||
int _Py_Specialize_BinaryAdd(PyObject *sub, PyObject *container, _Py_CODEUNIT *instr);
|
||||
|
||||
#define PRINT_SPECIALIZATION_STATS 0
|
||||
#define PRINT_SPECIALIZATION_STATS_DETAILED 0
|
||||
|
|
|
@ -34,6 +34,8 @@ static inline PyObject* _PyLong_GetZero(void)
|
|||
static inline PyObject* _PyLong_GetOne(void)
|
||||
{ return __PyLong_GetSmallInt_internal(1); }
|
||||
|
||||
PyObject *_PyLong_Add(PyLongObject *left, PyLongObject *right);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue