mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
GH-120507: Lower the BEFORE_WITH
and BEFORE_ASYNC_WITH
instructions. (#120640)
* Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions. * Add LOAD_SPECIAL instruction * Reimplement `with` and `async with` statements using LOAD_SPECIAL
This commit is contained in:
parent
73dc1c678e
commit
9cefcc0ee7
22 changed files with 663 additions and 651 deletions
|
@ -133,6 +133,13 @@ PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
|
|||
#define FVS_MASK 0x4
|
||||
#define FVS_HAVE_SPEC 0x4
|
||||
|
||||
/* Special methods used by LOAD_SPECIAL */
|
||||
#define SPECIAL___ENTER__ 0
|
||||
#define SPECIAL___EXIT__ 1
|
||||
#define SPECIAL___AENTER__ 2
|
||||
#define SPECIAL___AEXIT__ 3
|
||||
#define SPECIAL_MAX 3
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
# define Py_CPYTHON_CEVAL_H
|
||||
# include "cpython/ceval.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue