[pypy-commit] pypy logging-perf: roll back this change, it doesn't totally make sense (and didn't work anyways)

alex_gaynor noreply at buildbot.pypy.org
Sat May 25 20:00:17 CEST 2013


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: logging-perf
Changeset: r64555:3e28a59b15c5
Date: 2013-05-25 13:54 -0400
http://bitbucket.org/pypy/pypy/changeset/3e28a59b15c5/

Log:	roll back this change, it doesn't totally make sense (and didn't
	work anyways)

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
@@ -25,36 +25,13 @@
     if depth < 0:
         raise OperationError(space.w_ValueError,
                              space.wrap("frame index must not be negative"))
-    return getframe_unroll(space, depth)
+    return getframe(space, depth)
 
 
 @jit.look_inside_iff(lambda space, depth: jit.isconstant(depth))
-def getframe_unroll(space, depth):
+def getframe(space, depth):
     ec = space.getexecutioncontext()
     f = ec.gettopframe_nohidden()
-    while jit.isvirtual(f):
-        if f is None:
-            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)
-
-    if f is None:
-        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)
-
-    return getframe_fallback(space, ec, depth, f)
-
-
-def getframe_fallback(space, ec, depth, f):
     while True:
         if f is None:
             raise OperationError(space.w_ValueError,


More information about the pypy-commit mailing list