[pypy-svn] pypy default: Add a slight jitfriendliness in handling the operation error. Removes

fijal commits-noreply at bitbucket.org
Sat Apr 9 11:05:37 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r43246:7a7719ff3f05
Date: 2011-04-09 11:03 +0200
http://bitbucket.org/pypy/pypy/changeset/7a7719ff3f05/

Log:	Add a slight jitfriendliness in handling the operation error.
	Removes two setfields on a frame (since w_f_trace is not a
	virtualizable field)

diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -138,11 +138,13 @@
                 # raised after the exception handler block was popped.
                 try:
                     trace = self.w_f_trace
-                    self.w_f_trace = None
+                    if trace is not None:
+                        self.w_f_trace = None
                     try:
                         ec.bytecode_trace_after_exception(self)
                     finally:
-                        self.w_f_trace = trace
+                        if trace is not None:
+                            self.w_f_trace = trace
                 except OperationError, e:
                     operr = e
             pytraceback.record_application_traceback(


More information about the Pypy-commit mailing list