[issue46712] Share global string identifiers in deepfreeze

2022-03-28 Thread Kumar Aditya


Change by Kumar Aditya :


--
pull_requests: +30230
pull_request: https://github.com/python/cpython/pull/32152

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-03-23 Thread Eric Snow


Eric Snow  added the comment:


New changeset febf54bcf3fdc45ad84b4073e24bbaaee0ac8b2a by Eric Snow in branch 
'main':
bpo-46712: Do not Regen Deep-Frozen Modules before Generating Global Objects 
(gh-32061)
https://github.com/python/cpython/commit/febf54bcf3fdc45ad84b4073e24bbaaee0ac8b2a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-03-22 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +30151
pull_request: https://github.com/python/cpython/pull/32061

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-03-22 Thread Eric Snow


Eric Snow  added the comment:

> After a new `&_Py_ID(__orig_class__)` is added to 
> Objects/genericaliasobject.c, running `make regen-global-objects` starts
>
> gcc -pthread -c [snipped] -DPy_BUILD_CORE -o Objects/genericaliasobject.o 
> Objects/genericaliasobject.c
>
> which fails with a compilation error because that identifier is not yet 
> defined. Is there a good way to convince `make` to regenerate the global 
> objects without this sort of circular dependency? Am I missing a step?

I'm looking into this.  A temporary workaround is to run 
Tools/scripts/generate-global-objects.py directly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-03-20 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

In bpo-47067, there was concern about the addition of the makefile target from 
PR 31637:

regen-global-objects: regen-deepfreeze

After a new `&_Py_ID(__orig_class__)` is added to Objects/genericaliasobject.c, 
running `make regen-global-objects` starts

gcc -pthread -c [snipped] -DPy_BUILD_CORE -o Objects/genericaliasobject.o 
Objects/genericaliasobject.c

which fails with a compilation error because that identifier is not yet 
defined. Is there a good way to convince `make` to regenerate the global 
objects without this sort of circular dependency? Am I missing a step?

--
nosy: +Dennis Sweeney

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset 21099fc064c61d59c936a2f6a0db3e07cd5c8de5 by Eric Snow in branch 
'main':
bpo-46712: Let generate_global_objects.py Run on Earlier Python Versions 
(gh-31637)
https://github.com/python/cpython/commit/21099fc064c61d59c936a2f6a0db3e07cd5c8de5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-03-01 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +29759
pull_request: https://github.com/python/cpython/pull/31637

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-02-25 Thread Kumar Aditya


Change by Kumar Aditya :


--
pull_requests: +29718
pull_request: https://github.com/python/cpython/pull/31596

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-02-25 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> resource usage

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-02-25 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset eb002dbe0da9622245a355db5f0cd5aa2fc70b40 by Kumar Aditya in 
branch 'main':
bpo-46712: Share global string identifiers in deepfreeze (GH-31261)
https://github.com/python/cpython/commit/eb002dbe0da9622245a355db5f0cd5aa2fc70b40


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-02-10 Thread Kumar Aditya


Change by Kumar Aditya :


--
keywords: +patch
pull_requests: +29427
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31261

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-02-10 Thread Kumar Aditya


Kumar Aditya  added the comment:

I have refactored generate_global_objects.py, and now instead of hard-coding 
every identifier manually, it now scans *.c files extracts the identifiers used 
in it and then generate the header file. This has multiple advantages:

- No need to manually add identifiers, as soon as it is used in a c file it is 
added to the global identifiers struct.
- It simplifies the codegen a lot.
- Remove the need of special casing certain file for checking now it is just a 
set of identifiers and auto removes unused global strings.

--
nosy: +eric.snow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46712] Share global string identifiers in deepfreeze

2022-02-10 Thread Kumar Aditya


New submission from Kumar Aditya :

Since bpo-46541, the global strings are statically allocated so they can now be 
referenced by deep-frozen modules just like any other singleton. Sharing 
identifiers with deepfreeze will reduce the duplicated strings hence it would 
save space.

See https://github.com/faster-cpython/ideas/issues/218
See https://github.com/faster-cpython/ideas/issues/230

--
messages: 413003
nosy: gvanrossum, kumaraditya303
priority: normal
severity: normal
status: open
title: Share global string identifiers in deepfreeze
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com