Skip to content

Commit 01a8e2a

Browse files
Remove test
1 parent f69228a commit 01a8e2a

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,23 +1697,6 @@ def testfunc(n):
16971697
self.assertNotIn("_TO_BOOL_NONE", uops)
16981698
self.assertNotIn("_POP_TOP_LOAD_CONST_INLINE_BORROW", uops)
16991699

1700-
def test_get_len_pop_top_load_const_inline_borrow(self):
1701-
def testfunc(n):
1702-
x = 0
1703-
for _ in range(n):
1704-
a = "foo"
1705-
result = len(a)
1706-
if result:
1707-
x += 1
1708-
return x
1709-
1710-
res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
1711-
self.assertEqual(res, TIER2_THRESHOLD)
1712-
self.assertIsNotNone(ex)
1713-
uops = get_opnames(ex)
1714-
self.assertNotIn("_GET_LEN", uops)
1715-
self.assertNotIn("_POP_TOP_LOAD_CONST_INLINE_BORROW", uops)
1716-
17171700
def test_compare_op_pop_two_load_const_inline_borrow(self):
17181701
def testfunc(n):
17191702
x = 0

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ dummy_func(void) {
10281028
}
10291029

10301030
op(_REPLACE_WITH_TRUE, (value -- res)) {
1031-
REPLACE_OP(this_instr, _POP_TOP_LOAD_CONST_INLINE_BORROW, 0, (uintptr_t)Py_True);
1031+
REPLACE_OPCODE_IF_EVALUATES_PURE(value);
10321032
res = sym_new_const(ctx, Py_True);
10331033
}
10341034

Python/optimizer_cases.c.h

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)