Author: fijal Branch: remove-frame-forcing-in-executioncontext Changeset: r83363:811209af057f Date: 2016-03-25 17:50 +0200 http://bitbucket.org/pypy/pypy/changeset/811209af057f/
Log: remove forcing of vref to see what happens diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py --- a/pypy/interpreter/error.py +++ b/pypy/interpreter/error.py @@ -278,17 +278,9 @@ def get_traceback(self): """Calling this marks the PyTraceback as escaped, i.e. it becomes - accessible and inspectable by app-level Python code. For the JIT. - Note that this has no effect if there are already several traceback - frames recorded, because in this case they are already marked as - escaping by executioncontext.leave() being called with - got_exception=True. + accessible and inspectable by app-level Python code. """ - from pypy.interpreter.pytraceback import PyTraceback - tb = self._application_traceback - if tb is not None and isinstance(tb, PyTraceback): - tb.frame.mark_as_escaped() - return tb + return self._application_traceback def set_traceback(self, traceback): """Set the current traceback. It should either be a traceback diff --git a/pypy/interpreter/executioncontext.py b/pypy/interpreter/executioncontext.py --- a/pypy/interpreter/executioncontext.py +++ b/pypy/interpreter/executioncontext.py @@ -74,15 +74,6 @@ finally: frame_vref = self.topframeref self.topframeref = frame.f_backref - if frame.escaped or got_exception: - # if this frame escaped to applevel, we must ensure that also - # f_back does - f_back = frame.f_backref() - if f_back: - f_back.mark_as_escaped() - # force the frame (from the JIT point of view), so that it can - # be accessed also later - frame_vref() jit.virtual_ref_finish(frame_vref, frame) # ________________________________________________________________ diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py --- a/pypy/interpreter/pyframe.py +++ b/pypy/interpreter/pyframe.py @@ -65,7 +65,6 @@ last_exception = None f_backref = jit.vref_None - escaped = False # see mark_as_escaped() debugdata = None pycode = None # code object executed by that frame @@ -152,15 +151,6 @@ assert isinstance(cell, Cell) return cell - def mark_as_escaped(self): - """ - Must be called on frames that are exposed to applevel, e.g. by - sys._getframe(). This ensures that the virtualref holding the frame - is properly forced by ec.leave(), and thus the frame will be still - accessible even after the corresponding C stack died. - """ - self.escaped = True - def append_block(self, block): assert block.previous is self.lastblock self.lastblock = block diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py --- a/pypy/module/sys/vm.py +++ b/pypy/module/sys/vm.py @@ -37,7 +37,6 @@ raise OperationError(space.w_ValueError, space.wrap("call stack is not deep enough")) if depth == 0: - f.mark_as_escaped() return space.wrap(f) depth -= 1 f = ec.getnextframe_nohidden(f) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit