mirror of
https://github.com/python/cpython.git
synced 2026-04-04 19:13:16 +00:00
gh-115999: Enable BINARY_SUBSCR_GETITEM for free-threaded build (gh-127737)
This commit is contained in:
parent
f802c8bf87
commit
48c70b8f7d
12 changed files with 118 additions and 62 deletions
4
Include/internal/pycore_opcode_metadata.h
generated
4
Include/internal/pycore_opcode_metadata.h
generated
|
|
@ -994,7 +994,7 @@ int _PyOpcode_max_stack_effect(int opcode, int oparg, int *effect) {
|
|||
return 0;
|
||||
}
|
||||
case BINARY_SUBSCR: {
|
||||
*effect = 0;
|
||||
*effect = 1;
|
||||
return 0;
|
||||
}
|
||||
case BINARY_SUBSCR_DICT: {
|
||||
|
|
@ -1002,7 +1002,7 @@ int _PyOpcode_max_stack_effect(int opcode, int oparg, int *effect) {
|
|||
return 0;
|
||||
}
|
||||
case BINARY_SUBSCR_GETITEM: {
|
||||
*effect = 0;
|
||||
*effect = 1;
|
||||
return 0;
|
||||
}
|
||||
case BINARY_SUBSCR_LIST_INT: {
|
||||
|
|
|
|||
|
|
@ -278,6 +278,7 @@ typedef int (*_py_validate_type)(PyTypeObject *);
|
|||
// and if the validation is passed, it will set the ``tp_version`` as valid
|
||||
// tp_version_tag from the ``ty``.
|
||||
extern int _PyType_Validate(PyTypeObject *ty, _py_validate_type validate, unsigned int *tp_version);
|
||||
extern int _PyType_CacheGetItemForSpecialization(PyHeapTypeObject *ht, PyObject *descriptor, uint32_t tp_version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
2
Include/internal/pycore_uop_metadata.h
generated
2
Include/internal/pycore_uop_metadata.h
generated
|
|
@ -722,7 +722,7 @@ int _PyUop_num_popped(int opcode, int oparg)
|
|||
case _BINARY_SUBSCR_CHECK_FUNC:
|
||||
return 0;
|
||||
case _BINARY_SUBSCR_INIT_CALL:
|
||||
return 2;
|
||||
return 3;
|
||||
case _LIST_APPEND:
|
||||
return 1;
|
||||
case _SET_ADD:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue