Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r397:ed77e03406eb
Date: 2013-05-21 11:28 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/ed77e03406eb/

Log:    added printing capabilities to the vm-debugging plugin

diff --git a/spyvm/plugins/vmdebugging.py b/spyvm/plugins/vmdebugging.py
--- a/spyvm/plugins/vmdebugging.py
+++ b/spyvm/plugins/vmdebugging.py
@@ -27,3 +27,10 @@
         print s_frame
         raise Exit('Halt is not well defined when translated.')
     return w_rcvr
+
[email protected]_primitive(unwrap_spec=[object, object])
+def debugPrint(interp, s_frame, w_rcvr, w_string):
+    if not isinstance(w_string, model.W_BytesObject):
+        raise error.PrimitiveFailedError()
+    print w_string.as_string()
+    return w_rcvr
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to