FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initializer by ericsnowcurrently · Pull Request #99389 · python/cpython · GitHub

/ cpython Public

gh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initializer - #99389

Merged
ericsnowcurrently merged 1 commit into
python:mainfrom
ericsnowcurrently:separate-global-objects-initializers
Nov 11, 2022
Merged

gh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initializer#99389
ericsnowcurrently merged 1 commit into
python:mainfrom
ericsnowcurrently:separate-global-objects-initializers

Conversation

ericsnowcurrently commented Nov 11, 2022
edited
Loading

Copy link
Copy Markdown
Member

Currently we ge have a single generated initializer macro for all the statically declared global objects in _PyRuntimState, including several one-offs (e.g. the empty tuple). The one-offs don't need to be generated, but are because we have one big initializer. Having separate initializers for the different bottom-level groups of global objects allows us to generate only the ones we need to.

This allows us to add initializers for one-off global objects without having to generate them.

ericsnowcurrently merged commit fe55ff3 into python:main Nov 11, 2022
ericsnowcurrently deleted the separate-global-objects-initializers branch November 11, 2022 20:23
ethanfurman pushed a commit to ethanfurman/cpython that referenced this pull request Nov 12, 2022
…Global Objects Initializer (pythongh-99389)

Up until now we had a single generated initializer macro for all the statically declared global objects in _PyRuntimeState, including several one-offs (e.g. the empty tuple). The one-offs don't need to be generated, but were because we had one big initializer. Having separate initializers for set of generated global objects allows us to generate only the ones we need to.  This allows us to add initializers for one-off global objects without having to generate them.

python#81057
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL