Skip to content

Commit 88d3fa3

Browse files
committed
Update for _CALL_BUILTIN_O
1 parent a66fc14 commit 88d3fa3

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,7 @@ def testfunc(n):
22112211
uops = get_opnames(ex)
22122212
self.assertIn("_CALL_BUILTIN_O", uops)
22132213
self.assertIn("_POP_TOP", uops)
2214+
self.assertIn("_POP_TOP_NOP", uops)
22142215

22152216
def test_call_method_descriptor_o(self):
22162217
def testfunc(n):

Python/optimizer_bytecodes.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,12 @@ dummy_func(void) {
10641064
none = sym_new_const(ctx, Py_None);
10651065
}
10661066

1067+
op(_CALL_BUILTIN_O, (callable, self_or_null, args[oparg] -- res, a, c)) {
1068+
res = sym_new_not_null(ctx);
1069+
a = args[0];
1070+
c = callable;
1071+
}
1072+
10671073
op(_GUARD_IS_FALSE_POP, (flag -- )) {
10681074
if (sym_is_const(ctx, flag)) {
10691075
PyObject *value = sym_get_const(ctx, flag);

Python/optimizer_cases.c.h

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)