コード例 #1
0
ファイル: test_stackless.py プロジェクト: antoine1fr/pygirl
 def g(lst):
     lst.append(2)
     frametop_before_5 = yield_current_frame_to_caller()
     lst.append(4)
     frametop_before_7 = frametop_before_5.switch()
     lst.append(6)
     return frametop_before_7
コード例 #2
0
ファイル: test_stackless.py プロジェクト: e2pluginss/plexnet
 def g(lst):
     lst.append(2)
     frametop_before_5 = yield_current_frame_to_caller()
     lst.append(4)
     frametop_before_7 = frametop_before_5.switch()
     lst.append(6)
     return frametop_before_7
コード例 #3
0
ファイル: test_depth.py プロジェクト: xx312022850/pypy
 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
コード例 #4
0
ファイル: test_clone.py プロジェクト: alkorzt/pypy
 def g(lst):
     lst.append(1)
     parent = rstack.yield_current_frame_to_caller()
     # compute a bit
     lst.append(3)
     # switch back for the fork
     parent = parent.switch()
     lst.append(6)  # we are here twice!
     return parent
コード例 #5
0
 def g(lst):
     lst.append(1)
     parent = rstack.yield_current_frame_to_caller()
     # compute a bit
     lst.append(3)
     # switch back for the fork
     parent = parent.switch()
     lst.append(6)  # we are here twice!
     return parent
コード例 #6
0
ファイル: test_stackless.py プロジェクト: antoine1fr/pygirl
 def g(lst):
     a = A(1)
     lst.append(a.inc(1))
     frametop_before_5 = yield_current_frame_to_caller()
     malloc_a_lot()
     lst.append(a.inc(2))
     frametop_before_7 = frametop_before_5.switch()
     malloc_a_lot()
     lst.append(a.inc(2))
     return frametop_before_7
コード例 #7
0
ファイル: test_stackless.py プロジェクト: e2pluginss/plexnet
 def g(lst):
     a = A(1)
     lst.append(a.inc(1))
     frametop_before_5 = yield_current_frame_to_caller()
     malloc_a_lot()
     lst.append(a.inc(2))
     frametop_before_7 = frametop_before_5.switch()
     malloc_a_lot()
     lst.append(a.inc(2))
     return frametop_before_7
コード例 #8
0
 def _start(self):
     threadlocals.cc = yield_current_frame_to_caller()
     self.fn()
     return threadlocals.cc
コード例 #9
0
 def _bind(self):
     state = self.costate
     incoming_frame = yield_current_frame_to_caller()
     self = state.current
     return self._execute(incoming_frame)
コード例 #10
0
ファイル: test_stackless.py プロジェクト: antoine1fr/pygirl
 def g():
     d = yield_current_frame_to_caller()
     return d
コード例 #11
0
ファイル: test_stackless.py プロジェクト: e2pluginss/plexnet
 def g():
     d = yield_current_frame_to_caller()
     return d
コード例 #12
0
 def g():
     d = rstack.yield_current_frame_to_caller()
     return d
コード例 #13
0
 def _bind(self):
     state = self.costate
     incoming_frame = yield_current_frame_to_caller()
     self = state.current
     return self._execute(incoming_frame)
コード例 #14
0
ファイル: test_tasklets.py プロジェクト: alkorzt/pypy
 def _start(self):
     threadlocals.cc = yield_current_frame_to_caller()
     self.fn()
     return threadlocals.cc