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.
This commit is contained in:
Mark Shannon 2024-08-20 16:52:58 +01:00 committed by GitHub
parent bffed80230
commit bb1d30336e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 464 additions and 299 deletions

View file

@ -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;