Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-30860: Consolidate stateful runtime globals. #3397

Merged
merged 94 commits into from
Sep 8, 2017
Merged
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
d4799a7
Add the check-c-globals script.
ericsnowcurrently May 31, 2017
9abaa7b
Clean up the check-c-globals script.
ericsnowcurrently Jun 1, 2017
aa3a7db
Update the list of "runtime" globals.
ericsnowcurrently Jun 1, 2017
c7c86c7
Handle builtin modules via a pattern check.
ericsnowcurrently Jun 1, 2017
6b991d9
Rely on a pattern check for static type-related vars.
ericsnowcurrently Jun 1, 2017
8a8763d
Handle most exceptions and warnings via pattern checks.
ericsnowcurrently Jun 1, 2017
c8b5b43
Clean up _is_type_var().
ericsnowcurrently Jun 1, 2017
72e1d9b
Add runtime vars for builtin modules.
ericsnowcurrently Jun 1, 2017
f51e788
Ignore trailing comments in globals-runtime.txt.
ericsnowcurrently Jun 1, 2017
9836224
Add runtime vars for builtin types.
ericsnowcurrently Jun 1, 2017
9dab7a7
Add runtime vars for compiler.
ericsnowcurrently Jun 1, 2017
7e1cad8
Add runtime vars for interpreter.
ericsnowcurrently Jun 1, 2017
7b8279a
Add runtime vars for import.
ericsnowcurrently Jun 1, 2017
c067341
Add runtime vars for startup.
ericsnowcurrently Jun 1, 2017
794fb24
Add other runtime vars.
ericsnowcurrently Jun 1, 2017
942dbfa
Separate the 3 runtime global "scopes".
ericsnowcurrently Jun 1, 2017
7a2c42a
Do not worry about a possible race.
ericsnowcurrently Jun 1, 2017
2e6526b
Narrow down the globals lists.
ericsnowcurrently Jun 3, 2017
39296ea
runtime -> core.
ericsnowcurrently Jun 3, 2017
103205d
Hold up more globals.
ericsnowcurrently Jun 7, 2017
ea3a2cf
Add _PyRuntimeState and _PyRuntime.
ericsnowcurrently Jun 19, 2017
a112d71
Pull pylifecycle globals into _PyRuntimeState.
ericsnowcurrently Jun 19, 2017
99a8aa6
Pull mem globals into _PyRuntimeState.
ericsnowcurrently Jun 20, 2017
4e6d1d9
Pull warnings globals into _PyRuntimeState.
ericsnowcurrently Jun 21, 2017
10f7601
Move nb_threads into PyInterpreterState.
ericsnowcurrently Jun 21, 2017
d82561c
Pull ceval globals into _PyRuntimeState.
ericsnowcurrently Jun 21, 2017
06b8fc8
Pull gil into _PyRuntimeState.
ericsnowcurrently Jun 21, 2017
960e1b0
Move check_interval, warnoptions, and xoptions into PyInterpreterState.
ericsnowcurrently Jun 21, 2017
8fb060f
Move pythread_stacksize into PyInterpreterState.
ericsnowcurrently Jun 21, 2017
fc8d4fd
Pull the rest of the GIL globals into _PyRuntime.
ericsnowcurrently Jun 28, 2017
1189e2e
Factor out _gil_globals and _gilstate_globals structs.
ericsnowcurrently Jun 28, 2017
edbaad5
Factor out globals structs.
ericsnowcurrently Jun 28, 2017
cec09bf
Factor out a _pending_calls struct.
ericsnowcurrently Jun 29, 2017
4dc9692
Update globals list.
ericsnowcurrently Jun 29, 2017
c438b8f
Ignore a few more globals.
ericsnowcurrently Jun 30, 2017
d0dd810
Only track one list of globals.
ericsnowcurrently Jul 3, 2017
d8e5c21
Mark _Py_HashSecret* as global.
ericsnowcurrently Jul 3, 2017
1e48db2
_Py_TracingPossible -> _PyRuntime.ceval.tracing_possible.
ericsnowcurrently Jul 3, 2017
6a1f65f
Re-structure globals.txt.
ericsnowcurrently Jul 3, 2017
f41754f
Ignore the symtable globals.
ericsnowcurrently Jul 3, 2017
cb29c94
_Py_CoreInitialized -> _PyRuntime.core_initialized.
ericsnowcurrently Jul 3, 2017
e1f1c4c
Pull in the list of interpreters.
ericsnowcurrently Jul 3, 2017
4befb69
Clean up globals.txt.
ericsnowcurrently Jul 3, 2017
ed94b6a
Ignore the import lock.
ericsnowcurrently Jul 3, 2017
cbccbf2
Fix func header formatting.
ericsnowcurrently Jul 4, 2017
41ce494
Move "globals" structs to the appropriate header files.
ericsnowcurrently Jul 5, 2017
6ef10c9
Factor out pymalloc.h.
ericsnowcurrently Jul 4, 2017
a8263c3
Pull usedpools into _PyRuntime.
ericsnowcurrently Jul 5, 2017
b4482c7
Drop a dead comment.
ericsnowcurrently Jul 5, 2017
ed25669
Pull in gcmodule.c.
ericsnowcurrently Jul 5, 2017
f6e4b9c
Clean up globals.txt.
ericsnowcurrently Jul 5, 2017
0817b0e
Pass pointers to the *_Initialize() funcs.
ericsnowcurrently Jul 5, 2017
4eea51e
Clean up line length.
ericsnowcurrently Jul 6, 2017
40292bd
Add a filename CLI arg.
ericsnowcurrently Jul 6, 2017
16b0b73
Move check-c-globals into Tools/c-globals.
ericsnowcurrently Jul 6, 2017
1b137d1
Add a README.
ericsnowcurrently Jul 6, 2017
5cbb8ed
Fix typo in header guard.
ericsnowcurrently Jul 6, 2017
46e4063
Ignore _TARGET_LOCALES.
ericsnowcurrently Jul 6, 2017
1074895
Factor out _PyRuntimeState_Initialize().
ericsnowcurrently Jul 7, 2017
9dbb1d1
Only initialize _PyRuntime once.
ericsnowcurrently Jul 7, 2017
c1d73b4
Do not assume that there is an active threadstate.
ericsnowcurrently Jul 8, 2017
18b5b18
Always use the global allocators.
ericsnowcurrently Jul 8, 2017
29d21bd
Factor out _allocators_globals.
ericsnowcurrently Jul 8, 2017
3eb1fa9
Touch up the c-globals README.
ericsnowcurrently Jul 9, 2017
3063db1
globals.txt -> ignored-globals.txt.
ericsnowcurrently Jul 9, 2017
bc3b84b
Move runtime state into "internal" header files.
ericsnowcurrently Jul 10, 2017
e411f86
globals -> state
ericsnowcurrently Jul 11, 2017
330552f
Define _PyRuntime for pgen.
ericsnowcurrently Jul 11, 2017
a18d6f5
Drop a superfluous include.
ericsnowcurrently Jul 11, 2017
2434213
Add the new header files to the Windows config.
ericsnowcurrently Jul 11, 2017
8e9deb7
Move _PyInterpreterState_Init() to the internal header file.
ericsnowcurrently Jul 12, 2017
671eeef
Add _PyRuntimeState_Fini().
ericsnowcurrently Jul 12, 2017
aed8c9a
Manage the interpreters mutex globally.
ericsnowcurrently Jul 12, 2017
bdb5ced
Fix Windows build.
ericsnowcurrently Jul 14, 2017
aaab3a9
"uint" -> unsigned int.
ericsnowcurrently Jul 17, 2017
1903528
Set up allocators in _Py_InitializeCore().
ericsnowcurrently Jul 17, 2017
be04984
Add a NEWS entry.
ericsnowcurrently Sep 5, 2017
5d3b366
Fix the news entry.
ericsnowcurrently Sep 5, 2017
8e6fcc0
Drop the underscore prefix from include file names.
ericsnowcurrently Sep 6, 2017
91d239c
Move _PyRuntime into its own header file.
ericsnowcurrently Sep 6, 2017
b223e85
Move _PyRuntime back to internal/pystate.h.
ericsnowcurrently Sep 6, 2017
3d0b18b
Include internal/pystate.h directly in source files.
ericsnowcurrently Sep 6, 2017
66c0114
Fix pgen.
ericsnowcurrently Sep 6, 2017
bb27081
Fix empty initializer lists.
ericsnowcurrently Sep 6, 2017
4797ce5
Fix includes.
ericsnowcurrently Sep 6, 2017
6592065
Drop an insignificant comment.
ericsnowcurrently Sep 7, 2017
69fe645
Restore _Py_CheckRecursionLimit under the stable ABI.
ericsnowcurrently Sep 7, 2017
6628e85
_Py_IS_FINALIZING() -> _Py_IsFinalizing().
ericsnowcurrently Sep 7, 2017
0f97249
Fix modules on Windows.
ericsnowcurrently Sep 7, 2017
1c85e28
Drop WITH_THREAD.
ericsnowcurrently Sep 7, 2017
2b28324
Undef Py_BUILD_CORE in core extension modules.
ericsnowcurrently Sep 7, 2017
b1ca420
Fix a syntax error in a Windows-only file.
ericsnowcurrently Sep 7, 2017
72d7251
Be careful about Yield on Windows.
ericsnowcurrently Sep 7, 2017
f1f10ff
Fix includes in builtin extensions on Windows.
ericsnowcurrently Sep 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pgen.
  • Loading branch information
ericsnowcurrently committed Sep 7, 2017
commit 66c0114fc576066999e8ccc635b2b3acdb275844
5 changes: 3 additions & 2 deletions Parser/pgenmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
#define PGEN

#include "Python.h"
#include "internal/mem.h"
#include "internal/pystate.h"
#include "pgenheaders.h"
#include "grammar.h"
#include "node.h"
#include "parsetok.h"
#include "pgen.h"
#include "internal/mem.h"

int Py_DebugFlag;
int Py_VerboseFlag;
int Py_IgnoreEnvironmentFlag;
struct pyruntimestate _PyRuntime = {};
_PyRuntimeState _PyRuntime = {};

/* Forward */
grammar *getgrammar(const char *filename);
Expand Down