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

Function build_stack

Lib/test/test_frame_pointer_unwind.py:77–91  ·  view source on GitHub ↗
(n, unwinder, warming_up_caller=False)

Source from the content-addressed store, hash-verified

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

Callers 1

_build_stack_and_unwindFunction · 0.85

Calls 2

is_activeMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…