GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — bpo-36710: Add 'ceval' local variable to ceval.c by vstinner · Pull Request #12934 · python/cpython Conversation
|
|
This change adds a "tstate" parameter to call_function(), do_call_core() and do_raise(): @jdemeyer proposed a similar change in PR #12839. Here my intent is not optimization, but more correctness: ensure that runtime, interp and tstate are consistent in ceval.c. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jdemeyer: Would you mind to review my change? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
As discussed on bpo-36710 (let's keep that discussion there), I'm missing the why: which problem does this PR solve? Some of these changes do make sense independently to clean things up (for example, reducing the number of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc @ericsnowcurrently: I was talking about this change with you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I rebased my PR on top of the master branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add "struct _ceval_runtime_state *ceval = &_PyRuntime.ceval;" local variables to function to better highlight the dependency on the global variable _PyRuntime and to point directly to _PyRuntime.ceval field rather than on the larger _PyRuntime. Changes: * Add _PyRuntimeState_GetThreadState(runtime) macro. * Add _PyEval_AddPendingCall(ceval, ...) and _PyThreadState_Swap(gilstate, ...) functions. * _PyThreadState_GET() macro now calls _PyRuntimeState_GetThreadState() using &_PyRuntime. * Add 'ceval' parameter to COMPUTE_EVAL_BREAKER(), SIGNAL_PENDING_SIGNALS(), _PyEval_SignalAsyncExc(), _PyEval_SignalReceived() and _PyEval_FiniThreads() macros and functions. * Add 'tstate' parameter to call_function(), do_call_core() and do_raise(). * Add 'runtime' parameter to _Py_CURRENTLY_FINALIZING(), _Py_FinishPendingCalls() and _PyThreadState_DeleteExcept() macros and functions. * Declare 'runtime', 'tstate', 'ceval' and 'eval_breaker' variables as constant.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.