summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-02-23 00:23:51 (GMT)
committerGitHub <noreply@github.com>2022-02-23 00:23:51 (GMT)
commit1f455361ecfb1892e375bdbee813cdf095b6cfb8 (patch)
treed7def4d5d167965a45c4b0e30bb5a1a0bb5c3b4a /Tools
parentcff4d5c5d29528299ec1ac5b3b3a6f7735577c01 (diff)
downloadcpython-1f455361ecfb1892e375bdbee813cdf095b6cfb8.zip
cpython-1f455361ecfb1892e375bdbee813cdf095b6cfb8.tar.gz
cpython-1f455361ecfb1892e375bdbee813cdf095b6cfb8.tar.bz2
bpo-46765: Replace Locally Cached Strings with Statically Initialized Objects (gh-31366)
https://bugs.python.org/issue46765
Diffstat (limited to 'Tools')
-rw-r--r--Tools/c-analyzer/cpython/globals-to-fix.tsv90
-rw-r--r--Tools/c-analyzer/cpython/ignored.tsv1
2 files changed, 2 insertions, 89 deletions
diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv
index 4ef0a6c..7e93927 100644
--- a/Tools/c-analyzer/cpython/globals-to-fix.tsv
+++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv
@@ -280,66 +280,8 @@ Objects/sliceobject.c - _Py_EllipsisObject -
# cached - initialized once
# manually cached PyUnicodeObject
-Objects/boolobject.c - false_str -
-Objects/boolobject.c - true_str -
-Objects/classobject.c method_get_doc docstr -
-Objects/classobject.c instancemethod_get_doc docstr -
-Objects/codeobject.c PyCode_NewEmpty emptystring -
-Objects/exceptions.c _check_for_legacy_statements print_prefix -
-Objects/exceptions.c _check_for_legacy_statements exec_prefix -
-Objects/funcobject.c PyFunction_NewWithQualName __name__ -
-Objects/listobject.c - indexerr -
-Objects/typeobject.c object___reduce_ex___impl objreduce -
-# XXX This should have been found by the analyzer but wasn't:
-Python/_warnings.c is_internal_frame bootstrap_string -
-# XXX This should have been found by the analyzer but wasn't:
-Python/_warnings.c is_internal_frame importlib_string -
-# XXX This should have been found by the analyzer but wasn't:
-Python/ast_unparse.c - _str_close_br -
-# XXX This should have been found by the analyzer but wasn't:
-Python/ast_unparse.c - _str_dbl_close_br -
-# XXX This should have been found by the analyzer but wasn't:
-Python/ast_unparse.c - _str_dbl_open_br -
-# XXX This should have been found by the analyzer but wasn't:
-Python/ast_unparse.c - _str_inf -
-# XXX This should have been found by the analyzer but wasn't:
-Python/ast_unparse.c - _str_open_br -
# XXX This should have been found by the analyzer but wasn't:
Python/ast_unparse.c - _str_replace_inf -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c - __annotations__ -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c - __doc__ -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_dictcomp name -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_from_import empty_string -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_genexp name -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_lambda name -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_listcomp name -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_setcomp name -
-# XXX This should have been found by the analyzer but wasn't:
-Python/compile.c compiler_visit_annotations return_str -
-# XXX This should have been found by the analyzer but wasn't:
-Python/import.c PyImport_Import builtins_str -
-# XXX This should have been found by the analyzer but wasn't:
-Python/import.c PyImport_Import import_str -
-Python/symtable.c - __class__ -
-Python/symtable.c - _annotation -
-Python/symtable.c - dictcomp -
-Python/symtable.c - genexpr -
-Python/symtable.c - lambda -
-Python/symtable.c - listcomp -
-Python/symtable.c - setcomp -
-Python/symtable.c - top -
-# XXX This should have been found by the analyzer but wasn't:
-Python/sysmodule.c - whatstrings -
-# XXX This should have been found by the analyzer but wasn't:
-Python/sysmodule.c sys_displayhook newline -
# _PyArg_Parser (holds tuple of strings)
Objects/clinic/bytearrayobject.c.h bytearray___init__ _parser -
@@ -402,6 +344,7 @@ Objects/typeobject.c - slotdefs -
# other
Objects/typeobject.c - method_cache -
+Objects/typeobject.c object___reduce_ex___impl objreduce -
Objects/unicodeobject.c - _string_module -
Objects/unicodeobject.c - interned -
Objects/unicodeobject.c - static_strings -
@@ -666,37 +609,6 @@ Modules/signalmodule.c - ItimerError -
#-----------------------
# cached - initialized once
-# manually cached PyUnicodeOjbect
-Modules/_io/_iomodule.c - _PyIO_str_close -
-Modules/_io/_iomodule.c - _PyIO_str_closed -
-Modules/_io/_iomodule.c - _PyIO_str_decode -
-Modules/_io/_iomodule.c - _PyIO_str_encode -
-Modules/_io/_iomodule.c - _PyIO_str_fileno -
-Modules/_io/_iomodule.c - _PyIO_str_flush -
-Modules/_io/_iomodule.c - _PyIO_str_getstate -
-Modules/_io/_iomodule.c - _PyIO_str_isatty -
-Modules/_io/_iomodule.c - _PyIO_str_locale -
-Modules/_io/_iomodule.c - _PyIO_str_newlines -
-Modules/_io/_iomodule.c - _PyIO_str_nl -
-Modules/_io/_iomodule.c - _PyIO_str_peek -
-Modules/_io/_iomodule.c - _PyIO_str_read -
-Modules/_io/_iomodule.c - _PyIO_str_read1 -
-Modules/_io/_iomodule.c - _PyIO_str_readable -
-Modules/_io/_iomodule.c - _PyIO_str_readall -
-Modules/_io/_iomodule.c - _PyIO_str_readinto -
-Modules/_io/_iomodule.c - _PyIO_str_readline -
-Modules/_io/_iomodule.c - _PyIO_str_reset -
-Modules/_io/_iomodule.c - _PyIO_str_seek -
-Modules/_io/_iomodule.c - _PyIO_str_seekable -
-Modules/_io/_iomodule.c - _PyIO_str_setstate -
-Modules/_io/_iomodule.c - _PyIO_str_tell -
-Modules/_io/_iomodule.c - _PyIO_str_truncate -
-Modules/_io/_iomodule.c - _PyIO_str_writable -
-Modules/_io/_iomodule.c - _PyIO_str_write -
-Modules/_io/_iomodule.c - _PyIO_empty_str -
-Modules/_threadmodule.c - str_dict -
-Modules/_tracemalloc.c - unknown_filename -
-
# _PyArg_Parser
Modules/clinic/_codecsmodule.c.h _codecs_decode _parser -
Modules/clinic/_codecsmodule.c.h _codecs_encode _parser -
diff --git a/Tools/c-analyzer/cpython/ignored.tsv b/Tools/c-analyzer/cpython/ignored.tsv
index c945542..63d0695 100644
--- a/Tools/c-analyzer/cpython/ignored.tsv
+++ b/Tools/c-analyzer/cpython/ignored.tsv
@@ -1517,3 +1517,4 @@ Python/pylifecycle.c - _TARGET_LOCALES -
Python/specialize.c - adaptive_opcodes -
Python/specialize.c - cache_requirements -
Python/specialize.c - compare_masks -
+Python/sysmodule.c - whatstrings -