def test_check_escaping_jitted_with_two_differen_virtualizables(self): ec, frame, frame2 = self.enter_two_jitted_levels() frame3 = self.Frame(ec, frame) ec._chain(frame3) # frame3 is not inlined, but contains a loop itself, for which code has # been generated ExecutionContext._jit_rechain_frame(ec, frame3) ec.virtualizable = frame3 frame3.look_at() assert not frame2.escaped assert frame3.escaped frame4 = self.Frame(ec, frame3) ec._chain(frame4) assert ec.framestackdepth == 4 assert not frame4.escaped ec._unchain(frame4) assert frame3.escaped assert not frame2.escaped ec.virtualizable = frame ec._unchain(frame3) assert not frame2.escaped
def test_check_escaping_jitted_with_two_differen_virtualizables(self): ec, frame, frame2 = self.enter_two_jitted_levels() frame3 = self.Frame(ec, frame) ec._chain(frame3) # frame3 is not inlined, but contains a loop itself, for which code has # been generated ExecutionContext._jit_rechain_frame(ec, frame3) ec.virtualizable = frame3 frame3.look_at() assert not frame2.escaped assert frame3.escaped frame4 = self.Frame(ec, frame3) ec._chain(frame4) assert ec.framestackdepth == 4 assert not frame4.escaped ec._unchain(frame4) assert frame3.escaped assert not frame2.escaped ec.virtualizable = frame ec._unchain(frame3) assert not frame2.escaped
def test_check_escaping_multi_non_jitted_levels(self): ec, frame, frame2 = self.enter_two_jitted_levels() # recursive enter/leave seen by the jit frame3 = self.Frame(ec, frame) ec._chain(frame3) ExecutionContext._jit_rechain_frame(ec, frame3) ec.jitted = False assert frame3.escaped assert not frame2.escaped assert frame3.escaped frame4 = self.Frame(ec) ec._chain(frame4) assert ec.framestackdepth == 4 ec._unchain(frame4) assert frame3.escaped assert not frame2.escaped ec.jitted = True assert frame3.f_back() is frame2 ec._unchain(frame3) assert not frame2.escaped self.leave_two_jitted_levels(ec, frame, frame2)
def test_check_escaping_multi_non_jitted_levels(self): ec, frame, frame2 = self.enter_two_jitted_levels() # recursive enter/leave seen by the jit frame3 = self.Frame(ec, frame) ec._chain(frame3) ExecutionContext._jit_rechain_frame(ec, frame3) ec.jitted = False assert frame3.escaped assert not frame2.escaped assert frame3.escaped frame4 = self.Frame(ec) ec._chain(frame4) assert ec.framestackdepth == 4 ec._unchain(frame4) assert frame3.escaped assert not frame2.escaped ec.jitted = True assert frame3.f_back() is frame2 ec._unchain(frame3) assert not frame2.escaped self.leave_two_jitted_levels(ec, frame, frame2)
def test_check_escaping_not_all_inlined_enter_leave_seen(self): ec, frame, frame2 = self.enter_two_jitted_levels() # recursive enter/leave seen by the jit frame3 = self.Frame(ec, frame) ec._chain(frame3) ExecutionContext._jit_rechain_frame(ec, frame3) ec.jitted = False frame3.look_at() assert not frame2.escaped assert frame3.escaped ec.jitted = True assert frame3.f_back() is frame2 ec._unchain(frame3) assert not frame2.escaped self.leave_two_jitted_levels(ec, frame, frame2)
def test_check_escaping_not_all_inlined_enter_leave_seen(self): ec, frame, frame2 = self.enter_two_jitted_levels() # recursive enter/leave seen by the jit frame3 = self.Frame(ec, frame) ec._chain(frame3) ExecutionContext._jit_rechain_frame(ec, frame3) ec.jitted = False frame3.look_at() assert not frame2.escaped assert frame3.escaped ec.jitted = True assert frame3.f_back() is frame2 ec._unchain(frame3) assert not frame2.escaped self.leave_two_jitted_levels(ec, frame, frame2)
def leave(next_instr, pycode, frame, ec): from pypy.interpreter.executioncontext import ExecutionContext # can't use a method here, since this function is seen later than the main # annotation XXX no longer true, could be fixed ExecutionContext._jit_rechain_frame(ec, frame)
def leave(next_instr, pycode, frame, ec): from pypy.interpreter.executioncontext import ExecutionContext # can't use a method here, since this function is seen later than the main # annotation XXX no longer true, could be fixed ExecutionContext._jit_rechain_frame(ec, frame)