mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +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
|
@ -774,6 +774,12 @@ dummy_func(void) {
|
|||
}
|
||||
}
|
||||
|
||||
op(_LOAD_SPECIAL, (owner -- attr, self_or_null)) {
|
||||
(void)owner;
|
||||
attr = sym_new_not_null(ctx);
|
||||
self_or_null = sym_new_unknown(ctx);
|
||||
}
|
||||
|
||||
op(_JUMP_TO_TOP, (--)) {
|
||||
ctx->done = true;
|
||||
}
|
||||
|
@ -782,7 +788,6 @@ dummy_func(void) {
|
|||
ctx->done = true;
|
||||
}
|
||||
|
||||
|
||||
// END BYTECODES //
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue