bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595)

* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.

* Add reference to function to frame, borrow references to builtins and globals.

* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
This commit is contained in:
Mark Shannon 2021-11-23 09:53:24 +00:00 committed by GitHub
parent d82f2caf94
commit 135cabd328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 268 additions and 156 deletions

View file

@ -148,7 +148,7 @@ static void *opcode_targets[256] = {
&&TARGET_SET_ADD,
&&TARGET_MAP_ADD,
&&TARGET_LOAD_CLASSDEREF,
&&_unknown_opcode,
&&TARGET_COPY_FREE_VARS,
&&_unknown_opcode,
&&_unknown_opcode,
&&TARGET_MATCH_CLASS,