From 47f7f2f22d067813b1406f7aa9328b53f264aa6a Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 2 Aug 2016 22:51:21 +0300 Subject: Issue #22557: Now importing already imported modules is up to 2.5 times faster. --- Python/pystate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index ba4dd4c2b5..b1aececd6f 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -90,6 +90,7 @@ PyInterpreterState_New(void) interp->codecs_initialized = 0; interp->fscodec_initialized = 0; interp->importlib = NULL; + interp->import_func = NULL; #ifdef HAVE_DLOPEN #if HAVE_DECL_RTLD_NOW interp->dlopenflags = RTLD_NOW; @@ -128,6 +129,7 @@ PyInterpreterState_Clear(PyInterpreterState *interp) Py_CLEAR(interp->builtins); Py_CLEAR(interp->builtins_copy); Py_CLEAR(interp->importlib); + Py_CLEAR(interp->import_func); } -- cgit v1.2.1 From 0b77d53b22873d0be290d30321a03f4769489ddc Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 5 Sep 2016 15:33:46 -0700 Subject: Implement the frame evaluation API aspect of PEP 523. --- Python/pystate.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 25110b287f..61bda2a9fb 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -91,6 +91,7 @@ PyInterpreterState_New(void) interp->fscodec_initialized = 0; interp->importlib = NULL; interp->import_func = NULL; + interp->eval_frame = _PyEval_EvalFrameDefault; #ifdef HAVE_DLOPEN #if HAVE_DECL_RTLD_NOW interp->dlopenflags = RTLD_NOW; -- cgit v1.2.1 From 82b75eb31160ec9c025e450ac9fa3300d560a245 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 6 Sep 2016 13:47:26 -0700 Subject: replace Py_(u)intptr_t with the c99 standard types --- Python/pystate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 61bda2a9fb..2ab5d5d611 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -6,7 +6,7 @@ #define GET_TSTATE() \ ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) #define SET_TSTATE(value) \ - _Py_atomic_store_relaxed(&_PyThreadState_Current, (Py_uintptr_t)(value)) + _Py_atomic_store_relaxed(&_PyThreadState_Current, (uintptr_t)(value)) #define GET_INTERP_STATE() \ (GET_TSTATE()->interp) -- cgit v1.2.1 From 7cbba2deb3fc49bd66e11b34f8e210371bac5913 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 7 Sep 2016 11:16:41 -0700 Subject: Add the co_extra field and accompanying APIs to code objects. This completes PEP 523. --- Python/pystate.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 2ab5d5d611..959354d119 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -227,6 +227,7 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->coroutine_wrapper = NULL; tstate->in_coroutine_wrapper = 0; + tstate->co_extra_user_count = 0; if (init) _PyThreadState_Init(tstate); -- cgit v1.2.1 From 17668cfa5e0e6f50376cc233d9b063b908a19845 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 8 Sep 2016 22:01:51 -0700 Subject: Issue #28003: Implement PEP 525 -- Asynchronous Generators. --- Python/pystate.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 959354d119..a0a8c97008 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -229,6 +229,9 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->in_coroutine_wrapper = 0; tstate->co_extra_user_count = 0; + tstate->async_gen_firstiter = NULL; + tstate->async_gen_finalizer = NULL; + if (init) _PyThreadState_Init(tstate); @@ -408,6 +411,8 @@ PyThreadState_Clear(PyThreadState *tstate) Py_CLEAR(tstate->c_traceobj); Py_CLEAR(tstate->coroutine_wrapper); + Py_CLEAR(tstate->async_gen_firstiter); + Py_CLEAR(tstate->async_gen_finalizer); } -- cgit v1.2.1 From 831deb2ea3f31f273438acc797ae12d183a21422 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Sep 2016 14:57:58 -0700 Subject: remove ceval timestamp support --- Python/pystate.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index a0a8c97008..65c244e6f7 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -98,9 +98,6 @@ PyInterpreterState_New(void) #else interp->dlopenflags = RTLD_LAZY; #endif -#endif -#ifdef WITH_TSC - interp->tscdump = 0; #endif HEAD_LOCK(); -- cgit v1.2.1