Author: Lars Wassermann <lars.wasserm...@gmail.com>
Branch: 
Changeset: r237:843613d2ad89
Date: 2013-03-26 10:51 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/843613d2ad89/

Log:    extending the tracing code

diff --git a/spyvm/interpreter.py b/spyvm/interpreter.py
--- a/spyvm/interpreter.py
+++ b/spyvm/interpreter.py
@@ -43,7 +43,8 @@
         self._loop = False
         self.next_wakeup_tick = 0
         self.interrupt_check_counter = constants.INTERRUPT_COUNTER_SIZE
-        # self.trace = False
+        # 
######################################################################
+        # self.trace = True
 
     def interpret_with_w_frame(self, w_frame):
         try:
@@ -78,6 +79,7 @@
                 s_new_context = p.s_new_context
 
     def c_loop(self, s_context):
+        # 
######################################################################
         # if self.trace:
         #     padding = ' ' * (self.max_stack_depth - 
self.remaining_stack_depth)
         #     print padding + s_context.short_str()
@@ -340,6 +342,7 @@
             if interp.should_trace():
                 print "%sActually calling primitive %d" % 
(interp._last_indent, code,)
             func = primitives.prim_holder.prim_table[code]
+            # 
##################################################################
             # if interp.trace:
             #     print "%s calling primitive %d \t(%s)" % (' ' * 
(interp.max_stack_depth - interp.remaining_stack_depth),
             #                                             code, func.func_name)
@@ -347,8 +350,14 @@
                 # note: argcount does not include rcvr
                 return func(interp, self, argcount)
             except primitives.PrimitiveFailedError:
-                # if interp.trace:
+                # 
##############################################################
+                # if interp.trace and func.func_name != 
'raise_failing_default' and code != 83:
                 #     import pdb; pdb.set_trace()
+                #     try:
+                #         func(interp, self, argcount) # will fail again
+                #     except primitives.PrimitiveFailedError:
+                #         pass
+
                 if interp.should_trace(True):
                     print "PRIMITIVE FAILED: %d %s" % (s_method.primitive, 
w_selector.as_string(),)
                 pass # ignore this error and fall back to the Smalltalk version
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to