Skip to content

Commit 1795d6c

Browse files
authored
GH-122869: Add missing tier two optimizer cases (GH-122936)
1 parent 53ebb62 commit 1795d6c

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

Python/optimizer_bytecodes.c

+14
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,13 @@ dummy_func(void) {
329329
}
330330
}
331331

332+
op(_BINARY_SUBSCR_INIT_CALL, (container, sub -- new_frame: _Py_UOpsAbstractFrame *)) {
333+
(void)container;
334+
(void)sub;
335+
new_frame = NULL;
336+
ctx->done = true;
337+
}
338+
332339
op(_TO_BOOL, (value -- res)) {
333340
if (!optimize_to_bool(this_instr, ctx, value, &res)) {
334341
res = sym_new_type(ctx, &PyBool_Type);
@@ -538,6 +545,13 @@ dummy_func(void) {
538545
self = owner;
539546
}
540547

548+
op(_LOAD_ATTR_PROPERTY_FRAME, (fget/4, owner -- new_frame: _Py_UOpsAbstractFrame *)) {
549+
(void)fget;
550+
(void)owner;
551+
new_frame = NULL;
552+
ctx->done = true;
553+
}
554+
541555
op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable, unused, unused[oparg] -- func, self, unused[oparg])) {
542556
(void)callable;
543557
func = sym_new_not_null(ctx);

Python/optimizer_cases.c.h

+17-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)