def f(): rstack.stack_frames_depth() rstack.set_stack_depth_limit(1) try: return g() except RuntimeError: return -123
def f(n): if n > 0: stack_frames_depth() res, dummy = f(n - 1) else: res, dummy = stack_frames_depth(), 1 return res, dummy
def f(n): if n > 0: stack_frames_depth() res, dummy = f(n-1) else: res, dummy = stack_frames_depth(), 1 return res, dummy
def g(base, lst): lst.append(rstack.stack_frames_depth() - base) #print lst frametop_before_5 = rstack.yield_current_frame_to_caller() lst.append(h()) frametop_before_7 = frametop_before_5.switch() lst.append(rstack.stack_frames_depth()) return frametop_before_7
def f(base): lst = [rstack.stack_frames_depth() - base] #print lst frametop_before_4 = g(base, lst) lst.append(rstack.stack_frames_depth() - base) #print lst frametop_before_6 = frametop_before_4.switch() lst.append(h() - base) frametop_after_return = frametop_before_6.switch() lst.append(rstack.stack_frames_depth() - base) assert not frametop_after_return n = 0 for i in lst: n = n*10 + i return n
def f(n): if n > 0: res, dummy = f(n-1) return (res, dummy) else: res = rstack.stack_frames_depth(), 1 return res
def f(n, d, t): if n > 0: res, y, z = f(n-1, d, t) return res, y, z else: res = rstack.stack_frames_depth(), d, t return res
def f(n): g1() if n > 0: res = f(n - 1) + 0 # make sure it is not a tail call else: res = stack_frames_depth() g2(g1) return res
def f(n): g1() if n > 0: res = f(n-1) + 0 else: res = rstack.stack_frames_depth() g2(g1) return res
def f(n): g1() if n > 0: res = f(n-1) + 0 # make sure it is not a tail call else: res = stack_frames_depth() g2(g1) return res
def f(coro, n, x): if n == 0: coro.switch() rstack.resume_point("f_0") assert rstack.stack_frames_depth() == 9 return f(coro, n - 1, 2 * x) rstack.resume_point("f_1", coro, n, x) output.append(x)
def f(coro, n, x): if n == 0: coro.switch() rstack.resume_point("f_0") assert rstack.stack_frames_depth() == 9 return f(coro, n-1, 2*x) rstack.resume_point("f_1", coro, n, x) output.append(x)
def h(): x = rstack.stack_frames_depth() x += 1 # don't remove! otherwise it becomes a tail call x -= 1 return x
def f(n, d, t): if n > 0: a, b, c = f(n-1, d, t) else: a, b, c = stack_frames_depth(), d, t return a, b, c
def g(): return rstack.stack_frames_depth()
def f(n, d, t): if n > 0: a, b, c = f(n - 1, d, t) else: a, b, c = stack_frames_depth(), d, t return a, b, c
def entrypoint(): base = rstack.stack_frames_depth() return loop(base, 5) - 6
def f(n): if n > 0: res = f(n-1) else: res = rstack.stack_frames_depth() return res
def g(base): print rstack.stack_frames_depth() return rstack.stack_frames_depth() - base
def f(): return stack_frames_depth()
def fn(): base = rstack.stack_frames_depth() print base base = rstack.stack_frames_depth() print base return g(base) + 100
def ll_stackless_stack_frames_depth(): return rstack.stack_frames_depth()