[pypy-commit] lang-smalltalk default: added printing capabilities to the vm-debugging plugin

lwassermann noreply at buildbot.pypy.org
Tue May 21 11:28:39 CEST 2013


Author: Lars Wassermann <lars.wassermann at gmail.com>
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
+
+ at DebuggingPlugin.expose_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


More information about the pypy-commit mailing list