mirror of
https://github.com/python/cpython.git
synced 2025-07-16 15:55:18 +00:00
bpo-46712: share more global strings in deepfreeze (gh-32152)
(for gh-90868)
This commit is contained in:
parent
3c43806513
commit
ab0d35d70d
6 changed files with 15 additions and 15 deletions
|
@ -782,6 +782,7 @@ compiler_set_qualname(struct compiler *c)
|
|||
}
|
||||
|
||||
if (base != NULL) {
|
||||
_Py_DECLARE_STR(dot, ".");
|
||||
name = PyUnicode_Concat(base, &_Py_STR(dot));
|
||||
Py_DECREF(base);
|
||||
if (name == NULL)
|
||||
|
@ -3945,6 +3946,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
|
|||
ADDOP_NAME(c, IMPORT_NAME, s->v.ImportFrom.module, names);
|
||||
}
|
||||
else {
|
||||
_Py_DECLARE_STR(empty, "");
|
||||
ADDOP_NAME(c, IMPORT_NAME, &_Py_STR(empty), names);
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
|
@ -4885,6 +4887,7 @@ compiler_joined_str(struct compiler *c, expr_ty e)
|
|||
|
||||
Py_ssize_t value_count = asdl_seq_LEN(e->v.JoinedStr.values);
|
||||
if (value_count > STACK_USE_GUIDELINE) {
|
||||
_Py_DECLARE_STR(empty, "");
|
||||
ADDOP_LOAD_CONST_NEW(c, &_Py_STR(empty));
|
||||
ADDOP_NAME(c, LOAD_METHOD, &_Py_ID(join), names);
|
||||
ADDOP_I(c, BUILD_LIST, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue