diff options
author | Mark Shannon <mark@hotpy.org> | 2024-08-20 15:52:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 15:52:58 (GMT) |
commit | bb1d30336e83837d4191a016107fd501cd230328 (patch) | |
tree | be948ce7bf459bbd95195bd57262d775dc7efa76 /Python/optimizer_bytecodes.c | |
parent | bffed80230f2617de2ee02bd4bdded1024234dab (diff) | |
download | cpython-bb1d30336e83837d4191a016107fd501cd230328.zip cpython-bb1d30336e83837d4191a016107fd501cd230328.tar.gz cpython-bb1d30336e83837d4191a016107fd501cd230328.tar.bz2 |
GH-118093: Make `CALL_ALLOC_AND_ENTER_INIT` suitable for tier 2. (GH-123140)
* Convert CALL_ALLOC_AND_ENTER_INIT to micro-ops such that tier 2 supports it
* Allow inexact arguments for CALL_ALLOC_AND_ENTER_INIT.
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 97e4c64..6e46d9b 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -627,7 +627,7 @@ dummy_func(void) { ctx->done = true; } - op(_PY_FRAME_KW, (callable, self_or_null, args[oparg], kwnames -- new_frame: _Py_UOpsAbstractFrame*)) { + op(_PY_FRAME_KW, (callable, self_or_null, args[oparg], kwnames -- new_frame: _Py_UOpsAbstractFrame *)) { (void)callable; (void)self_or_null; (void)args; @@ -636,6 +636,23 @@ dummy_func(void) { ctx->done = true; } + op(_CHECK_AND_ALLOCATE_OBJECT, (type_version/2, callable, null, args[oparg] -- self, init, args[oparg])) { + (void)type_version; + (void)callable; + (void)null; + (void)args; + self = sym_new_not_null(ctx); + init = sym_new_not_null(ctx); + } + + op(_CREATE_INIT_FRAME, (self, init, args[oparg] -- init_frame: _Py_UOpsAbstractFrame *)) { + (void)self; + (void)init; + (void)args; + init_frame = NULL; + ctx->done = true; + } + op(_RETURN_VALUE, (retval -- res)) { SYNC_SP(); ctx->frame->stack_pointer = stack_pointer; |