diff options
author | Donghee Na <donghee.na@python.org> | 2024-12-19 02:08:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 02:08:17 (GMT) |
commit | 48c70b8f7dfd00a018abbac50ea987f54fa4db51 (patch) | |
tree | cb845fc352998aa71d0a490c346b4c4145b1a6af /Include | |
parent | f802c8bf872ab882d3056675acc79c950fe5b93c (diff) | |
download | cpython-48c70b8f7dfd00a018abbac50ea987f54fa4db51.zip cpython-48c70b8f7dfd00a018abbac50ea987f54fa4db51.tar.gz cpython-48c70b8f7dfd00a018abbac50ea987f54fa4db51.tar.bz2 |
gh-115999: Enable BINARY_SUBSCR_GETITEM for free-threaded build (gh-127737)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_opcode_metadata.h | 4 | ||||
-rw-r--r-- | Include/internal/pycore_typeobject.h | 1 | ||||
-rw-r--r-- | Include/internal/pycore_uop_metadata.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h index 28aa112..d2ae892 100644 --- a/Include/internal/pycore_opcode_metadata.h +++ b/Include/internal/pycore_opcode_metadata.h @@ -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: { diff --git a/Include/internal/pycore_typeobject.h b/Include/internal/pycore_typeobject.h index 7b39d07..5811533 100644 --- a/Include/internal/pycore_typeobject.h +++ b/Include/internal/pycore_typeobject.h @@ -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 } diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h index dd775d3..eadfda4 100644 --- a/Include/internal/pycore_uop_metadata.h +++ b/Include/internal/pycore_uop_metadata.h @@ -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: |