mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)
This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
This commit is contained in:
parent
3c70d467c1
commit
8bff940ad6
16 changed files with 733 additions and 702 deletions
|
@ -175,12 +175,9 @@ dummy_func(
|
|||
}
|
||||
}
|
||||
|
||||
inst(LOAD_CLOSURE, (-- value)) {
|
||||
/* We keep LOAD_CLOSURE so that the bytecode stays more readable. */
|
||||
value = GETLOCAL(oparg);
|
||||
ERROR_IF(value == NULL, unbound_local_error);
|
||||
Py_INCREF(value);
|
||||
}
|
||||
pseudo(LOAD_CLOSURE) = {
|
||||
LOAD_FAST,
|
||||
};
|
||||
|
||||
inst(LOAD_FAST_CHECK, (-- value)) {
|
||||
value = GETLOCAL(oparg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue