Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-139109: Replace_CHECK_STACK_SPACE with_CHECK_STACK_SPACE_OPERAND in JIT optiimizer#144394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1022,7 +1022,6 @@ def return_hello(): | ||
| # Constant narrowing allows constant folding for second comparison | ||
| self.assertLessEqual(count_ops(ex, "_COMPARE_OP_STR"), 1) | ||
| def test_combine_stack_space_checks_sequential(self): | ||
| def dummy12(x): | ||
| return x - 1 | ||
| @@ -1046,12 +1045,14 @@ def testfunc(n): | ||
| self.assertEqual(uop_names.count("_PUSH_FRAME"), 2) | ||
| self.assertEqual(uop_names.count("_RETURN_VALUE"), 2) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE"), 0) | ||
| # Each call gets its own _CHECK_STACK_SPACE_OPERAND | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE_OPERAND"), 2) | ||
| # Each _CHECK_STACK_SPACE_OPERAND has the framesize of its function | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy12.__code__)), uops_and_operands) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy13.__code__)), uops_and_operands) | ||
| def test_combine_stack_space_checks_nested(self): | ||
| def dummy12(x): | ||
| return x + 3 | ||
| @@ -1074,15 +1075,12 @@ def testfunc(n): | ||
| self.assertEqual(uop_names.count("_PUSH_FRAME"), 2) | ||
| self.assertEqual(uop_names.count("_RETURN_VALUE"), 2) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE"), 0) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE_OPERAND"), 2) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy15.__code__)), uops_and_operands) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy12.__code__)), uops_and_operands) | ||
| def test_combine_stack_space_checks_several_calls(self): | ||
| def dummy12(x): | ||
| return x + 3 | ||
| @@ -1110,15 +1108,14 @@ def testfunc(n): | ||
| self.assertEqual(uop_names.count("_PUSH_FRAME"), 4) | ||
| self.assertEqual(uop_names.count("_RETURN_VALUE"), 4) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE"), 0) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE_OPERAND"),4) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy12.__code__)), uops_and_operands) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy13.__code__)), uops_and_operands) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy18.__code__)), uops_and_operands) | ||
| def test_combine_stack_space_checks_several_calls_different_order(self): | ||
| # same as `several_calls` but with top-level calls reversed | ||
| def dummy12(x): | ||
| @@ -1147,15 +1144,15 @@ def testfunc(n): | ||
| self.assertEqual(uop_names.count("_PUSH_FRAME"), 4) | ||
| self.assertEqual(uop_names.count("_RETURN_VALUE"), 4) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE"), 0) | ||
| self.assertEqual(uop_names.count("_CHECK_STACK_SPACE_OPERAND"),4) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy12.__code__)), uops_and_operands) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy13.__code__)), uops_and_operands) | ||
| self.assertIn(("_CHECK_STACK_SPACE_OPERAND", | ||
| _testinternalcapi.get_co_framesize(dummy18.__code__)), uops_and_operands) | ||
| @unittest.skip("reopen when we combine multiple stack space checks into one") | ||
| def test_combine_stack_space_complex(self): | ||
| def dummy0(x): | ||
| return x | ||
| @@ -1205,7 +1202,7 @@ def testfunc(n): | ||
| ("_CHECK_STACK_SPACE_OPERAND", largest_stack), uops_and_operands | ||
| ) | ||
cocolato marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| @unittest.skip("reopen when we combine multiple stack space checks into one") | ||
| def test_combine_stack_space_checks_large_framesize(self): | ||
| # Create a function with a large framesize. This ensures _CHECK_STACK_SPACE is | ||
| # actually doing its job. Note that the resulting trace hits | ||
| @@ -1267,7 +1264,7 @@ def testfunc(n): | ||
| ("_CHECK_STACK_SPACE_OPERAND", largest_stack), uops_and_operands | ||
| ) | ||
| @unittest.skip("reopen when we combine multiple stack space checks into one") | ||
| def test_combine_stack_space_checks_recursion(self): | ||
| def dummy15(x): | ||
| while x > 0: | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.