Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r290:ea0276a64497
Date: 2013-04-17 09:27 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/ea0276a64497/

Log:    added tracing for doesNotUnderstand-calls, padding is done with #
        instead of ' ' to alleviate backwards search

diff --git a/spyvm/interpreter.py b/spyvm/interpreter.py
--- a/spyvm/interpreter.py
+++ b/spyvm/interpreter.py
@@ -236,7 +236,7 @@
 # ___________________________________________________________________________
 # Bytecode Implementations:
 #
-# "self" is always a ContextPartShadow instance.  
+# "self" is always a ContextPartShadow instance.
 
 # __extend__ adds new methods to the ContextPartShadow class
 class __extend__(ContextPartShadow):
@@ -389,6 +389,12 @@
             raise
         s_frame = s_method.create_frame(self.space, receiver, [w_message], 
self)
         self.pop()
+
+        # 
######################################################################
+        if interp.trace:
+            padding = '#' * (interp.max_stack_depth - 
interp.remaining_stack_depth)
+            print padding + s_frame.short_str(1)
+
         return interp.stack_frame(s_frame)
 
     def _return(self, return_value, interp, s_return_to):
@@ -397,7 +403,7 @@
             raise ReturnFromTopLevel(return_value)
         # unfortunately, the assert below is not true for some tests
         # assert self._stack_ptr == self.tempsize()
-        
+
         raise Return(return_value, s_return_to)
 
     def returnReceiver(self, interp, current_bytecode):
@@ -441,7 +447,7 @@
             self.push(association.value())
         else:
             assert 0
-        
+
     def extendedStoreBytecode(self, interp, current_bytecode):
         variableType, variableIndex = self.extendedVariableTypeAndIndex()
         if variableType == 0:
@@ -571,7 +577,7 @@
         i = self.getbytecode()
         blockSize = (j << 8) | i
         #create new instance of BlockClosure
-        w_closure = space.newClosure(self.w_self(), self.pc(), numArgs, 
+        w_closure = space.newClosure(self.w_self(), self.pc(), numArgs,
                                             self.pop_and_return_n(numCopied))
         self.push(w_closure)
         self.jump(blockSize)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to