MCPcopy Index your code
hub / github.com/python/cpython / _build_stack_and_unwind

Function _build_stack_and_unwind

Lib/test/test_frame_pointer_unwind.py:74–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73
74def _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
97def _classify_stack(stack, jit_enabled):

Callers 1

_annotate_unwindFunction · 0.85

Calls 1

build_stackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…