Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r77181:0f95f0d72cd2
Date: 2015-05-07 17:22 +0200
http://bitbucket.org/pypy/pypy/changeset/0f95f0d72cd2/

Log:    a slightly different fix

diff --git a/pypy/interpreter/executioncontext.py 
b/pypy/interpreter/executioncontext.py
--- a/pypy/interpreter/executioncontext.py
+++ b/pypy/interpreter/executioncontext.py
@@ -288,7 +288,6 @@
         # field of all frames, during the loop below.)
         frame = self.gettopframe_nohidden()
         while frame:
-            frame.getorcreatedebug().f_lineno = frame.get_last_lineno()
             if is_being_profiled:
                 frame.getorcreatedebug().is_being_profiled = True
             frame = self.getnextframe_nohidden(frame)
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -34,6 +34,9 @@
     is_being_profiled        = False
     w_locals                 = None
 
+    def __init__(self, pycode):
+        self.f_lineno = pycode.co_firstlineno
+
 class PyFrame(W_Root):
     """Represents a frame for a regular Python function
     that needs to be interpreted.
@@ -106,7 +109,7 @@
 
     def getorcreatedebug(self):
         if self.debugdata is None:
-            self.debugdata = FrameDebugData()
+            self.debugdata = FrameDebugData(self.pycode)
         return self.debugdata
 
     def get_w_f_trace(self):
@@ -822,7 +825,7 @@
         else:
             d = self.getorcreatedebug()
             d.w_f_trace = w_trace
-            d = self.get_last_lineno()
+            d.f_lineno = self.get_last_lineno()
 
     def fdel_f_trace(self, space):
         self.getorcreatedebug().w_f_trace = None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to