()
| 72 | |
| 73 | |
| 74 | def _build_stack_and_unwind(): |
| 75 | import operator |
| 76 | |
| 77 | def build_stack(n, unwinder, warming_up_caller=False): |
| 78 | if warming_up_caller: |
| 79 | return |
| 80 | if n == 0: |
| 81 | return unwinder() |
| 82 | warming_up = True |
| 83 | while warming_up: |
| 84 | # Can't branch on JIT state inside JITted code, so compute here. |
| 85 | warming_up = ( |
| 86 | hasattr(sys, "_jit") |
| 87 | and sys._jit.is_enabled() |
| 88 | and not sys._jit.is_active() |
| 89 | ) |
| 90 | result = operator.call(build_stack, n - 1, unwinder, warming_up) |
| 91 | return result |
| 92 | |
| 93 | stack = build_stack(10, _testinternalcapi.manual_frame_pointer_unwind) |
| 94 | return stack |
| 95 | |
| 96 | |
| 97 | def _classify_stack(stack, jit_enabled): |
no test coverage detected
searching dependent graphs…